krita
kis_palette_view.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __KIS_PALETTE_VIEW_H__
00021 #define __KIS_PALETTE_VIEW_H__
00022
00023 #include <qscrollview.h>
00024 #include "kis_palette.h"
00025
00026 class KListBox;
00027 class KisPalette;
00028 class KColorCells;
00029 class KisResource;
00030 class KisColor;
00031
00035 class KisPaletteView : public QScrollView
00036 {
00037 Q_OBJECT
00038 public:
00039 KisPaletteView(QWidget *parent, const char* name = 0, int minWidth=210, int cols = 16);
00040 virtual ~KisPaletteView();
00041
00042 KisPalette* palette() const;
00044 KisPaletteEntry currentEntry() const { return m_currentEntry; }
00045
00046 public slots:
00047 void setPalette(KisPalette* p);
00048
00049 signals:
00050 void colorSelected(const KisColor &);
00051 void colorSelected(const QColor &);
00052 void colorDoubleClicked(const KisColor &, const QString &);
00053
00054 protected slots:
00055 void slotColorCellSelected( int );
00056 void slotColorCellDoubleClicked( int );
00057
00058 protected:
00059 KisPalette* m_currentPalette;
00060 KColorCells* m_cells;
00061 KisPaletteEntry m_currentEntry;
00062 int mMinWidth;
00063 int mCols;
00064
00065 friend class KisPaletteWidget;
00066 };
00067
00068 #endif
00069
|