35 |
|
|
36 |
class qsamplerMessages : public QDockWidget |
class qsamplerMessages : public QDockWidget |
37 |
{ |
{ |
38 |
Q_OBJECT |
Q_OBJECT |
39 |
|
|
40 |
public: |
public: |
41 |
|
|
42 |
// Constructor. |
// Constructor. |
43 |
qsamplerMessages(QWidget *pParent, const char *pszName = 0); |
qsamplerMessages(QWidget *pParent); |
44 |
// Destructor. |
// Destructor. |
45 |
~qsamplerMessages(); |
~qsamplerMessages(); |
46 |
|
|
47 |
// Stdout/stderr capture accessors. |
// Stdout/stderr capture accessors. |
48 |
bool isCaptureEnabled(); |
bool isCaptureEnabled(); |
49 |
void setCaptureEnabled(bool bCapture); |
void setCaptureEnabled(bool bCapture); |
50 |
|
|
51 |
// Message font accessors. |
// Message font accessors. |
52 |
QFont messagesFont(); |
QFont messagesFont(); |
53 |
void setMessagesFont(const QFont & font); |
void setMessagesFont(const QFont & font); |
54 |
|
|
55 |
// Maximum number of message lines accessors. |
// Maximum number of message lines accessors. |
56 |
int messagesLimit(); |
int messagesLimit(); |
57 |
void setMessagesLimit(int iMessagesLimit); |
void setMessagesLimit(int iMessagesLimit); |
58 |
|
|
59 |
// The main utility methods. |
// The main utility methods. |
60 |
void appendMessages(const QString& s); |
void appendMessages(const QString& s); |
61 |
void appendMessagesColor(const QString& s, const QString &c); |
void appendMessagesColor(const QString& s, const QString &c); |
62 |
void appendMessagesText(const QString& s); |
void appendMessagesText(const QString& s); |
63 |
|
|
64 |
void scrollToBottom(); |
// Stdout capture functions. |
65 |
|
void appendStdoutBuffer(const QString& s); |
66 |
// Stdout capture functions. |
void flushStdoutBuffer(); |
67 |
void appendStdoutBuffer(const QString& s); |
|
68 |
void flushStdoutBuffer(); |
// History reset. |
69 |
|
void clear(); |
70 |
|
|
71 |
protected slots: |
protected slots: |
72 |
|
|
73 |
// Stdout capture slot. |
// Stdout capture slot. |
74 |
void stdoutNotify(int fd); |
void stdoutNotify(int fd); |
75 |
|
|
76 |
private: |
private: |
77 |
|
|
78 |
// The maximum number of message lines. |
// The maximum number of message lines. |
79 |
int m_iMessagesLimit; |
int m_iMessagesLines; |
80 |
int m_iMessagesHigh; |
int m_iMessagesLimit; |
81 |
|
int m_iMessagesHigh; |
82 |
// The textview main widget. |
|
83 |
QTextEdit *m_pTextView; |
// The textview main widget. |
84 |
|
QTextEdit *m_pTextView; |
85 |
// Stdout capture variables. |
|
86 |
QSocketNotifier *m_pStdoutNotifier; |
// Stdout capture variables. |
87 |
QString m_sStdoutBuffer; |
QSocketNotifier *m_pStdoutNotifier; |
88 |
int m_fdStdout[2]; |
QString m_sStdoutBuffer; |
89 |
|
int m_fdStdout[2]; |
90 |
}; |
}; |
91 |
|
|
92 |
|
|