1 |
// qsamplerMessages.h |
// qsamplerMessages.h |
2 |
// |
// |
3 |
/**************************************************************************** |
/**************************************************************************** |
4 |
Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. |
Copyright (C) 2004-2008, rncbc aka Rui Nuno Capela. All rights reserved. |
5 |
Copyright (C) 2007, Christian Schoenebeck |
Copyright (C) 2007, Christian Schoenebeck |
6 |
|
|
7 |
This program is free software; you can redistribute it and/or |
This program is free software; you can redistribute it and/or |
27 |
|
|
28 |
class QSocketNotifier; |
class QSocketNotifier; |
29 |
class QTextEdit; |
class QTextEdit; |
30 |
|
class QFile; |
31 |
|
|
32 |
namespace QSampler { |
namespace QSampler { |
33 |
|
|
58 |
int messagesLimit(); |
int messagesLimit(); |
59 |
void setMessagesLimit(int iMessagesLimit); |
void setMessagesLimit(int iMessagesLimit); |
60 |
|
|
61 |
|
// Logging settings. |
62 |
|
bool isLogging() const; |
63 |
|
void setLogging(bool bEnabled, const QString& sFilename = QString()); |
64 |
|
|
65 |
// The main utility methods. |
// The main utility methods. |
66 |
void appendMessages(const QString& s); |
void appendMessages(const QString& s); |
67 |
void appendMessagesColor(const QString& s, const QString &c); |
void appendMessagesColor(const QString& s, const QString &c); |
80 |
|
|
81 |
protected slots: |
protected slots: |
82 |
|
|
83 |
|
// Message executives. |
84 |
|
void appendMessagesLine(const QString& s); |
85 |
|
void appendMessagesLog(const QString& s); |
86 |
|
|
87 |
// overridden method of QWidget |
// overridden method of QWidget |
88 |
void showEvent(QShowEvent* event); |
void showEvent(QShowEvent *pEvent); |
89 |
|
|
90 |
// Stdout capture slot. |
// Stdout capture slot. |
91 |
void stdoutNotify(int fd); |
void stdoutNotify(int fd); |
98 |
int m_iMessagesHigh; |
int m_iMessagesHigh; |
99 |
|
|
100 |
// The textview main widget. |
// The textview main widget. |
101 |
QTextEdit *m_pTextView; |
QTextEdit *m_pMessagesTextView; |
102 |
|
|
103 |
// Stdout capture variables. |
// Stdout capture variables. |
104 |
QSocketNotifier *m_pStdoutNotifier; |
QSocketNotifier *m_pStdoutNotifier; |
105 |
QString m_sStdoutBuffer; |
QString m_sStdoutBuffer; |
106 |
int m_fdStdout[2]; |
int m_fdStdout[2]; |
107 |
|
|
108 |
|
// Logging stuff. |
109 |
|
QFile *m_pMessagesLog; |
110 |
}; |
}; |
111 |
|
|
112 |
} // namespace QSampler |
} // namespace QSampler |