Loading...
Searching...
No Matches
mainControlPreferences.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_VIEW_DIALOGS_MAINCONTROLPREFERENCES_H
#define BALL_VIEW_DIALOGS_MAINCONTROLPREFERENCES_H
#ifndef BALL_COMMON_GLOBAL_H
# include <BALL/COMMON/global.h>
#endif
#ifndef BALL_FORMAT_INIFILE_H
# include <BALL/FORMAT/INIFile.h>
#endif
#ifndef BALL_VIEW_KERNEL_PREFERENCESENTRY
# include <BALL/VIEW/KERNEL/preferencesEntry.h>
#endif
#include <BALL/VIEW/UIC/ui_mainControlPreferences.h>
#include <QtWidgets/QWidget>
#include <QtGui/QFont>
namespace BALL
{
namespace VIEW
{
class BALL_VIEW_EXPORT MainControlPreferences
: public QWidget,
public Ui_MainControlPreferencesData,
public PreferencesEntry
{
Q_OBJECT
public:
MainControlPreferences(QWidget *parent = NULL, const char *name = "MainControlPreferences",
Qt::WindowFlags fl=0);
virtual ~MainControlPreferences();
QStyle* setStyle();
void enableLoggingToFile(bool state);
bool loggingToFileEnabled() const;
bool getSkipDriverChecks() const;
QFont getFont();
bool getLanguageChanged() {
return last_index_ != languageComboBox_->currentIndex();
}
void resetLanguageChanged() {
last_index_ = languageComboBox_->currentIndex();
}
void writePreferenceEntries(INIFile& inifile);
void readPreferenceEntries(const INIFile& inifile);
public Q_SLOTS:
void selectFont();
void setFont(QFont font);
protected:
QFont font_;
int last_index_;
};
} } // namespace
#endif // BALL_VIEW_DIALOGS_MAINCONTROLPREFERENCES_H
global.h
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition COMMON/global.h:52
INIFile.h
BALL::INIFile
Definition INIFile.h:29
BALL::VIEW::MainControlPreferences::loggingToFileEnabled
bool loggingToFileEnabled() const
BALL::VIEW::MainControlPreferences::writePreferenceEntries
void writePreferenceEntries(INIFile &inifile)
Store the settings of all registered objects.
BALL::VIEW::MainControlPreferences::getLanguageChanged
bool getLanguageChanged()
Definition mainControlPreferences.h:72
BALL::VIEW::MainControlPreferences::setFont
void setFont(QFont font)
Set the application's default font.
BALL::VIEW::MainControlPreferences::MainControlPreferences
MainControlPreferences(QWidget *parent=NULL, const char *name="MainControlPreferences", Qt::WindowFlags fl=0)
Default Constructor.
BALL::VIEW::MainControlPreferences::enableLoggingToFile
void enableLoggingToFile(bool state)
Enable logging to file.
BALL::VIEW::MainControlPreferences::getSkipDriverChecks
bool getSkipDriverChecks() const
BALL::VIEW::MainControlPreferences::setStyle
QStyle * setStyle()
BALL::VIEW::MainControlPreferences::selectFont
void selectFont()
Get the application's default font.
BALL::VIEW::MainControlPreferences::readPreferenceEntries
void readPreferenceEntries(const INIFile &inifile)
Restore the settings of all registered objects.
BALL::VIEW::MainControlPreferences::getFont
QFont getFont()
BALL::VIEW::MainControlPreferences::resetLanguageChanged
void resetLanguageChanged()
Definition mainControlPreferences.h:76
BALL::VIEW::MainControlPreferences::font_
QFont font_
Definition mainControlPreferences.h:96
BALL::VIEW::MainControlPreferences::~MainControlPreferences
virtual ~MainControlPreferences()
BALL::VIEW::MainControlPreferences::last_index_
int last_index_
Definition mainControlPreferences.h:97
BALL::VIEW::PreferencesEntry::PreferencesEntry
PreferencesEntry()
QWidget
BALL::VIEW
Definition constraints.h:35
BALL
Definition constants.h:13
preferencesEntry.h