Add files from zip

This commit is contained in:
2023-10-31 09:22:42 +01:00
parent 6bacdc5f6d
commit 4dae68036f
2788 changed files with 492537 additions and 0 deletions

130
designer/designer.pro Normal file
View File

@@ -0,0 +1,130 @@
################################################################
# Qwt Widget Library
# Copyright (C) 1997 Josef Wilgen
# Copyright (C) 2002 Uwe Rathmann
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the Qwt License, Version 1.0
################################################################
QWT_ROOT = $${PWD}/..
QWT_OUT_ROOT = $${OUT_PWD}/..
include ( $${QWT_ROOT}/qwtconfig.pri )
include ( $${QWT_ROOT}/qwtbuild.pri )
include ( $${QWT_ROOT}/qwtfunctions.pri )
CONFIG( debug_and_release ) {
# When building debug_and_release the designer plugin is built
# for release only. If you want to have a debug version it has to be
# done with "CONFIG += debug" only.
message("debug_and_release: building the Qwt designer plugin in release mode only")
CONFIG -= debug_and_release
CONFIG += release
}
contains(QWT_CONFIG, QwtDesigner ) {
greaterThan(QT_MAJOR_VERSION, 4) {
!qtHaveModule(designer) QWT_CONFIG -= QwtDesigner
} else {
!exists( $(QTDIR)/include/QtDesigner ) QWT_CONFIG -= QwtDesigner
}
!contains(QWT_CONFIG, QwtDesigner ) {
warning("QwtDesigner is enabled in qwtconfig.pri, but Qt has not been built with designer support")
}
}
contains(QWT_CONFIG, QwtDesigner) {
CONFIG += qt plugin
greaterThan(QT_MAJOR_VERSION, 4) {
QT += designer
}
else {
CONFIG += designer
}
TEMPLATE = lib
TARGET = qwt_designer_plugin
DESTDIR = plugins/designer
INCLUDEPATH += $${QWT_ROOT}/src
DEPENDPATH += $${QWT_ROOT}/src
contains(QWT_CONFIG, QwtDll) {
contains(QWT_CONFIG, QwtDesignerSelfContained) {
QWT_CONFIG += include_src
}
} else {
# for linking against a static library the
# plugin will be self contained anyway
}
contains(QWT_CONFIG, include_src) {
# compile all qwt classes into the plugin
include ( $${QWT_ROOT}/src/src.pri )
for( header, HEADERS) {
QWT_HEADERS += $${QWT_ROOT}/src/$${header}
}
for( source, SOURCES ) {
QWT_SOURCES += $${QWT_ROOT}/src/$${source}
}
HEADERS = $${QWT_HEADERS}
SOURCES = $${QWT_SOURCES}
} else {
# compile the path for finding the Qwt library
# into the plugin. Not supported on Windows !
QMAKE_RPATHDIR *= $${QWT_INSTALL_LIBS}
qwtAddLibrary($${QWT_OUT_ROOT}/lib, qwt)
contains(QWT_CONFIG, QwtDll) {
DEFINES += QT_DLL QWT_DLL
}
}
!contains(QWT_CONFIG, QwtPlot) {
DEFINES += NO_QWT_PLOT
}
!contains(QWT_CONFIG, QwtPolar) {
DEFINES += NO_QWT_POLAR
}
!contains(QWT_CONFIG, QwtWidgets) {
DEFINES += NO_QWT_WIDGETS
}
SOURCES += qwt_designer_plugin.cpp
RESOURCES += qwt_designer_plugin.qrc
target.path = $${QWT_INSTALL_PLUGINS}
INSTALLS += target
}
else {
TEMPLATE = subdirs # do nothing
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 543 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 992 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 807 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 543 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,540 @@
/******************************************************************************
* Qwt Widget Library
* Copyright (C) 1997 Josef Wilgen
* Copyright (C) 2002 Uwe Rathmann
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the Qwt License, Version 1.0
*****************************************************************************/
#include <qglobal.h>
#include <QtPlugin>
#if QT_VERSION >= 0x050600
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
#else
#include <QDesignerCustomWidgetInterface>
#endif
#ifndef NO_QWT_PLOT
#include "qwt_plot.h"
#include "qwt_scale_widget.h"
#endif
#ifndef NO_QWT_WIDGETS
#include "qwt_counter.h"
#include "qwt_wheel.h"
#include "qwt_thermo.h"
#include "qwt_knob.h"
#include "qwt_slider.h"
#include "qwt_dial.h"
#include "qwt_dial_needle.h"
#include "qwt_analog_clock.h"
#include "qwt_compass.h"
#endif
#ifndef NO_QWT_POLAR
#include "qwt_polar_plot.h"
#endif
#include "qwt_text_label.h"
namespace
{
class CustomWidgetInterface : public QDesignerCustomWidgetInterface
{
public:
virtual QString group() const QWT_OVERRIDE { return "Qwt Widgets"; }
virtual bool isContainer() const QWT_OVERRIDE { return false; }
virtual bool isInitialized() const QWT_OVERRIDE { return true; }
virtual QIcon icon() const QWT_OVERRIDE { return m_icon; }
virtual QString codeTemplate() const QWT_OVERRIDE { return m_codeTemplate; }
virtual QString domXml() const QWT_OVERRIDE { return m_domXml; }
virtual QString includeFile() const QWT_OVERRIDE { return m_include; }
virtual QString name() const QWT_OVERRIDE { return m_name; }
virtual QString toolTip() const { return m_toolTip; }
virtual QString whatsThis() const QWT_OVERRIDE { return m_whatsThis; }
protected:
QString m_name;
QString m_include;
QString m_toolTip;
QString m_whatsThis;
QString m_domXml;
QString m_codeTemplate;
QIcon m_icon;
};
}
#ifndef NO_QWT_PLOT
namespace
{
class PlotInterface : public CustomWidgetInterface
{
public:
PlotInterface()
{
m_name = "QwtPlot";
m_include = "qwt_plot.h";
m_icon = QPixmap( ":/pixmaps/qwtplot.png" );
m_domXml =
"<widget class=\"QwtPlot\" name=\"qwtPlot\">\n"
" <property name=\"geometry\">\n"
" <rect>\n"
" <x>0</x>\n"
" <y>0</y>\n"
" <width>400</width>\n"
" <height>200</height>\n"
" </rect>\n"
" </property>\n"
"</widget>\n";
}
virtual QWidget* createWidget( QWidget* parent ) QWT_OVERRIDE
{
return new QwtPlot( parent );
}
};
}
#endif
#ifndef NO_QWT_POLAR
namespace
{
class PolarPlotInterface : public CustomWidgetInterface
{
public:
PolarPlotInterface()
{
m_name = "QwtPolarPlot";
m_include = "qwt_polar_plot.h";
m_icon = QPixmap( ":/pixmaps/qwt_polar_plot.png" );
m_domXml =
"<widget class=\"QwtPolarPlot\" name=\"qwtPolarPlot\">\n"
" <property name=\"geometry\">\n"
" <rect>\n"
" <x>0</x>\n"
" <y>0</y>\n"
" <width>400</width>\n"
" <height>400</height>\n"
" </rect>\n"
" </property>\n"
"</widget>\n";
}
virtual QWidget* createWidget( QWidget* parent ) QWT_OVERRIDE
{
return new QwtPolarPlot( parent );
}
};
}
#endif
#ifndef NO_QWT_WIDGETS
namespace
{
class AnalogClockInterface : public CustomWidgetInterface
{
public:
AnalogClockInterface()
{
m_name = "QwtAnalogClock";
m_include = "qwt_analog_clock.h";
m_icon = QPixmap( ":/pixmaps/qwtanalogclock.png" );
m_domXml =
"<widget class=\"QwtAnalogClock\" name=\"AnalogClock\">\n"
" <property name=\"geometry\">\n"
" <rect>\n"
" <x>0</x>\n"
" <y>0</y>\n"
" <width>200</width>\n"
" <height>200</height>\n"
" </rect>\n"
" </property>\n"
" <property name=\"lineWidth\">\n"
" <number>4</number>\n"
" </property>\n"
"</widget>\n";
}
virtual QWidget* createWidget( QWidget* parent ) QWT_OVERRIDE
{
return new QwtAnalogClock( parent );
}
};
}
#endif
#ifndef NO_QWT_WIDGETS
namespace
{
class CompassInterface : public CustomWidgetInterface
{
public:
CompassInterface()
{
m_name = "QwtCompass";
m_include = "qwt_compass.h";
m_icon = QPixmap( ":/pixmaps/qwtcompass.png" );
m_domXml =
"<widget class=\"QwtCompass\" name=\"Compass\">\n"
" <property name=\"geometry\">\n"
" <rect>\n"
" <x>0</x>\n"
" <y>0</y>\n"
" <width>200</width>\n"
" <height>200</height>\n"
" </rect>\n"
" </property>\n"
" <property name=\"lineWidth\">\n"
" <number>4</number>\n"
" </property>\n"
"</widget>\n";
}
virtual QWidget* createWidget( QWidget* parent ) QWT_OVERRIDE
{
QwtCompass* compass = new QwtCompass( parent );
compass->setNeedle( new QwtCompassMagnetNeedle(
QwtCompassMagnetNeedle::TriangleStyle,
compass->palette().color( QPalette::Mid ),
compass->palette().color( QPalette::Dark ) ) );
return compass;
}
};
}
#endif
#ifndef NO_QWT_WIDGETS
namespace
{
class CounterInterface : public CustomWidgetInterface
{
public:
CounterInterface()
{
m_name = "QwtCounter";
m_include = "qwt_counter.h";
m_icon = QPixmap( ":/pixmaps/qwtcounter.png" );
m_domXml =
"<widget class=\"QwtCounter\" name=\"Counter\">\n"
"</widget>\n";
}
virtual QWidget* createWidget( QWidget* parent ) QWT_OVERRIDE
{
return new QwtCounter( parent );
}
};
}
#endif
#ifndef NO_QWT_WIDGETS
namespace
{
class DialInterface : public CustomWidgetInterface
{
public:
DialInterface()
{
m_name = "QwtDial";
m_include = "qwt_dial.h";
m_icon = QPixmap( ":/pixmaps/qwtdial.png" );
m_domXml =
"<widget class=\"QwtDial\" name=\"Dial\">\n"
" <property name=\"geometry\">\n"
" <rect>\n"
" <x>0</x>\n"
" <y>0</y>\n"
" <width>200</width>\n"
" <height>200</height>\n"
" </rect>\n"
" </property>\n"
" <property name=\"lineWidth\">\n"
" <number>4</number>\n"
" </property>\n"
"</widget>\n";
}
virtual QWidget* createWidget( QWidget* parent ) QWT_OVERRIDE
{
QwtDial* dial = new QwtDial( parent );
dial->setNeedle( new QwtDialSimpleNeedle(
QwtDialSimpleNeedle::Arrow, true,
dial->palette().color( QPalette::Dark ),
dial->palette().color( QPalette::Mid ) ) );
return dial;
}
};
}
#endif
#ifndef NO_QWT_WIDGETS
namespace
{
class KnobInterface : public CustomWidgetInterface
{
public:
KnobInterface()
{
m_name = "QwtKnob";
m_include = "qwt_knob.h";
m_icon = QPixmap( ":/pixmaps/qwtknob.png" );
m_domXml =
"<widget class=\"QwtKnob\" name=\"Knob\">\n"
" <property name=\"geometry\">\n"
" <rect>\n"
" <x>0</x>\n"
" <y>0</y>\n"
" <width>150</width>\n"
" <height>150</height>\n"
" </rect>\n"
" </property>\n"
"</widget>\n";
}
virtual QWidget* createWidget( QWidget* parent ) QWT_OVERRIDE
{
return new QwtKnob( parent );
}
};
}
#endif
#ifndef NO_QWT_PLOT
namespace
{
class ScaleWidgetInterface : public CustomWidgetInterface
{
public:
ScaleWidgetInterface()
{
m_name = "QwtScaleWidget";
m_include = "qwt_scale_widget.h";
m_icon = QPixmap( ":/pixmaps/qwtscale.png" );
m_domXml =
"<widget class=\"QwtScaleWidget\" name=\"ScaleWidget\">\n"
" <property name=\"geometry\">\n"
" <rect>\n"
" <x>0</x>\n"
" <y>0</y>\n"
" <width>60</width>\n"
" <height>250</height>\n"
" </rect>\n"
" </property>\n"
"</widget>\n";
}
virtual QWidget* createWidget( QWidget* parent ) QWT_OVERRIDE
{
return new QwtScaleWidget( QwtScaleDraw::LeftScale, parent );
}
};
}
#endif
#ifndef NO_QWT_WIDGETS
namespace
{
class SliderInterface : public CustomWidgetInterface
{
public:
SliderInterface()
{
m_name = "QwtSlider";
m_include = "qwt_slider.h";
m_icon = QPixmap( ":/pixmaps/qwtslider.png" );
m_domXml =
"<widget class=\"QwtSlider\" name=\"Slider\">\n"
" <property name=\"geometry\">\n"
" <rect>\n"
" <x>0</x>\n"
" <y>0</y>\n"
" <width>60</width>\n"
" <height>250</height>\n"
" </rect>\n"
" </property>\n"
"</widget>\n";
}
virtual QWidget* createWidget( QWidget* parent ) QWT_OVERRIDE
{
return new QwtSlider( parent );
}
};
}
#endif
namespace
{
class TextLabelInterface : public CustomWidgetInterface
{
public:
TextLabelInterface()
{
m_name = "QwtTextLabel";
m_include = "qwt_text_label.h";
m_icon = QPixmap( ":/pixmaps/qwtwidget.png" );
m_domXml =
"<widget class=\"QwtTextLabel\" name=\"TextLabel\">\n"
" <property name=\"geometry\">\n"
" <rect>\n"
" <x>0</x>\n"
" <y>0</y>\n"
" <width>100</width>\n"
" <height>20</height>\n"
" </rect>\n"
" </property>\n"
"</widget>\n";
}
virtual QWidget* createWidget( QWidget* parent ) QWT_OVERRIDE
{
return new QwtTextLabel( QwtText( "Label" ), parent );
}
};
}
#ifndef NO_QWT_WIDGETS
namespace
{
class ThermoInterface : public CustomWidgetInterface
{
public:
ThermoInterface()
{
m_name = "QwtThermo";
m_include = "qwt_thermo.h";
m_icon = QPixmap( ":/pixmaps/qwtthermo.png" );
m_domXml =
"<widget class=\"QwtThermo\" name=\"Thermo\">\n"
" <property name=\"geometry\">\n"
" <rect>\n"
" <x>0</x>\n"
" <y>0</y>\n"
" <width>60</width>\n"
" <height>250</height>\n"
" </rect>\n"
" </property>\n"
"</widget>\n";
}
virtual QWidget* createWidget( QWidget* parent ) QWT_OVERRIDE
{
return new QwtThermo( parent );
}
};
}
#endif
#ifndef NO_QWT_WIDGETS
namespace
{
class WheelInterface : public CustomWidgetInterface
{
public:
WheelInterface()
{
m_name = "QwtWheel";
m_include = "qwt_wheel.h";
m_icon = QPixmap( ":/pixmaps/qwtwheel.png" );
m_domXml =
"<widget class=\"QwtWheel\" name=\"Wheel\">\n"
"</widget>\n";
}
virtual QWidget* createWidget( QWidget* parent ) QWT_OVERRIDE
{
return new QwtWheel( parent );
}
};
}
#endif
namespace
{
class WidgetCollectionInterface
: public QObject
, public QDesignerCustomWidgetCollectionInterface
{
Q_OBJECT
Q_INTERFACES( QDesignerCustomWidgetCollectionInterface )
#if QT_VERSION >= 0x050000
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetCollectionInterface" )
#endif
public:
WidgetCollectionInterface()
{
#ifndef NO_QWT_PLOT
m_plugins += new PlotInterface();
m_plugins += new ScaleWidgetInterface();
#endif
#ifndef NO_QWT_POLAR
m_plugins += new PolarPlotInterface();
#endif
#ifndef NO_QWT_WIDGETS
m_plugins += new AnalogClockInterface();
m_plugins += new CompassInterface();
m_plugins += new CounterInterface();
m_plugins += new DialInterface();
m_plugins += new KnobInterface();
m_plugins += new SliderInterface();
m_plugins += new ThermoInterface();
m_plugins += new WheelInterface();
#endif
m_plugins += new TextLabelInterface();
}
virtual ~WidgetCollectionInterface() QWT_OVERRIDE
{
qDeleteAll( m_plugins );
}
QList< QDesignerCustomWidgetInterface* > customWidgets() const
{
return m_plugins;
}
private:
QList< QDesignerCustomWidgetInterface* > m_plugins;
};
}
#if QT_VERSION < 0x050000
Q_EXPORT_PLUGIN2( QwtDesignerPlugin, WidgetCollectionInterface )
#endif
#if QWT_MOC_INCLUDE
#include "qwt_designer_plugin.moc"
#endif

View File

@@ -0,0 +1,16 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file>pixmaps/qwtplot.png</file>
<file>pixmaps/qwt_polar_plot.png</file>
<file>pixmaps/qwtanalogclock.png</file>
<file>pixmaps/qwtcounter.png</file>
<file>pixmaps/qwtcompass.png</file>
<file>pixmaps/qwtdial.png</file>
<file>pixmaps/qwtknob.png</file>
<file>pixmaps/qwtscale.png</file>
<file>pixmaps/qwtslider.png</file>
<file>pixmaps/qwtthermo.png</file>
<file>pixmaps/qwtwheel.png</file>
<file>pixmaps/qwtwidget.png</file>
</qresource>
</RCC>