summaryrefslogtreecommitdiffstats
path: root/tools/qtconfig/paletteeditoradvanced.h
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-02-28 17:42:06 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2011-02-28 18:07:41 (GMT)
commit5fe25728c0ebb04c3fd2958d902cc58d2064b84d (patch)
tree12623614b0c2fbbf483e842235731956dd649ad7 /tools/qtconfig/paletteeditoradvanced.h
parent74c683c6879dea1cb4eaa99aaf61e16524b8a4a1 (diff)
downloadQt-5fe25728c0ebb04c3fd2958d902cc58d2064b84d.zip
Qt-5fe25728c0ebb04c3fd2958d902cc58d2064b84d.tar.gz
Qt-5fe25728c0ebb04c3fd2958d902cc58d2064b84d.tar.bz2
Remove qt3support dependency of qtconfig
Revert "Revert the integration of the merge request 2286." This reverts commit e3edad83a1e6e99a551d40d4118352435c6dd710. This had been submitted in the Qt 4.7, but reverted because the change was to intrusive to be pushed in a stable branch. Now re-apply the change in master. Conflicts: tools/qtconfig/mainwindowbase.cpp tools/qtconfig/mainwindowbase.h tools/qtconfig/paletteeditoradvancedbase.cpp tools/qtconfig/paletteeditoradvancedbase.h tools/qtconfig/paletteeditoradvancedbase.ui tools/qtconfig/previewwidgetbase.cpp tools/qtconfig/previewwidgetbase.h tools/qtconfig/previewwidgetbase.ui tools/tools.pro
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