diff options
Diffstat (limited to 'lib/tqwtplot3d/examples/axes/src')
-rw-r--r-- | lib/tqwtplot3d/examples/axes/src/axes.h | 75 | ||||
-rw-r--r-- | lib/tqwtplot3d/examples/axes/src/axesmainwindow.cpp | 245 | ||||
-rw-r--r-- | lib/tqwtplot3d/examples/axes/src/axesmainwindow.h | 64 | ||||
-rw-r--r-- | lib/tqwtplot3d/examples/axes/src/axesmainwindowbase.ui | 243 | ||||
-rw-r--r-- | lib/tqwtplot3d/examples/axes/src/axesmainwindowbase4.ui | 295 | ||||
-rw-r--r-- | lib/tqwtplot3d/examples/axes/src/main.cpp | 31 |
6 files changed, 953 insertions, 0 deletions
diff --git a/lib/tqwtplot3d/examples/axes/src/axes.h b/lib/tqwtplot3d/examples/axes/src/axes.h new file mode 100644 index 0000000..675ae8b --- /dev/null +++ b/lib/tqwtplot3d/examples/axes/src/axes.h @@ -0,0 +1,75 @@ +#ifndef axes_h__2004_06_07_10_38_begin_guarded_code
+#define axes_h__2004_06_07_10_38_begin_guarded_code
+
+#include "qwt3d_plot.h"
+using namespace Qwt3D;
+
+/*****************************
+*
+* Examples for user defined
+* tic labels
+*
+******************************/
+
+class Letter : public LinearScale
+{
+public:
+ explicit Letter(bool uppercase = true) : uc_(uppercase) {}
+ Scale* clone() const {return new Letter(*this);}
+ QString ticLabel(unsigned int idx) const
+ {
+ if (idx<majors_p.size() && idx < 26)
+ return (uc_) ? QString(QChar('A'+idx)) : QString(QChar('a'+idx));
+ return QString("-");
+ }
+private:
+ bool uc_;
+};
+
+class Imaginary : public LinearScale
+{
+public:
+ Scale* clone() const {return new Imaginary;}
+ QString ticLabel(unsigned int idx) const
+ {
+ if (idx<majors_p.size())
+ {
+ double val = majors_p[idx];
+ if (val)
+ return QString::number(val) + "*i";
+ return QString::number(val);
+ }
+ return QString("");
+ }
+};
+
+class TimeItems : public LinearScale
+{
+public:
+ Scale* clone() const {return new TimeItems;}
+ QString ticLabel(unsigned int idx) const
+ {
+ if (idx<majors_p.size())
+ {
+ QTime t = QTime::currentTime();
+ int h = t.hour();
+ int m = t.minute();
+ if (m+idx > 59)
+ {
+ if (h==23)
+ h=0;
+ else
+ h+=1;
+ m = (m+idx) % 60;
+ }
+ else
+ m += idx;
+
+ return QTime(h,m).toString("hh:mm")+"h";
+ }
+ return QString("");
+ }
+};
+
+
+#endif /* include guarded */
diff --git a/lib/tqwtplot3d/examples/axes/src/axesmainwindow.cpp b/lib/tqwtplot3d/examples/axes/src/axesmainwindow.cpp new file mode 100644 index 0000000..d3086bc --- /dev/null +++ b/lib/tqwtplot3d/examples/axes/src/axesmainwindow.cpp @@ -0,0 +1,245 @@ +#include <qsplitter.h>
+#include <qlayout.h>
+#include <qcombobox.h>
+#include <qaction.h>
+#include <qslider.h>
+#include <qcheckbox.h>
+#include <qmenubar.h>
+#include <qdatetime.h>
+
+#include "axes.h"
+#include "axesmainwindow.h"
+#include "../../../include/qwt3d_function.h"
+
+using namespace std;
+using namespace Qwt3D;
+
+
+// Example function
+class Rosenbrock : public Function
+{
+public:
+
+ Rosenbrock(SurfacePlot& pw)
+ :Function(pw)
+ {
+ }
+
+ double operator()(double x, double y)
+ {
+ return log10((1-x)*(1-x) + 1 * (y - x*x)*(y - x*x));
+ }
+};
+
+
+// Main widget
+
+AxesMainWindow::AxesMainWindow( QWidget* parent)
+ : DummyBase(parent)
+{
+#if QT_VERSION < 0x040000
+ setCaption("axes");
+ QGridLayout *grid = new QGridLayout( frame, 0, 0 );
+#else
+ setupUi(this);
+ QGridLayout *grid = new QGridLayout( frame);
+#endif
+
+ plot = new SurfacePlot(frame);
+ grid->addWidget( plot, 0, 0 );
+
+ plot->setZoom(0.8);
+ plot->setRotation(30,0,15);
+
+ plot->coordinates()->setGridLines(true,true);
+ plot->setCoordinateStyle(BOX);
+ //plot->setCoordinateStyle(NOCOORD);
+ //plot->setPlotStyle(FILLED);
+
+
+ rosenbrock = new Rosenbrock(*plot);
+
+ rosenbrock->setMesh(31,33);
+ rosenbrock->setDomain(-1.73,1.8,-1.9,1.8);
+ rosenbrock->setMinZ(-100);
+
+ rosenbrock->create();
+
+ for (unsigned i=0; i!=plot->coordinates()->axes.size(); ++i)
+ {
+ plot->coordinates()->axes[i].setMajors(5);
+ plot->coordinates()->axes[i].setMinors(4);
+ plot->coordinates()->axes[i].setLabelColor(RGBA(0,0,0.4));
+ }
+
+ //plot->setTitle("Rosenbrock");
+ plot->setMeshLineWidth(1);
+ plot->coordinates()->setGridLinesColor(RGBA(0,0,0.5));
+ plot->coordinates()->setLineWidth(1);
+ plot->coordinates()->setNumberColor(RGBA(0,0.5,0));
+ plot->coordinates()->setNumberFont("Courier",10);
+ plot->setTitleFont("Courier",11);
+ plot->coordinates()->setLabelFont("Courier",12, QFont::Bold);
+ plot->coordinates()->axes[X1].setLabelString("X1");
+ plot->coordinates()->axes[Y1].setLabelString("Y1");
+ plot->coordinates()->axes[Z1].setLabelString("Z1");
+ plot->coordinates()->axes[X2].setLabelString("X2");
+ plot->coordinates()->axes[Y2].setLabelString("Y2");
+ plot->coordinates()->axes[Z2].setLabelString("Z2");
+ plot->coordinates()->axes[X3].setLabelString("X3");
+ plot->coordinates()->axes[Y3].setLabelString("Y3");
+ plot->coordinates()->axes[Z3].setLabelString("Z3");
+ plot->coordinates()->axes[X4].setLabelString("X4");
+ plot->coordinates()->axes[Y4].setLabelString("Y4");
+ plot->coordinates()->axes[Z4].setLabelString("Z4");
+
+
+ plot->coordinates()->setLineSmooth(true);
+ smoothBox->setDown(true);
+
+#if QT_VERSION < 0x040000
+ Items->insertItem( "&Standard", this, SLOT(standardItems()), ALT+Key_S );
+ Items->insertItem( "&Imaginary", this, SLOT(complexItems()), ALT+Key_I );
+ Items->insertItem( "&Letter", this, SLOT(letterItems()), ALT+Key_L );
+ Items->insertItem( "&Time", this, SLOT(timeItems()), ALT+Key_T );
+ Items->insertItem( "&Log", this, SLOT(customScale()), ALT+Key_C );
+#else
+ QMenu* Items = menuBar()->addMenu("Item");
+ Items->addAction( "&Standard", this, SLOT(standardItems()), QKeySequence("ALT+S") );
+ Items->addAction( "&Imaginary", this, SLOT(complexItems()), QKeySequence("ALT+I") );
+ Items->addAction( "&Letter", this, SLOT(letterItems()), QKeySequence("ALT+L") );
+ Items->addAction( "&Time", this, SLOT(timeItems()), QKeySequence("ALT+T") );
+ Items->addAction( "&Log", this, SLOT(customScale()), QKeySequence("ALT+C") );
+#endif
+
+ plot->makeCurrent();
+ plot->updateData();
+ plot->updateGL();
+
+ connect(smoothBox, SIGNAL(toggled(bool)), this, SLOT(setSmoothLines(bool)) );
+ connect(numbergapslider, SIGNAL(valueChanged(int)), this, SLOT(setNumberGap(int)) );
+ connect(labelgapslider, SIGNAL(valueChanged(int)), this, SLOT(setLabelGap(int)) );
+ connect(ticLengthSlider, SIGNAL(valueChanged(int)), this, SLOT(setTicLength(int)) );
+ connect(ticNumberSlider, SIGNAL(valueChanged(int)), this, SLOT(setTicNumber(int)) );
+
+ tics = plot->coordinates()->axes[X1].majors();
+
+ //resetTics();
+
+ customScale();
+
+ plot->setPolygonOffset(10);
+}
+
+AxesMainWindow::~AxesMainWindow()
+{
+ delete rosenbrock;
+}
+
+void AxesMainWindow::setNumberGap(int gap)
+{
+ plot->coordinates()->adjustNumbers(gap);
+ plot->makeCurrent();
+ plot->updateGL();
+}
+
+void AxesMainWindow::setLabelGap(int gap)
+{
+ plot->coordinates()->adjustLabels(gap);
+ plot->makeCurrent();
+ plot->updateGL();
+}
+
+void AxesMainWindow::setSmoothLines(bool val)
+{
+ plot->coordinates()->setLineSmooth(val);
+ plot->updateGL();
+}
+
+void AxesMainWindow::setTicLength(int val)
+{
+ double majl = (plot->coordinates()->second()-plot->coordinates()->first()).length() / 1000.;
+ majl = majl * val;
+ plot->coordinates()->setTicLength(majl,0.6*majl);
+ plot->updateGL();
+}
+
+void AxesMainWindow::setTicNumber(int degree)
+{
+ plot->coordinates()->axes[X1].setMajors(tics + degree);
+ plot->updateGL();
+}
+
+void AxesMainWindow::resetTics()
+{
+ ticNumberSlider->setEnabled(false);
+ plot->setTitle("");
+ plot->coordinates()->axes[X1].setMajors(5);
+ plot->coordinates()->setAutoScale(true);
+ plot->coordinates()->setStandardScale();
+ plot->coordinates()->axes[Z2].setLabelString("Z4");
+ plot->coordinates()->setGridLines(false,false,Qwt3D::BACK);
+}
+
+void AxesMainWindow::standardItems()
+{
+ resetTics();
+ plot->updateGL();
+}
+
+void AxesMainWindow::letterItems()
+{
+ resetTics();
+ ticNumberSlider->setEnabled(true);
+ plot->coordinates()->axes[X1].setAutoScale(false);
+ plot->coordinates()->setStandardScale();
+ plot->coordinates()->axes[X1].setScale(new Letter);
+ plot->coordinates()->axes[X2].setScale(new Letter);
+ plot->coordinates()->axes[X3].setScale(new Letter);
+ plot->coordinates()->axes[X4].setScale(new Letter);
+ plot->coordinates()->axes[Y1].setScale(new Letter(false));
+ plot->coordinates()->axes[Y2].setScale(new Letter(false));
+ plot->coordinates()->axes[Y3].setScale(new Letter(false));
+ plot->coordinates()->axes[Y4].setScale(new Letter(false));
+ plot->setTitle("Use the tics slider for this example!");
+ plot->updateGL();
+}
+
+void AxesMainWindow::complexItems()
+{
+ resetTics();
+ plot->coordinates()->axes[Y1].setScale(new Imaginary);
+ plot->coordinates()->axes[Y2].setScale(new Imaginary);
+ plot->coordinates()->axes[Y3].setScale(new Imaginary);
+ plot->coordinates()->axes[Y4].setScale(new Imaginary);
+ plot->updateGL();
+}
+
+void AxesMainWindow::timeItems()
+{
+ resetTics();
+ plot->coordinates()->axes[Z1].setScale(new TimeItems);
+ plot->coordinates()->axes[Z2].setScale(new TimeItems);
+ plot->coordinates()->axes[Z3].setScale(new TimeItems);
+ plot->coordinates()->axes[Z4].setScale(new TimeItems);
+ plot->updateGL();
+}
+
+void AxesMainWindow::customScale()
+{
+ resetTics();
+ plot->coordinates()->axes[Z1].setScale(LOG10SCALE);
+ plot->coordinates()->axes[Z3].setScale(LOG10SCALE);
+ plot->coordinates()->axes[Z4].setScale(LOG10SCALE);
+ plot->coordinates()->axes[Z2].setLabelString("log10(z)");
+// plot->coordinates()->axes[Z4].setScale(new LogScale);
+// plot->coordinates()->axes[Z1].setAutoScale(false);
+// plot->coordinates()->axes[Z2].setAutoScale(false);
+// plot->coordinates()->axes[Z3].setAutoScale(false);
+// plot->coordinates()->axes[Z4].setAutoScale(false);
+
+ plot->coordinates()->setGridLines(true,true,Qwt3D::BACK);
+
+ plot->updateGL();
+}
+
diff --git a/lib/tqwtplot3d/examples/axes/src/axesmainwindow.h b/lib/tqwtplot3d/examples/axes/src/axesmainwindow.h new file mode 100644 index 0000000..fd99d0d --- /dev/null +++ b/lib/tqwtplot3d/examples/axes/src/axesmainwindow.h @@ -0,0 +1,64 @@ +#include <qmainwindow.h>
+
+#include "qwt3d_surfaceplot.h"
+#include "qwt3d_function.h"
+#include "qwt3d_plot.h"
+
+#if QT_VERSION < 0x040000
+#include "axesmainwindowbase.h"
+#else
+#include "ui_axesmainwindowbase4.h"
+#endif
+
+//MOC_SKIP_BEGIN
+#if QT_VERSION < 0x040000
+ class DummyBase : public AxesMainWindowBase
+ {
+ public:
+ DummyBase(QWidget* parent = 0)
+ : AxesMainWindowBase(parent)
+ {
+ }
+ };
+#else
+ class DummyBase : public QMainWindow, protected Ui::MainWindow
+ {
+ public:
+ DummyBase(QWidget* parent = 0)
+ : QMainWindow(parent)
+ {
+ }
+ };
+#endif
+//MOC_SKIP_END
+
+
+class AxesMainWindow : public DummyBase
+{
+ Q_OBJECT
+
+public:
+ AxesMainWindow( QWidget* parent = 0);
+ ~AxesMainWindow();
+ Qwt3D::SurfacePlot* plot;
+ Qwt3D::Function *rosenbrock;
+ void resetTics();
+
+public slots:
+ void setNumberGap(int gap);
+ void setLabelGap(int gap);
+
+ void setSmoothLines(bool);
+ void setTicLength(int val);
+ void setTicNumber(int degree);
+
+ void standardItems();
+ void complexItems();
+ void letterItems();
+ void timeItems();
+ void customScale();
+
+private:
+
+ int tics;
+};
diff --git a/lib/tqwtplot3d/examples/axes/src/axesmainwindowbase.ui b/lib/tqwtplot3d/examples/axes/src/axesmainwindowbase.ui new file mode 100644 index 0000000..92bab56 --- /dev/null +++ b/lib/tqwtplot3d/examples/axes/src/axesmainwindowbase.ui @@ -0,0 +1,243 @@ +<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>AxesMainWindowBase</class>
+<widget class="QMainWindow">
+ <property name="name">
+ <cstring>AxesMainWindowBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>826</width>
+ <height>608</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>print</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QFrame" row="0" column="0">
+ <property name="name">
+ <cstring>frame</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="0">
+ <property name="name">
+ <cstring>layout11</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout9</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel1_2</cstring>
+ </property>
+ <property name="text">
+ <string>Number gap</string>
+ </property>
+ </widget>
+ <widget class="QSlider">
+ <property name="name">
+ <cstring>numbergapslider</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maxValue">
+ <number>10</number>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="tickmarks">
+ <enum>Above</enum>
+ </property>
+ <property name="tickInterval">
+ <number>1</number>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout10</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel1_2_2</cstring>
+ </property>
+ <property name="text">
+ <string>Label gap</string>
+ </property>
+ </widget>
+ <widget class="QSlider">
+ <property name="name">
+ <cstring>labelgapslider</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maxValue">
+ <number>10</number>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="tickmarks">
+ <enum>Above</enum>
+ </property>
+ <property name="tickInterval">
+ <number>1</number>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QCheckBox" row="1" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>smoothBox</cstring>
+ </property>
+ <property name="text">
+ <string>Smooth Lines</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="1">
+ <property name="name">
+ <cstring>layout11</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="2" rowspan="2" colspan="1">
+ <property name="name">
+ <cstring>layout9</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>ticNumeberLabel</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Tics</string>
+ </property>
+ <property name="alignment">
+ <set>AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="QSlider" row="1" column="0">
+ <property name="name">
+ <cstring>ticLengthSlider</cstring>
+ </property>
+ <property name="maxValue">
+ <number>100</number>
+ </property>
+ <property name="value">
+ <number>10</number>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="tickmarks">
+ <enum>Below</enum>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Tic Length (rel.)</string>
+ </property>
+ </widget>
+ <widget class="QSlider" row="1" column="1">
+ <property name="name">
+ <cstring>ticNumberSlider</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="maxValue">
+ <number>25</number>
+ </property>
+ <property name="value">
+ <number>0</number>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="tickmarks">
+ <enum>Below</enum>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Change Tic Number (available only for letter example)</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<menubar>
+ <property name="name">
+ <cstring>menubar</cstring>
+ </property>
+ <item text="Items" name="Items">
+ </item>
+</menubar>
+<toolbars>
+</toolbars>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/lib/tqwtplot3d/examples/axes/src/axesmainwindowbase4.ui b/lib/tqwtplot3d/examples/axes/src/axesmainwindowbase4.ui new file mode 100644 index 0000000..1e4a0b5 --- /dev/null +++ b/lib/tqwtplot3d/examples/axes/src/axesmainwindowbase4.ui @@ -0,0 +1,295 @@ +<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>694</width>
+ <height>600</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>MainWindow</string>
+ </property>
+ <widget class="QWidget" name="centralWidget" >
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>8</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QFrame" name="frame" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label_4" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string><html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:MS Shell Dlg; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Tics</p></body></html></string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::Preferred</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QSlider" name="ticLengthSlider" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximum" >
+ <number>100</number>
+ </property>
+ <property name="value" >
+ <number>10</number>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="invertedAppearance" >
+ <bool>true</bool>
+ </property>
+ <property name="tickPosition" >
+ <enum>QSlider::TicksBelow</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSlider" name="ticNumberSlider" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximum" >
+ <number>25</number>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="invertedAppearance" >
+ <bool>true</bool>
+ </property>
+ <property name="tickPosition" >
+ <enum>QSlider::TicksBelow</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QWidget" name="widget_2" >
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label_2" >
+ <property name="text" >
+ <string><html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:MS Shell Dlg; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Number gap</p></body></html></string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSlider" name="numbergapslider" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximum" >
+ <number>10</number>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="tickPosition" >
+ <enum>QSlider::TicksAbove</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string><html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:MS Shell Dlg; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Label gap</p></body></html></string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSlider" name="labelgapslider" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximum" >
+ <number>10</number>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="tickPosition" >
+ <enum>QSlider::TicksAbove</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="smoothBox" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>Smooth Lines</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ <widget class="QWidget" name="widget" >
+ <property name="geometry" >
+ <rect>
+ <x>590</x>
+ <y>10</y>
+ <width>61</width>
+ <height>421</height>
+ </rect>
+ </property>
+ </widget>
+ </widget>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/lib/tqwtplot3d/examples/axes/src/main.cpp b/lib/tqwtplot3d/examples/axes/src/main.cpp new file mode 100644 index 0000000..518faf6 --- /dev/null +++ b/lib/tqwtplot3d/examples/axes/src/main.cpp @@ -0,0 +1,31 @@ +/********************************************************************
+ created: 2003/09/10
+ filename: main.cpp
+
+ author: Micha Bieber
+*********************************************************************/
+
+#include <qapplication.h>
+#include "axesmainwindow.h"
+
+
+int main( int argc, char** argv )
+{
+ QApplication app( argc, argv );
+
+ if ( !QGLFormat::hasOpenGL() )
+ {
+ qWarning( "This system has no OpenGL support. Exiting." );
+ return -1;
+ }
+
+ AxesMainWindow mainwindow;
+
+#if QT_VERSION < 0x040000
+ app.setMainWidget(&mainwindow);
+#endif
+
+ mainwindow.show();
+
+ return app.exec();
+}
|