summaryrefslogtreecommitdiffstats
path: root/tools/qtconfig/paletteeditoradvanced.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qtconfig/paletteeditoradvanced.h')
-rw-r--r--tools/qtconfig/paletteeditoradvanced.h60
1 files changed, 25 insertions, 35 deletions
diff --git a/tools/qtconfig/paletteeditoradvanced.h b/tools/qtconfig/paletteeditoradvanced.h
index a1eb8e7..f70648b 100644
--- a/tools/qtconfig/paletteeditoradvanced.h
+++ b/tools/qtconfig/paletteeditoradvanced.h
@@ -42,69 +42,59 @@
#ifndef PALETTEEDITORADVANCED_H
#define PALETTEEDITORADVANCED_H
-#include "paletteeditoradvancedbase.h"
+#include "ui_paletteeditoradvanced.h"
QT_BEGIN_NAMESPACE
-class PaletteEditorAdvanced : public PaletteEditorAdvancedBase
+class ColorButton;
+
+class PaletteEditorAdvanced : public QDialog, public Ui::PaletteEditorAdvanced
{
Q_OBJECT
public:
- PaletteEditorAdvanced( QWidget * parent=0, const char * name=0,
- bool modal=false, Qt::WindowFlags f=0 );
+ PaletteEditorAdvanced(QWidget *parent = 0);
~PaletteEditorAdvanced();
- static QPalette getPalette( bool *ok, const QPalette &pal, Qt::BackgroundMode mode = Qt::PaletteBackground,
- QWidget* parent = 0, const char* name = 0 );
+ static QPalette getPalette( bool *ok, const QPalette &pal,
+ QPalette::ColorRole backgroundRole = QPalette::Window,
+ QWidget *parent = 0 );
+
+ static QPalette buildEffect(QPalette::ColorGroup colorGroup, const QPalette &basePalette);
protected slots:
void paletteSelected(int);
- void onCentral( int );
- void onEffect( int );
+ void onCentral(int);
+ void onEffect(int);
void onChooseCentralColor();
void onChooseEffectColor();
- void onToggleBuildEffects( bool );
- void onToggleBuildInactive( bool );
- void onToggleBuildDisabled( bool );
+ void onToggleBuildEffects(bool);
+ void onToggleBuildInactive(bool);
+ void onToggleBuildDisabled(bool);
protected:
- void mapToActiveCentralRole( const QColor& );
- void mapToActiveEffectRole( const QColor& );
- void mapToActivePixmapRole( const QPixmap& );
- void mapToInactiveCentralRole( const QColor& );
- void mapToInactiveEffectRole( const QColor& );
- void mapToInactivePixmapRole( const QPixmap& );
- void mapToDisabledCentralRole( const QColor& );
- void mapToDisabledEffectRole( const QColor& );
- void mapToDisabledPixmapRole( const QPixmap& );
-
-
- void buildPalette();
- void buildActiveEffect();
- void buildInactive();
- void buildInactiveEffect();
- void buildDisabled();
- void buildDisabledEffect();
+ void buildEffect(QPalette::ColorGroup);
+ void build(QPalette::ColorGroup);
private:
- void setPreviewPalette( const QPalette& );
void updateColorButtons();
- void setupBackgroundMode( Qt::BackgroundMode );
+ void setupBackgroundRole(QPalette::ColorRole);
QPalette pal() const;
- void setPal( const QPalette& );
+ void setPal(const QPalette &);
- QColorGroup::ColorRole centralFromItem( int );
- QColorGroup::ColorRole effectFromItem( int );
+ static QPalette::ColorGroup groupFromIndex(int);
+ static QPalette::ColorRole centralFromIndex(int);
+ static QPalette::ColorRole effectFromIndex(int);
QPalette editPalette;
- QPalette previewPalette;
int selectedPalette;
+ ColorButton *buttonCentral;
+ ColorButton *buttonEffect;
};
QT_END_NAMESPACE
-#endif
+#endif // PALETTEEDITORADVANCED_H