diff options
author | Michele Calgaro <[email protected]> | 2020-06-13 22:45:28 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2020-06-13 22:45:28 +0900 |
commit | 5f44f7b187093ef290315b7f8766b540a31de35f (patch) | |
tree | 27ffb7b218199ca04f240c390c52426c65f45dce /src/app/xineConfig.h | |
download | codeine-5f44f7b187093ef290315b7f8766b540a31de35f.tar.gz codeine-5f44f7b187093ef290315b7f8766b540a31de35f.zip |
Initial code import from debian snapshot
https://snapshot.debian.org/package/codeine/1.0.1-3.dfsg-3.1/
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'src/app/xineConfig.h')
-rw-r--r-- | src/app/xineConfig.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/src/app/xineConfig.h b/src/app/xineConfig.h new file mode 100644 index 0000000..d7999d5 --- /dev/null +++ b/src/app/xineConfig.h @@ -0,0 +1,69 @@ +// (C) 2005 Max Howell ([email protected]) +// See COPYING file for licensing information + +#ifndef XINECONFIG_H +#define XINECONFIG_H + +#include <kdialogbase.h> +#include <qptrlist.h> + +class KComboBox; +class KLineEdit; +class QCheckBox; +class QGridLayout; +class QSpinBox; + +typedef struct xine_s xine_t; +typedef struct xine_cfg_entry_s xine_cfg_entry_t; + + +///stores a single config entry of the config file + +class XineConfigEntry : public QObject +{ + enum ClassType { LineEdit, ComboBox, SpinBox, CheckBox }; + + QWidget *m_widget; + QCString m_key; + QCString m_string; + int m_number; + + static inline ClassType classType( const QCString &name ) + { + return name == "KLineEdit" ? LineEdit + : name == "KComboBox" ? ComboBox + : name == "QSpinBox" ? SpinBox : CheckBox; + } + +public: + XineConfigEntry( QWidget *parent, QGridLayout*, xine_cfg_entry_t* ); + + bool isChanged() const; + void save( xine_t* ); + void reset(); + + inline const QCString &key() const { return m_key; } +}; + + +class XineConfigDialog : public KDialogBase +{ + static KDialogBase *s_instance; + + QPtrList<XineConfigEntry> m_entrys; + xine_t *m_xine; + +public: + XineConfigDialog( xine_t *xine, QWidget *parent ); + + bool isUnsavedSettings() const; + void saveSettings(); + + static KDialogBase *instance() { return s_instance; } + +protected: + virtual void slotUser1(); + virtual void slotHelp(); +}; + +#endif |