From ce599e4f9f94b4eb00c1b5edb85bce5431ab3df2 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: 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 --- ktouch/src/ktouchcoloreditor.h | 65 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 ktouch/src/ktouchcoloreditor.h (limited to 'ktouch/src/ktouchcoloreditor.h') 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 +#endif + +#include "ktouchcoloreditor_dlg.h" + +#include + +#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& 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 m_schemes; + bool m_saveChanges; +}; + +#endif // KTOUCHCOLOREDITOR_H + -- cgit v1.2.1