feat: 添加ElaWidgetTool库
This commit is contained in:
29
ElaWidgetTools/ElaColorDialog.h
Normal file
29
ElaWidgetTools/ElaColorDialog.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef ELACOLORDIALOG_H
|
||||
#define ELACOLORDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
#include "ElaAppBar.h"
|
||||
#include "ElaProperty.h"
|
||||
class ElaColorDialogPrivate;
|
||||
class ELA_EXPORT ElaColorDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_Q_CREATE(ElaColorDialog)
|
||||
Q_PROPERTY_CREATE_Q_H(QColor, CurrentColor)
|
||||
Q_TAKEOVER_NATIVEEVENT_H
|
||||
public:
|
||||
explicit ElaColorDialog(QWidget* parent = nullptr);
|
||||
~ElaColorDialog() override;
|
||||
|
||||
QList<QColor> getCustomColorList() const;
|
||||
QColor getCustomColor(int index) const;
|
||||
QString getCurrentColorRGB() const;
|
||||
Q_SIGNALS:
|
||||
Q_SIGNAL void colorSelected(const QColor& color);
|
||||
|
||||
protected:
|
||||
virtual void paintEvent(QPaintEvent* event) override;
|
||||
};
|
||||
|
||||
#endif // ELACOLORDIALOG_H
|
||||
Reference in New Issue
Block a user