code format

This commit is contained in:
2022-12-14 14:14:33 +03:00
parent 09e5342956
commit cdb02fc9be
278 changed files with 15371 additions and 12176 deletions

View File

@@ -1,5 +1,7 @@
#include "graphic.h"
#include "graphicplugin.h"
#include "graphic.h"
#include <QtCore/QtPlugin>
@@ -10,8 +12,7 @@ GraphicPlugin::GraphicPlugin(QObject * parent): QObject(parent) {
void GraphicPlugin::initialize(QDesignerFormEditorInterface * /* core */) {
m_designer = true;
if (m_initialized)
return;
if (m_initialized) return;
// Add extension registrations, etc. here
@@ -26,8 +27,7 @@ bool GraphicPlugin::isInitialized() const {
QWidget * GraphicPlugin::createWidget(QWidget * parent) {
auto ret = new Graphic(parent);
if (m_designer)
ret->m_fakeGL = true;
if (m_designer) ret->m_fakeGL = true;
return ret;
}
@@ -48,7 +48,7 @@ QIcon GraphicPlugin::icon() const {
QString GraphicPlugin::toolTip() const {
return QLatin1String("");//QLatin1String("Widget for display any math graphics with grid and navigation");
return QLatin1String(""); // QLatin1String("Widget for display any math graphics with grid and navigation");
}
@@ -70,4 +70,3 @@ QString GraphicPlugin::domXml() const {
QString GraphicPlugin::includeFile() const {
return QLatin1String("graphic.h");
}

View File

@@ -8,8 +8,9 @@
# include <QDesignerCustomWidgetInterface>
#endif
class GraphicPlugin: public QObject, public QDesignerCustomWidgetInterface
{
class GraphicPlugin
: public QObject
, public QDesignerCustomWidgetInterface {
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
@@ -30,7 +31,6 @@ public:
private:
bool m_initialized, m_designer;
};
#endif

View File

@@ -1,13 +1,13 @@
#include "qad_graphic.h"
#include "graphicplugin.h"
QADGraphic::QADGraphic(QObject * parent): QObject(parent)
{
QADGraphic::QADGraphic(QObject * parent): QObject(parent) {
m_widgets.append(new GraphicPlugin(this));
}
QList<QDesignerCustomWidgetInterface * > QADGraphic::customWidgets() const {
QList<QDesignerCustomWidgetInterface *> QADGraphic::customWidgets() const {
return m_widgets;
}

View File

@@ -1,23 +1,24 @@
#ifndef QAD_GRAPHIC_H
#define QAD_GRAPHIC_H
#include <QtDesigner/QtDesigner>
#include <QtCore/qplugin.h>
#include <QtDesigner/QtDesigner>
class QADGraphic: public QObject, public QDesignerCustomWidgetCollectionInterface
{
class QADGraphic
: public QObject
, public QDesignerCustomWidgetCollectionInterface {
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
#if QT_VERSION >= 0x050000
Q_PLUGIN_METADATA(IID "qad.graphic")
#endif
public:
explicit QADGraphic(QObject * parent = 0);
virtual QList<QDesignerCustomWidgetInterface * > customWidgets() const;
virtual QList<QDesignerCustomWidgetInterface *> customWidgets() const;
private:
QList<QDesignerCustomWidgetInterface * > m_widgets;
QList<QDesignerCustomWidgetInterface *> m_widgets;
};
#endif // QAD_GRAPHIC_H