/[svn]/qsampler/trunk/src/qsamplerMessages.h
ViewVC logotype

Annotation of /qsampler/trunk/src/qsamplerMessages.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1465 - (hide annotations) (download) (as text)
Thu Nov 1 17:49:27 2007 UTC (16 years, 5 months ago) by capela
File MIME type: text/x-c++hdr
File size: 2515 byte(s)
- Qt4 migration: main toolbars and messages dock-widget fix.

1 capela 91 // qsamplerMessages.h
2     //
3     /****************************************************************************
4 schoenebeck 1461 Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved.
5 capela 1464 Copyright (C) 2007, Christian Schoenebeck
6 capela 91
7     This program is free software; you can redistribute it and/or
8     modify it under the terms of the GNU General Public License
9     as published by the Free Software Foundation; either version 2
10     of the License, or (at your option) any later version.
11    
12     This program is distributed in the hope that it will be useful,
13     but WITHOUT ANY WARRANTY; without even the implied warranty of
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15     GNU General Public License for more details.
16    
17 capela 920 You should have received a copy of the GNU General Public License along
18     with this program; if not, write to the Free Software Foundation, Inc.,
19     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 capela 91
21     *****************************************************************************/
22    
23     #ifndef __qsamplerMessages_h
24     #define __qsamplerMessages_h
25    
26 schoenebeck 1461 #include <QDockWidget>
27 capela 91
28     class QSocketNotifier;
29     class QTextEdit;
30    
31    
32     //-------------------------------------------------------------------------
33     // qsamplerMessages - Messages log dockable window.
34     //
35    
36 schoenebeck 1461 class qsamplerMessages : public QDockWidget
37 capela 91 {
38 capela 1465 Q_OBJECT
39 capela 91
40     public:
41    
42 capela 1465 // Constructor.
43     qsamplerMessages(QWidget *pParent);
44     // Destructor.
45     ~qsamplerMessages();
46 capela 91
47 capela 1465 // Stdout/stderr capture accessors.
48     bool isCaptureEnabled();
49     void setCaptureEnabled(bool bCapture);
50 capela 91
51 capela 1465 // Message font accessors.
52     QFont messagesFont();
53     void setMessagesFont(const QFont & font);
54 capela 91
55 capela 1465 // Maximum number of message lines accessors.
56     int messagesLimit();
57     void setMessagesLimit(int iMessagesLimit);
58 schoenebeck 1461
59 capela 1465 // The main utility methods.
60     void appendMessages(const QString& s);
61     void appendMessagesColor(const QString& s, const QString &c);
62     void appendMessagesText(const QString& s);
63 capela 91
64 capela 1465 // Stdout capture functions.
65     void appendStdoutBuffer(const QString& s);
66     void flushStdoutBuffer();
67 capela 91
68 capela 1465 // History reset.
69     void clear();
70    
71 capela 91 protected slots:
72    
73 capela 1465 // Stdout capture slot.
74     void stdoutNotify(int fd);
75 capela 91
76     private:
77    
78 capela 1465 // The maximum number of message lines.
79     int m_iMessagesLines;
80     int m_iMessagesLimit;
81     int m_iMessagesHigh;
82 capela 327
83 capela 1465 // The textview main widget.
84     QTextEdit *m_pTextView;
85 schoenebeck 1461
86 capela 1465 // Stdout capture variables.
87     QSocketNotifier *m_pStdoutNotifier;
88     QString m_sStdoutBuffer;
89     int m_fdStdout[2];
90 capela 91 };
91    
92    
93     #endif // __qsamplerMessages_h
94    
95    
96     // end of qsamplerMessages.h

  ViewVC Help
Powered by ViewVC