designer/NullDateEditPlugin.h

Sat, 11 Feb 2023 15:48:02 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Sat, 11 Feb 2023 15:48:02 +0100
changeset 493
520306773450
parent 94
380b1331ad2e
permissions
-rw-r--r--

Monitor iSpindels: use global variables instead of repeated expensive MySQL calls. Use the yeast temperature ranges for the colors on the thermometer scale. Don't show SVG and ABV if the OG is not yet known. Turn statusfield red if offline. Extra mon_ispindles fields yeast_lo and yeast_hi. Need at least bmsd version 0.3.42. If a websocket message is received that cannot be parsed, show the whole received message.

94
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1 /*
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
2 * NullDateEditPlugin.h is part of bmsapp.
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
3 *
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
4 * bmsapp is free software: you can redistribute it and/or modify
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
5 * it under the terms of the GNU General Public License as published by
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
6 * the Free Software Foundation, either version 3 of the License, or
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
7 * (at your option) any later version.
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
8
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
9 * bmsapp is distributed in the hope that it will be useful,
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
12 * GNU General Public License for more details.
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
13
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
14 * You should have received a copy of the GNU General Public License
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
16 */
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
17
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
18 #ifndef _NULLDATEPLUGIN_H
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
19 #define _NULLDATEPLUGIN_H
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
20
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
21 #include <QObject>
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
22 #include <QString>
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
23 #include <QWidget>
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
24 #include <QIcon>
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
25 #include <QtUiPlugin/QDesignerCustomWidgetInterface>
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
26
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
27 class NullDateEditPlugin;
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
28
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
29 class NullDateEditPlugin : public QObject, public QDesignerCustomWidgetInterface
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
30 {
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
31 Q_OBJECT
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
32 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetCollectionInterface")
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
33 Q_INTERFACES(QDesignerCustomWidgetInterface)
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
34
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
35 public:
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
36 NullDateEditPlugin(QObject* parent = nullptr);
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
37
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
38 bool isContainer() const;
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
39 bool isInitialized() const;
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
40 QIcon icon() const;
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
41 QString domXml() const;
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
42 QString group() const;
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
43 QString includeFile() const;
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
44 QString name() const;
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
45 QString toolTip() const;
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
46 QString whatsThis() const;
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
47 QWidget *createWidget(QWidget *parent);
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
48 void initialize(QDesignerFormEditorInterface *core);
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
49
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
50 private:
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
51 bool initialized = false;
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
52 };
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
53
380b1331ad2e More progress in building designer plugins.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
54 #endif

mercurial