00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef MAINMENUBAR_HPP
00023 #define MAINMENUBAR_HPP
00024
00025 #include <qstring.h>
00026 #include <qmenubar.h>
00027 #include <qmainwindow.h>
00028 #include <qpopupmenu.h>
00029 #include <qintdict.h>
00030 #include <qaction.h>
00031
00032 class MainMenubar : public QMenuBar
00033 {
00034 Q_OBJECT
00035
00036 signals:
00037 void signalExit ();
00038 void signalGrid (bool);
00039 void signalScale (bool);
00040 void signalDraw (bool);
00041 void signalCrosshairs (bool);
00042 void signalSidePanel (bool);
00043 void signalNewIndicator();
00044 void signalOptions();
00045 void signalQuotes();
00046 void signalPaperTrade (bool);
00047 void signalAdvancePaperTrade ();
00048
00049 public:
00050
00051 enum MenuAction
00052 {
00053 Exit,
00054 NewIndicator,
00055 Options,
00056 Grid,
00057 Quotes,
00058 DataWindow,
00059 About,
00060 ScaleToScreen,
00061 SidePanel,
00062 DrawMode,
00063 Crosshairs,
00064 Help,
00065 PaperTrade,
00066 AdvancePaperTrade,
00067 IndicatorSummary
00068 };
00069
00070 MainMenubar(QMainWindow *);
00071 ~MainMenubar();
00072 void createMenus ();
00073 QAction * getAction (int);
00074 bool getStatus (int);
00075 void setStatus (int, bool);
00076 void saveSettings ();
00077
00078 public slots:
00079 void slotAccel (int);
00080 void doKeyPress (QKeyEvent *);
00081
00082 private:
00083 QPopupMenu *fileMenu;
00084 QPopupMenu *editMenu;
00085 QPopupMenu *viewMenu;
00086 QPopupMenu *toolMenu;
00087 QPopupMenu *helpMenu;
00088 QIntDict<QAction> actions;
00089 };
00090
00091 #endif