BALL
1.4.1
|
00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 00005 #ifndef BALL_VIEW_DIALOGS_MAINCONTROLPREFERENCES_H 00006 #define BALL_VIEW_DIALOGS_MAINCONTROLPREFERENCES_H 00007 00008 #ifndef BALL_COMMON_GLOBAL_H 00009 # include <BALL/COMMON/global.h> 00010 #endif 00011 00012 #ifndef BALL_FORMAT_INIFILE_H 00013 # include <BALL/FORMAT/INIFile.h> 00014 #endif 00015 00016 #ifndef BALL_VIEW_KERNEL_PREFERENCESENTRY 00017 # include <BALL/VIEW/KERNEL/preferencesEntry.h> 00018 #endif 00019 00020 #include <BALL/VIEW/UIC/ui_mainControlPreferences.h> 00021 00022 #include <QtGui/QWidget> 00023 #include <QtGui/QFont> 00024 00025 namespace BALL 00026 { 00027 namespace VIEW 00028 { 00029 00037 class BALL_VIEW_EXPORT MainControlPreferences 00038 : public QWidget, 00039 public Ui_MainControlPreferencesData, 00040 public PreferencesEntry 00041 { 00042 Q_OBJECT 00043 00044 public: 00045 00047 MainControlPreferences(QWidget *parent = NULL, const char *name = "MainControlPreferences", 00048 Qt::WFlags fl=0); 00049 00051 virtual ~MainControlPreferences(); 00052 00058 QStyle* setStyle(); 00059 00061 void enableLoggingToFile(bool state); 00062 00064 bool loggingToFileEnabled() const; 00065 00067 QFont getFont(); 00068 00069 bool getLanguageChanged() { 00070 return last_index_ != languageComboBox_->currentIndex(); 00071 } 00072 00073 void resetLanguageChanged() { 00074 last_index_ = languageComboBox_->currentIndex(); 00075 } 00076 00078 void writePreferenceEntries(INIFile& inifile); 00079 00081 void readPreferenceEntries(const INIFile& inifile); 00082 00083 public slots: 00084 00086 void selectFont(); 00087 00089 void setFont(QFont font); 00090 00091 protected: 00092 00093 QFont font_; 00094 int last_index_; 00095 }; 00096 00097 } } // namespace 00098 00099 #endif // BALL_VIEW_DIALOGS_MAINCONTROLPREFERENCES_H