code format
This commit is contained in:
@@ -1,39 +1,40 @@
|
||||
/*
|
||||
QAD - Qt ADvanced
|
||||
QAD - Qt ADvanced
|
||||
|
||||
Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru
|
||||
Ivan Pelipenko peri4ko@yandex.ru, Andrey Bychkov work.a.b@yandex.ru
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef COLORBUTTON_H
|
||||
#define COLORBUTTON_H
|
||||
|
||||
#include "qad_widgets_export.h"
|
||||
|
||||
#include <QPushButton>
|
||||
|
||||
|
||||
class QFrame;
|
||||
|
||||
|
||||
class QAD_WIDGETS_EXPORT ColorButton: public QPushButton
|
||||
{
|
||||
class QAD_WIDGETS_EXPORT ColorButton: public QPushButton {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QColor color READ color WRITE setColor)
|
||||
Q_PROPERTY(bool useNativeDialog READ useNativeDialog WRITE setUseNativeDialog)
|
||||
Q_PROPERTY(bool useAlphaChannel READ useAlphaChannel WRITE setUseAlphaChannel)
|
||||
Q_PROPERTY(bool frameOnly READ frameOnly WRITE setFrameOnly)
|
||||
|
||||
public:
|
||||
explicit ColorButton(QWidget * parent = nullptr);
|
||||
~ColorButton() override;
|
||||
@@ -41,7 +42,7 @@ public:
|
||||
QColor color() const;
|
||||
bool useNativeDialog() const;
|
||||
bool useAlphaChannel() const;
|
||||
bool frameOnly() const {return frame;}
|
||||
bool frameOnly() const { return frame; }
|
||||
|
||||
public slots:
|
||||
void setColor(const QColor & col);
|
||||
@@ -64,11 +65,11 @@ private:
|
||||
void resizeEvent(QResizeEvent *) override;
|
||||
void dragEnterEvent(QDragEnterEvent * e) override;
|
||||
void dropEvent(QDropEvent * e) override;
|
||||
void changeEvent(QEvent *e) override;
|
||||
void changeEvent(QEvent * e) override;
|
||||
|
||||
QFrame * label;
|
||||
QWidget * back;
|
||||
QAction * a_copy, * a_paste, * a_mix;
|
||||
QAction *a_copy, *a_paste, *a_mix;
|
||||
QPalette pal;
|
||||
QPoint pp;
|
||||
QMenu * menu;
|
||||
|
||||
Reference in New Issue
Block a user