BALL  1.5.0
mainControlPreferences.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_VIEW_DIALOGS_MAINCONTROLPREFERENCES_H
6 #define BALL_VIEW_DIALOGS_MAINCONTROLPREFERENCES_H
7 
8 #ifndef BALL_COMMON_GLOBAL_H
9 # include <BALL/COMMON/global.h>
10 #endif
11 
12 #ifndef BALL_FORMAT_INIFILE_H
13 # include <BALL/FORMAT/INIFile.h>
14 #endif
15 
16 #ifndef BALL_VIEW_KERNEL_PREFERENCESENTRY
18 #endif
19 
20 #include <BALL/VIEW/UIC/ui_mainControlPreferences.h>
21 
22 #include <QtWidgets/QWidget>
23 #include <QtGui/QFont>
24 
25 namespace BALL
26 {
27  namespace VIEW
28  {
29 
38  : public QWidget,
39  public Ui_MainControlPreferencesData,
40  public PreferencesEntry
41 {
42  Q_OBJECT
43 
44  public:
45 
47  MainControlPreferences(QWidget *parent = NULL, const char *name = "MainControlPreferences",
48  Qt::WindowFlags fl=0);
49 
52 
58  QStyle* setStyle();
59 
61  void enableLoggingToFile(bool state);
62 
64  bool loggingToFileEnabled() const;
65 
67  bool getSkipDriverChecks() const;
68 
70  QFont getFont();
71 
73  return last_index_ != languageComboBox_->currentIndex();
74  }
75 
77  last_index_ = languageComboBox_->currentIndex();
78  }
79 
82 
84  void readPreferenceEntries(const INIFile& inifile);
85 
86  public Q_SLOTS:
87 
89  void selectFont();
90 
92  void setFont(QFont font);
93 
94  protected:
95 
96  QFont font_;
98 };
99 
100 } } // namespace
101 
102 #endif // BALL_VIEW_DIALOGS_MAINCONTROLPREFERENCES_H
global.h
BALL::VIEW::MainControlPreferences::readPreferenceEntries
void readPreferenceEntries(const INIFile &inifile)
Restore the settings of all registered objects.
BALL::VIEW::MainControlPreferences::~MainControlPreferences
virtual ~MainControlPreferences()
BALL::VIEW::MainControlPreferences::getFont
QFont getFont()
BALL::VIEW::MainControlPreferences::MainControlPreferences
MainControlPreferences(QWidget *parent=NULL, const char *name="MainControlPreferences", Qt::WindowFlags fl=0)
Default Constructor.
BALL::VIEW::MainControlPreferences
Definition: mainControlPreferences.h:41
BALL::VIEW::MainControlPreferences::resetLanguageChanged
void resetLanguageChanged()
Definition: mainControlPreferences.h:76
BALL::VIEW::PreferencesEntry
Definition: preferencesEntry.h:69
BALL::VIEW::MainControlPreferences::selectFont
void selectFont()
Get the application's default font.
BALL
Definition: constants.h:13
QWidget
BALL::VIEW::MainControlPreferences::writePreferenceEntries
void writePreferenceEntries(INIFile &inifile)
Store the settings of all registered objects.
BALL::VIEW::MainControlPreferences::getSkipDriverChecks
bool getSkipDriverChecks() const
BALL::VIEW::MainControlPreferences::font_
QFont font_
Definition: mainControlPreferences.h:96
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52
BALL::VIEW::MainControlPreferences::last_index_
int last_index_
Definition: mainControlPreferences.h:97
BALL::VIEW::MainControlPreferences::setStyle
QStyle * setStyle()
BALL::INIFile
Definition: INIFile.h:29
preferencesEntry.h
INIFile.h
BALL::VIEW::MainControlPreferences::setFont
void setFont(QFont font)
Set the application's default font.
BALL::VIEW::MainControlPreferences::enableLoggingToFile
void enableLoggingToFile(bool state)
Enable logging to file.
BALL::VIEW::MainControlPreferences::getLanguageChanged
bool getLanguageChanged()
Definition: mainControlPreferences.h:72
BALL::VIEW::MainControlPreferences::loggingToFileEnabled
bool loggingToFileEnabled() const