blob: ce532d6ad8ef6d5a0862f1c9e6c4622fa917c8e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
/***************************************************************************
* 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 <tqvaluelist.h>
#include "ktouchcolorscheme.h"
/// Implementation of the KTouch Color Scheme Editor.
class KTouchColorEditor : public KTouchColorEditorDlg
{
Q_OBJECT
TQ_OBJECT
public:
/// Constructor
KTouchColorEditor(TQWidget* tqparent = 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(TQValueList<KTouchColorScheme>& schemes, int active, int & selected);
public slots:
virtual void colorSchemeChanged(TQListBoxItem * item);
virtual void updateClicked();
virtual void removeBtnClicked();
virtual void addBtnClicked();
protected:
virtual void closeEvent( TQCloseEvent* 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;
TQValueList<KTouchColorScheme> m_schemes;
bool m_saveChanges;
};
#endif // KTOUCHCOLOREDITOR_H
|