summaryrefslogtreecommitdiffstats
path: root/tools/qtconfig/paletteeditoradvanced.h
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-03-15 17:44:28 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2011-03-15 17:44:35 (GMT)
commitad0f3996a9674def59766726db34191844d2af0a (patch)
treed029eeb8b988786a8859f98455e5bc3d9651cb80 /tools/qtconfig/paletteeditoradvanced.h
parentc0cd8db0498daaa8151d1f80143b6849016bdc7c (diff)
parent5e47ee6a97f54f1cdac577f76cd338b40e624f32 (diff)
downloadQt-ad0f3996a9674def59766726db34191844d2af0a.zip
Qt-ad0f3996a9674def59766726db34191844d2af0a.tar.gz
Qt-ad0f3996a9674def59766726db34191844d2af0a.tar.bz2
Merge earth-team into master
Diffstat (limited to 'tools/qtconfig/paletteeditoradvanced.h')
-rw-r--r--tools/qtconfig/paletteeditoradvanced.h66
1 files changed, 31 insertions, 35 deletions
diff --git a/tools/qtconfig/paletteeditoradvanced.h b/tools/qtconfig/paletteeditoradvanced.h
index 83bcebb..4f61676 100644
--- a/tools/qtconfig/paletteeditoradvanced.h
+++ b/tools/qtconfig/paletteeditoradvanced.h
@@ -42,69 +42,65 @@
#ifndef PALETTEEDITORADVANCED_H
#define PALETTEEDITORADVANCED_H
-#include "paletteeditoradvancedbase.h"
+#include <QtGui/QDialog>
QT_BEGIN_NAMESPACE
-class PaletteEditorAdvanced : public PaletteEditorAdvancedBase
+namespace Ui {
+ class PaletteEditorAdvanced;
+}
+
+class ColorButton;
+
+class PaletteEditorAdvanced : public QDialog
{
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;
+
+ Ui::PaletteEditorAdvanced *ui;
int selectedPalette;
+ ColorButton *buttonCentral;
+ ColorButton *buttonEffect;
};
QT_END_NAMESPACE
-#endif
+#endif // PALETTEEDITORADVANCED_H