00001 /*************************************************************************** 00002 * * 00003 * This program is free software; you can redistribute it and/or modify * 00004 * it under the terms of the GNU General Public License as published by * 00005 * the Free Software Foundation; either version 2 of the License, or * 00006 * (at your option) any later version. * 00007 * * 00008 ***************************************************************************/ 00009 00010 // (c) 2002 Patrick S. Vogt <tille@handhelds.org> 00011 00012 #ifndef MAINWINDOW_H 00013 #define MAINWINDOW_H 00014 00015 #include <qmainwindow.h> 00016 #include <qdialog.h> 00017 #include <qaction.h> 00018 #include <qtimer.h> 00019 #include <qpopupmenu.h> 00020 #include "editwidget.h" 00021 00022 class QToolBar; 00023 class ListViewItemConfFile; 00024 class ListViewConfDir; 00025 class ListViewItemConf; 00026 00027 class MainWindow : public QMainWindow 00028 { 00029 Q_OBJECT 00030 00031 00032 public: 00033 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); 00034 ~MainWindow(); 00035 static QString appName() { return QString::fromLatin1("confedit"); } 00036 00037 public slots: 00038 void setCurrent(QListViewItem*); 00039 void groupChanged(const QString&); 00040 void keyChanged(const QString&); 00041 void valueChanged(const QString&); 00042 void showPopup(); 00043 void stopTimer( QListViewItem* ); 00044 void saveConfFile(); 00045 void revertConfFile(); 00046 void removeConfFile(); 00047 00048 private: 00049 ListViewConfDir *settingList; 00050 EditWidget *editor; 00051 QVBoxLayout *mainLayout; 00052 ListViewItemConf *_item; 00053 ListViewItemConfigEntry *_currentItem; 00054 ListViewItemConfFile *_fileItem; 00055 QTimer *popupTimer; 00056 QPopupMenu *popupMenuFile; 00057 QPopupMenu *popupMenuEntry; 00058 QAction *popupActionSave; 00059 QAction *popupActionRevert; 00060 QAction *popupActionDelete; 00061 QAction *popupActionNew; 00062 // QAction *popupAction; 00063 // QAction *popupAction; 00064 00065 void makeMenu(); 00066 }; 00067 00068 #endif
1.4.2