00001 #ifndef GUILOGGER_H
00002 #define GUILOGGER_H
00003
00004 #include "PSQt/Frame.h"
00005 #include "PSQt/Logger.h"
00006
00007 #include <Qt>
00008 #include <QtGui>
00009 #include <QtCore>
00010
00011
00012 namespace PSQt {
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 class GUILogger : public Frame
00032 {
00033 Q_OBJECT
00034
00035 public:
00036 GUILogger(QWidget *parent=0, const bool& showbuts=true, const bool& showframe=true);
00037
00038 void resizeEvent(QResizeEvent *event = 0) ;
00039 void moveEvent (QMoveEvent *event = 0) ;
00040 void closeEvent (QCloseEvent *event = 0) ;
00041
00042 public slots:
00043 void addNewRecord(Record&);
00044 void onCombo(int);
00045 void onSave();
00046
00047
00048
00049 private :
00050
00051 bool m_showbuts;
00052 bool m_showframe;
00053
00054 QTextEdit* m_txt_edi;
00055 QPushButton* m_but_save;
00056 QHBoxLayout* m_cbox;
00057 QVBoxLayout* m_vbox;
00058 QComboBox* m_combo;
00059 QStringList m_list;
00060
00061 inline const char* _name_(){return "GUILogger";}
00062
00063 void showTips();
00064 void setStyle();
00065 void addStartRecords();
00066 void scrollDown();
00067 };
00068
00069 }
00070
00071 #endif // GUILOGGER_H