• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • krita API Reference
  • KDE Home
  • Contact Us
 

KritaWidgets

  • sources
  • kfour-appscomplete
  • krita
  • libs
  • widgets
kis_palette_view.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2016 Dmitry Kazakov <[email protected]>
3  * SPDX-FileCopyrightText: 2017 Wolthera van Hövell tot Westerflier <[email protected]>
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  */
7 
8 #ifndef __KIS_PALETTE_VIEW_H
9 #define __KIS_PALETTE_VIEW_H
10 
11 #include <QScopedPointer>
12 #include <QTableView>
13 #include <QColorDialog>
14 #include <QPushButton>
15 #include <QPixmap>
16 #include <QIcon>
17 
18 #include <KoColorSet.h>
19 #include "kritawidgets_export.h"
20 
21 #include <KisKineticScroller.h>
22 
23 class KisPaletteModel;
24 class QWheelEvent;
25 class KoColorDisplayRendererInterface;
26 
27 class KRITAWIDGETS_EXPORT KisPaletteView : public QTableView
28 {
29  Q_OBJECT
30 private:
31  static int MININUM_ROW_HEIGHT;
32 public:
33  explicit KisPaletteView(QWidget *parent = 0);
34  ~KisPaletteView() override;
35 
36  void setPaletteModel(KisPaletteModel *model);
37  KisPaletteModel* paletteModel() const;
38 
39 public:
40 
46  void setAllowModification(bool allow);
47 
48  void setDisplayRenderer(const KoColorDisplayRendererInterface *displayRenderer);
49 
56  void setCrossedKeyword(const QString &value);
57  void removeSelectedEntry();
63  void selectClosestColor(const KoColor &color);
64 
71  const KoColor closestColor(const KoColor& color) const;
72 
78  bool addEntryWithDialog(KoColor color);
84  bool removeEntryWithDialog(QModelIndex index);
90  bool addGroupWithDialog();
91 
92 Q_SIGNALS:
93  void sigIndexSelected(const QModelIndex &index);
94  void sigColorSelected(const KoColor &);
95 
96 public Q_SLOTS:
101  void slotFGColorChanged(const KoColor &);
102 
103  void slotScrollerStateChanged(QScroller::State state){KisKineticScroller::updateCursor(this, state);}
104 
105 private Q_SLOTS:
106  void slotHorizontalHeaderResized(int, int, int newSize);
107  void slotAdditionalGuiUpdate();
108  void slotCurrentSelectionChanged(const QModelIndex &newCurrent);
109 
110 private:
111  void resizeRows(int newSize);
112  void saveModification();
113 
114 private:
115  struct Private;
116  const QScopedPointer<Private> m_d;
117 };
118 
119 #endif /* __KIS_PALETTE_VIEW_H */
QWheelEvent
QTableView
QWidget
KisPaletteView::slotScrollerStateChanged
void slotScrollerStateChanged(QScroller::State state)
Definition: kis_palette_view.h:103
KisPaletteView
Definition: kis_palette_view.h:27
QString
KisPaletteModel
The KisPaletteModel class This, together with KisPaletteView and KisPaletteDelegate forms a mvc way t...
Definition: KisPaletteModel.h:28
QScopedPointer< Private >
Private
QModelIndex
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Jan 23 2021 11:48:22 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KritaWidgets

Skip menu "KritaWidgets"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

krita API Reference

Skip menu "krita API Reference"
  • libs
  •   KritaBasicFlakes
  •   brush
  •   KritaUndo2
  •   KritaFlake
  •   image
  •   KritaPlugin
  •   Krita
  •   KritaPigment
  •   KritaResources
  •   KritaStore
  •   ui
  •   KritaWidgets
  •   KritaWidgetUtils
  • plugins
  •   Assitants
  •   Extensions
  •   Filters
  •   Generators
  •   Formats
  •           src
  •   PaintOps
  •     libpaintop

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal