API Documentation
Loading...
Searching...
No Matches
QCustomColorDialog.h
Go to the documentation of this file.
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/Buffer.h>
4#include <QDialog>
5#include <QColorDialog>
6#include <QSpinBox>
7#include <QPointer>
8#include <QVBoxLayout>
9#include <QLabel>
10#include <QWindow>
11class QDialogButtonBox;
12namespace NDEVR
13{
14 class QColorPickingEventFilter;
15 class QCustomColorDialogPrivate;
16 class QCustomLabel;
17 /**--------------------------------------------------------------------------------------------------
18 \brief A dialog devoted to allowing the user to select a custom color
19 *-----------------------------------------------------------------------------------------------**/
21 {
22 Q_OBJECT
23 Q_PROPERTY(QColor currentColor READ currentColor WRITE setCurrentColor NOTIFY currentColorChanged)
24 Q_PROPERTY(QColorDialog::ColorDialogOptions options READ options WRITE setOptions)
25 public:
26 explicit QCustomColorDialog(QWidget* parent = nullptr);
27 explicit QCustomColorDialog(const QColor& initial, QWidget* parent = nullptr);
28 explicit QCustomColorDialog(bool is_small, QWidget* parent = nullptr);
30 void setCurrentColor(const QColor& color);
31 QColor currentColor() const;
32 QColor selectedColor() const;
33 void setOption(QColorDialog::ColorDialogOption option, bool on = true);
34 bool testOption(QColorDialog::ColorDialogOption option) const;
35 void setOptions(QColorDialog::ColorDialogOptions options);
36 void setSmallDisplay(bool small_display);
37 QColorDialog::ColorDialogOptions options() const;
38 //using QDialog::open;
39 void open(QObject* receiver, const char* member);
40 void setVisible(bool visible) override;
41 //static QColor getColor(const QColor& initial = Qt::white, QWidget* parent = nullptr, const QString& title = QString(), QColorDialog::ColorDialogOptions options = QColorDialog::ColorDialogOptions());
42 static int customCount();
43 static QColor customColor(int index);
44 static void setCustomColor(int index, QColor color);
45 static QColor standardColor(int index);
46 static void setStandardColor(int index, QColor color);
47 static Buffer<QColor> CustomColors();
48 static Buffer<QColor> Colors(int count);
49 Q_SIGNALS:
50 void currentColorEdited(const QColor& color);
51 void currentColorChanged(const QColor& color);
52 void colorSelected(const QColor& color);
53 void finishedSignal();
54 protected:
55 void changeEvent(QEvent* event) override;
56 //void done(int result) override;
57 private:
58 QCustomColorDialogPrivate* d;
59 };
60}
#define NDEVR_WIDGETS_API
Definition DLLInfo.h:81
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:59
A dialog devoted to allowing the user to select a custom color.
Definition QCustomColorDialog.h:21
Definition ACIColor.h:37