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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1558 by capela, Thu Dec 6 09:35:33 2007 UTC revision 2441 by capela, Wed Apr 10 09:11:37 2013 UTC
# Line 1  Line 1 
1  // qsamplerMessages.h  // qsamplerMessages.h
2  //  //
3  /****************************************************************************  /****************************************************************************
4     Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved.     Copyright (C) 2004-2013, 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
# Line 27  Line 27 
27    
28  class QSocketNotifier;  class QSocketNotifier;
29  class QTextEdit;  class QTextEdit;
30    class QFile;
31    
32  namespace QSampler {  namespace QSampler {
33    
# Line 57  public: Line 58  public:
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);
# Line 69  public: Line 74  public:
74          // History reset.          // History reset.
75          void clear();          void clear();
76    
77    #if QT_VERSION < 0x040300
78  signals:  signals:
79    
80          void visibilityChanged(bool bVisible);          void visibilityChanged(bool bVisible);
81    
82  protected slots:  #endif
83    
84    protected:
85    
86            // Message executives.
87            void appendMessagesLine(const QString& s);
88            void appendMessagesLog(const QString& s);
89    
90    #if QT_VERSION < 0x040300
91    
92          // overridden method of QWidget          // Overridden method of QWidget
93          void showEvent(QShowEvent* event);          void showEvent(QShowEvent *pEvent);
94    
95    #endif
96    
97    protected slots:
98    
99          // Stdout capture slot.          // Stdout capture slot.
100          void stdoutNotify(int fd);          void stdoutNotify(int fd);
# Line 89  private: Line 107  private:
107          int m_iMessagesHigh;          int m_iMessagesHigh;
108    
109          // The textview main widget.          // The textview main widget.
110          QTextEdit *m_pTextView;          QTextEdit *m_pMessagesTextView;
111    
112          // Stdout capture variables.          // Stdout capture variables.
113          QSocketNotifier *m_pStdoutNotifier;          QSocketNotifier *m_pStdoutNotifier;
114          QString          m_sStdoutBuffer;          QString          m_sStdoutBuffer;
115          int              m_fdStdout[2];          int              m_fdStdout[2];
116    
117            // Logging stuff.
118            QFile *m_pMessagesLog;  
119  };  };
120    
121  } // namespace QSampler  } // namespace QSampler

Legend:
Removed from v.1558  
changed lines
  Added in v.2441

  ViewVC Help
Powered by ViewVC