diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2 (patch) | |
tree | d3bb9f5d25a2dc09ca81adecf39621d871534297 /ktouch/src/ktouchcoloreditor.h | |
download | tdeedu-ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2.tar.gz tdeedu-ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ktouch/src/ktouchcoloreditor.h')
-rw-r--r-- | ktouch/src/ktouchcoloreditor.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/ktouch/src/ktouchcoloreditor.h b/ktouch/src/ktouchcoloreditor.h new file mode 100644 index 00000000..3d5a0e11 --- /dev/null +++ b/ktouch/src/ktouchcoloreditor.h @@ -0,0 +1,65 @@ +/*************************************************************************** + * ktouchcoloreditor.h * + * ------------------- * + * Copyright (C) 20064 by Andreas Nicolai * + * ghorwin@users.sourceforge.net * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + ***************************************************************************/ + +#ifndef KTOUCHCOLOREDITOR_H +#define KTOUCHCOLOREDITOR_H + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include "ktouchcoloreditor_dlg.h" + +#include <qvaluelist.h> + +#include "ktouchcolorscheme.h" + +/// Implementation of the KTouch Color Scheme Editor. +class KTouchColorEditor : public KTouchColorEditorDlg +{ + Q_OBJECT + +public: + /// Constructor + KTouchColorEditor(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + /// Destructor + ~KTouchColorEditor(); + + /// Use this function to run the dialog. + /// @param schemes List with user defined color schemes. + /// @param active Index with active color scheme (negative if predefined scheme is active). + /// @param selected Here the index of the currently selected scheme is stored. + void startEditor(QValueList<KTouchColorScheme>& schemes, int active, int & selected); + +public slots: + virtual void colorSchemeChanged(QListBoxItem * item); + virtual void updateClicked(); + virtual void removeBtnClicked(); + virtual void addBtnClicked(); + +protected: + virtual void closeEvent( QCloseEvent* ce ); + +private: + /// Updates the list box with values from m_schemes. + void updateListBox(); + /// Updates the button controls with data from 'cs', unless NULL is passed, in which case + /// the controls are disabled (no-color-scheme-selected state). + void updateControls(const KTouchColorScheme * cs); + + int m_currentItem; + QValueList<KTouchColorScheme> m_schemes; + bool m_saveChanges; +}; + +#endif // KTOUCHCOLOREDITOR_H + |