00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef MAINFORM_H
00010 #define MAINFORM_H
00011
00012 #include <qvariant.h>
00013 #include <qmainwindow.h>
00014 #include "qworkspace.h"
00015 #include "qvbox.h"
00016 #include "cfgform.h"
00017 #include "qpopupmenu.h"
00018 #include "awindowslist.h"
00019 #include "qsettings.h"
00020
00021 class QVBoxLayout;
00022 class QHBoxLayout;
00023 class QGridLayout;
00024 class QSpacerItem;
00025 class QAction;
00026 class QActionGroup;
00027 class QToolBar;
00028 class QPopupMenu;
00029
00030 class MainForm : public QMainWindow
00031 {
00032 Q_OBJECT
00033
00034 public:
00035 MainForm( QWidget* parent = 0, const char* name = 0, WFlags fl = WType_TopLevel );
00036 ~MainForm();
00037
00038 QMenuBar *menubar;
00039 QPopupMenu *fileMenu;
00040 QPopupMenu *editMenu;
00041 QPopupMenu *ConfigurationMenu;
00042 QPopupMenu *ObjectMenu;
00043 QToolBar *Toolbar;
00044 QToolBar *tbInterface;
00045 QToolBar *tbMetadata;
00046 QToolBar *tbActions;
00047 QToolBar *tbRights;
00048 QToolBar *tbLanguages;
00049 QToolBar *tbImageCollection;
00050 QToolBar *TBToolbar;
00051 QToolBar *tbTabs;
00052 QAction* fileNewAction;
00053 QAction* fileOpenAction;
00054 QAction* fileSaveAction;
00055 QAction* fileSaveAsAction;
00056 QAction* filePrintAction;
00057 QAction* fileExitAction;
00058 QAction* editUndoAction;
00059 QAction* editRedoAction;
00060 QAction* editCutAction;
00061 QAction* editCopyAction;
00062 QAction* editPasteAction;
00063 QAction* editFindAction;
00064 QAction* helpContentsAction;
00065 QAction* helpIndexAction;
00066 QAction* helpAboutAction;
00067 QActionGroup* configGroup;
00068 QAction* configNewAction;
00069 QAction* configOpenAction;
00070 QAction* configSaveAction;
00071 QAction* config_DBCreateAction;
00072 QActionGroup* formGroup;
00073 QAction* NewButtonAction;
00074 QAction* NewAttributeAction;
00075 QAction* NewFieldAction;
00076 QActionGroup* objectGroup;
00077 QAction* objNewFormAction;
00078 QAction* objDeleteAction;
00079 QAction* objNewFieldAction;
00080 QAction* objRenameAction;
00081 QAction* objEditAction;
00082 QAction* objNewTableAction;
00083 QAction* objNewObjAction;
00084 QAction* objTBDeleteAction;
00085 QAction* objMetadataNewAction;
00086 QAction* objTBRenameAction;
00087 QAction* objTBMoveUpAction;
00088 QAction* objTBMoveDownAction;
00089 QAction* objMetadataEditAction;
00090 QAction* objActionsNewGroupAction;
00091 QAction* objActionsNewAction;
00092 QAction* objActionsEditAction;
00093 QAction* objInterfaceNewSubmenuAction;
00094 QAction* objInterfaceNewCommandAction;
00095 QAction* objInterfaceNewSeparatorAction;
00096 QAction* objInterfaceEditAction;
00097 QAction* objInterfaceRenameAction;
00098 QAction* objLanguagesNewAction;
00099 QAction* objLanguagesEditAction;
00100 QAction* objLanguagesClearAction;
00101 QAction* objImageCollectionAddAction;
00102 QAction* objRoleNewAction;
00103 QAction* objRoleClearAction;
00104 QAction* objRoleEditAction;
00105 QAction* new_itemAction;
00106 QAction* new_itemAction_2;
00107 QAction* configurationnew_itemAction;
00108
00109 QLabel *msg;
00110 QWorkspace *ws;
00111 CfgForm *cfgform;
00112 QString rcfile;
00113 aCfg *md;
00114 int lastFormId;
00115 int lastTabId;
00116 aWindowsList *wl;
00117 QSettings designer_settings;
00118
00119 virtual CfgForm * cfgForm();
00120 virtual QWidget * activeWindow();
00121
00122 public slots:
00123 virtual void filePrint();
00124 virtual void fileExit();
00125 virtual void editUndo();
00126 virtual void editRedo();
00127 virtual void editCut();
00128 virtual void editCopy();
00129 virtual void editPaste();
00130 virtual void editFind();
00131 virtual void helpIndex();
00132 virtual void helpContents();
00133 virtual void helpAbout();
00134 virtual void init();
00135 virtual void configNew();
00136 virtual void configOpen();
00137 virtual void configSave();
00138 virtual void configSaveAs();
00139 virtual void fileOpen();
00140 virtual void fileSave();
00141 virtual void fileSaveAs();
00142 virtual void fileNew();
00143 virtual void connectSignals( CfgForm * cf );
00144 virtual void getMd( aCfg * * md );
00145 virtual int getId();
00146 virtual void addTab( int uid, const QString & winName );
00147 virtual void removeTab( const QString & winName );
00148 virtual void closeChildWindows();
00149 virtual void fileNewAction_activated();
00150
00151 signals:
00152 void tosave();
00153
00154 protected:
00155
00156 protected slots:
00157 virtual void languageChange();
00158
00159 private:
00160 QPopupMenu *windowsMenu;
00161
00162 private slots:
00163 virtual void windowsMenuActivated( int id );
00164 virtual void windowsMenuAboutToShow();
00165 virtual void tileHorizontal();
00166 virtual void closeEvent( QCloseEvent * e );
00167
00168 };
00169
00170 #endif // MAINFORM_H