lib/Preferences.h

Go to the documentation of this file.
00001 /*
00002  *  Qtstalker stock charter
00003  *
00004  *  Copyright (C) 2001-2007 Stefan S. Stratigakos
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
00019  *  USA.
00020  */
00021 
00022 #ifndef PREFERENCES_HPP
00023 #define PREFERENCES_HPP
00024 
00025 #include <qcolor.h>
00026 #include <qfont.h>
00027 #include <qstringlist.h>
00028 #include <qstring.h>
00029 #include <qtabdialog.h>
00030 #include <qcheckbox.h>
00031 #include <qspinbox.h>
00032 #include <qsize.h>
00033 #include "ColorButton.h"
00034 #include "FontButton.h"
00035 
00036 
00037 class Preferences : public QTabDialog
00038 {
00039   Q_OBJECT
00040 
00041   signals:
00042     void signalMenubar (bool);
00043     void signalExtraToolbar (bool);
00044     void signalBackgroundColor (QColor);
00045     void signalBorderColor (QColor);
00046     void signalGridColor (QColor);
00047     void signalPlotFont (QFont);
00048     void signalAppFont (QFont);
00049     void signalLoadChart ();
00050     void signalReloadToolBars ();
00051 
00052   public:
00053     Preferences (QWidget *);
00054     ~Preferences ();
00055     void createGeneralPage ();
00056     void createColorPage ();
00057     void createFontPage ();
00058     void createMTPage(); // main tool bar
00059     void createCTPage(); // chart tool bar
00060     void createETPage(); // extra tool bar
00061     void loadSettings ();
00062 
00063   public slots:
00064     void slotHelp ();
00065     void slotSave ();
00066     void slotModified();
00067 
00068   private:
00069     QSize sz;
00070     QString helpFile;
00071     bool menubar;
00072     bool extraToolbar;
00073     int ps1Button;
00074     int ps2Button;
00075     int ps3Button;
00076     QColor backgroundColor;
00077     QColor borderColor;
00078     QColor gridColor;
00079     QFont plotFont;
00080     QFont appFont;
00081     QCheckBox *menubarCheck;
00082     QCheckBox *extraToolbarCheck;
00083     QSpinBox *bs1Spinner;
00084     QSpinBox *bs2Spinner;
00085     QSpinBox *bs3Spinner;
00086     ColorButton *backgroundColorButton;
00087     ColorButton *borderColorButton;
00088     ColorButton *gridColorButton;
00089     FontButton *plotFontButton;
00090     FontButton *appFontButton;
00091     // on MainToolbar    
00092     QCheckBox *quitBtnCheck;
00093     QCheckBox *prefBtnCheck;
00094     QCheckBox *sidePanelBtnCheck;
00095     QCheckBox *gridBtnCheck;
00096     QCheckBox *scaleToScreenBtnCheck;
00097     QCheckBox *crosshairBtnCheck;
00098     QCheckBox *paperTradeBtnCheck;
00099     QCheckBox *drawModeBtnCheck;
00100     QCheckBox *newIndicatorBtnCheck;
00101     QCheckBox *dataWindowBtnCheck;
00102     QCheckBox *mainQuoteBtnCheck;
00103     QCheckBox *helpButtonCheck;
00104     // on ChartToolbar
00105     QCheckBox *sliderCheck;
00106     QCheckBox *barsToLoadFieldCheck;
00107     QCheckBox *barSpSpinboxCheck;
00108     QCheckBox *cmps15BtnCheck;
00109     QCheckBox *cmpsDayBtnCheck;
00110     QCheckBox *cmpsWkyBtnCheck;
00111     QCheckBox *cmpsMtyBtnCheck;
00112     QCheckBox *cmpsComboBoxCheck;
00113     QCheckBox *recentComboBoxCheck;
00114 };
00115 
00116 #endif