version 2.32.0
work with icons - remove unused, organize and update to last oxygen add BusyIcon widget
This commit is contained in:
66
libs/widgets/plugin/busy_iconplugin.cpp
Normal file
66
libs/widgets/plugin/busy_iconplugin.cpp
Normal file
@@ -0,0 +1,66 @@
|
||||
#include "busy_iconplugin.h"
|
||||
|
||||
#include "busy_icon.h"
|
||||
|
||||
#include <QtCore/QtPlugin>
|
||||
|
||||
|
||||
BusyIconPlugin::BusyIconPlugin(QObject * parent): QObject(parent) {
|
||||
m_initialized = false;
|
||||
}
|
||||
|
||||
|
||||
void BusyIconPlugin::initialize(QDesignerFormEditorInterface * /* core */) {
|
||||
if (m_initialized) return;
|
||||
m_initialized = true;
|
||||
}
|
||||
|
||||
|
||||
bool BusyIconPlugin::isInitialized() const {
|
||||
return m_initialized;
|
||||
}
|
||||
|
||||
|
||||
QWidget * BusyIconPlugin::createWidget(QWidget * parent) {
|
||||
return new BusyIcon(parent);
|
||||
}
|
||||
|
||||
|
||||
QString BusyIconPlugin::name() const {
|
||||
return QLatin1String("BusyIcon");
|
||||
}
|
||||
|
||||
|
||||
QString BusyIconPlugin::group() const {
|
||||
return QLatin1String("Display Widgets");
|
||||
}
|
||||
|
||||
|
||||
QIcon BusyIconPlugin::icon() const {
|
||||
return QIcon(":/icons/widgets/busy-icon.png");
|
||||
}
|
||||
|
||||
|
||||
QString BusyIconPlugin::toolTip() const {
|
||||
return QLatin1String("Busy indicator");
|
||||
}
|
||||
|
||||
|
||||
QString BusyIconPlugin::whatsThis() const {
|
||||
return QLatin1String("Busy indicator");
|
||||
}
|
||||
|
||||
|
||||
bool BusyIconPlugin::isContainer() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
QString BusyIconPlugin::domXml() const {
|
||||
return QLatin1String("<widget class=\"BusyIcon\" name=\"iconBusy\">\n</widget>\n");
|
||||
}
|
||||
|
||||
|
||||
QString BusyIconPlugin::includeFile() const {
|
||||
return QLatin1String("busy_icon.h");
|
||||
}
|
||||
36
libs/widgets/plugin/busy_iconplugin.h
Normal file
36
libs/widgets/plugin/busy_iconplugin.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef busy_iconplugin_H
|
||||
#define busy_iconplugin_H
|
||||
|
||||
#include <QObject>
|
||||
#if QT_VERSION >= 0x050000
|
||||
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#else
|
||||
# include <QDesignerCustomWidgetInterface>
|
||||
#endif
|
||||
|
||||
class BusyIconPlugin
|
||||
: public QObject
|
||||
, public QDesignerCustomWidgetInterface {
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
||||
|
||||
public:
|
||||
BusyIconPlugin(QObject * parent = 0);
|
||||
|
||||
bool isContainer() const;
|
||||
bool isInitialized() const;
|
||||
QIcon icon() const;
|
||||
QString domXml() const;
|
||||
QString group() const;
|
||||
QString includeFile() const;
|
||||
QString name() const;
|
||||
QString toolTip() const;
|
||||
QString whatsThis() const;
|
||||
QWidget * createWidget(QWidget * parent);
|
||||
void initialize(QDesignerFormEditorInterface * core);
|
||||
|
||||
private:
|
||||
bool m_initialized;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -40,7 +40,7 @@ QString CircleIndicatorPlugin::group() const {
|
||||
|
||||
|
||||
QIcon CircleIndicatorPlugin::icon() const {
|
||||
return QIcon(":/icons/circle-indicator.png");
|
||||
return QIcon(":/icons/widgets/circle-indicator.png");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ QString CLineEditPlugin::group() const {
|
||||
|
||||
|
||||
QIcon CLineEditPlugin::icon() const {
|
||||
return QIcon(":/icons/clineedit.png");
|
||||
return QIcon(":/icons/widgets/clineedit.png");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ QString ColorButtonPlugin::group() const {
|
||||
|
||||
|
||||
QIcon ColorButtonPlugin::icon() const {
|
||||
return QIcon(":/icons/colorbutton.png");
|
||||
return QIcon(":/icons/widgets/colorbutton.png");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ QString EComboBoxPlugin::group() const {
|
||||
|
||||
|
||||
QIcon EComboBoxPlugin::icon() const {
|
||||
return QIcon(":/icons/ecombobox.png");
|
||||
return QIcon(":/icons/widgets/ecombobox.png");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ QString EvalSpinBoxPlugin::group() const {
|
||||
|
||||
|
||||
QIcon EvalSpinBoxPlugin::icon() const {
|
||||
return QIcon(":/icons/evalspinbox.png");
|
||||
return QIcon(":/icons/widgets/evalspinbox.png");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ QString ImageViewPlugin::group() const {
|
||||
|
||||
|
||||
QIcon ImageViewPlugin::icon() const {
|
||||
return QIcon(":/icons/view-preview.png");
|
||||
return QIcon(":/icons/widgets/image-view.png");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ QString IconedLabelPlugin::group() const {
|
||||
|
||||
|
||||
QIcon IconedLabelPlugin::icon() const {
|
||||
return QIcon();
|
||||
return QIcon(":/icons/widgets/iconed-label.png");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "qad_widgets.h"
|
||||
|
||||
#include "busy_iconplugin.h"
|
||||
#include "circleindicatorplugin.h"
|
||||
#include "clineeditplugin.h"
|
||||
#include "colorbuttonplugin.h"
|
||||
@@ -42,7 +43,9 @@ QADWidgets::QADWidgets(QObject * parent): QObject(parent) {
|
||||
<< new ScrollSpinBoxPlugin(this)
|
||||
<< new RangeSliderPlugin(this)
|
||||
<< new StateIconPlugin(this)
|
||||
<< new CircleIndicatorPlugin(this);
|
||||
<< new CircleIndicatorPlugin(this)
|
||||
<< new BusyIconPlugin(this)
|
||||
;
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ QString QCodeEditPlugin::group() const {
|
||||
|
||||
|
||||
QIcon QCodeEditPlugin::icon() const {
|
||||
return QIcon(":/icons/qcodeedit.png");
|
||||
return QIcon(":/icons/widgets/qcodeedit.png");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ QString QPIConsolePlugin::group() const {
|
||||
|
||||
|
||||
QIcon QPIConsolePlugin::icon() const {
|
||||
return QIcon(":/icons/qpiconsole.png");
|
||||
return QIcon(":/icons/widgets/qpiconsole.png");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ QString QVariantEditPlugin::group() const {
|
||||
|
||||
|
||||
QIcon QVariantEditPlugin::icon() const {
|
||||
return QIcon(":/icons/qvariantedit.png");
|
||||
return QIcon(":/icons/widgets/qvariantedit.png");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ QString ScrollSpinBoxPlugin::group() const {
|
||||
|
||||
|
||||
QIcon ScrollSpinBoxPlugin::icon() const {
|
||||
return QIcon(":/icons/scroll_spin.png");
|
||||
return QIcon(":/icons/widgets/scrollspin.png");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ QString SpinSliderPlugin::group() const {
|
||||
|
||||
|
||||
QIcon SpinSliderPlugin::icon() const {
|
||||
return QIcon(":/icons/spinslider.png");
|
||||
return QIcon(":/icons/widgets/spinslider.png");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ QString StateIconPlugin::group() const {
|
||||
|
||||
|
||||
QIcon StateIconPlugin::icon() const {
|
||||
return QIcon(":/icons/led_on.png");
|
||||
return QIcon(":/icons/widgets/status-icon.png");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user