diff --git a/src/Cxx.md b/src/Cxx.md index 00c785f42a4c9604ceda4d73b6889587ecb3f9bc..ea4f74b0c595e062802c336c4f8f41eafeef7a25 100644 --- a/src/Cxx.md +++ b/src/Cxx.md @@ -1375,11 +1375,11 @@ Click [here](http://www.vtk.org/Wiki/VTK/Tutorials/QtSetup) for a tutorial on ho | Example Name | Description | Image | | -------------- | ------------- | ------- | -[BorderWidgetQt](/Cxx/Qt/BorderWidgetQt) | +[BarChartQt](/Cxx/Qt/BarChartQt) | Bar chart. +[BorderWidgetQt](/Cxx/Qt/BorderWidgetQt) | 2D selection, 2D box. [EventQtSlotConnect](/Cxx/Qt/EventQtSlotConnect) | Connect a VTK event to a Qt slot. [ImageDataToQImage](/Cxx/Qt/ImageDataToQImage) | Convert a vtkImageData to a QImage. [QImageToImageSource](/Cxx/Qt/QImageToImageSource) | Convert a QImage to a vtkImageData. -[QtBarChart](/Cxx/Qt/QtBarChart) | [RenderWindowNoUiFile](/Cxx/Qt/RenderWindowNoUiFile) | This is a very basic example that shows how to create a Qt window. Typically, one would want to design a form in the QtDesigner (this is shown in [RenderWindowUIMultipleInheritance](/Cxx/Qt/RenderWindowUIMultipleInheritance)). [RenderWindowUIMultipleInheritance](/Cxx/Qt/RenderWindowUIMultipleInheritance) | Using a QVTKOpenGLWidget with the Qt Multiple Inheritance model. [RenderWindowUISingleInheritance](/Cxx/Qt/RenderWindowUISingleInheritance) | Using a QVTKOpenGLWidget with the Qt Single Inheritance model. diff --git a/src/Cxx/Plotting/BarChart.md b/src/Cxx/Plotting/BarChart.md new file mode 100644 index 0000000000000000000000000000000000000000..60af248c3905128ad7500cadc9a292c08aadd9a3 --- /dev/null +++ b/src/Cxx/Plotting/BarChart.md @@ -0,0 +1,6 @@ +### Description + +This example shows how to create a Bar Chart. + +!!! seealso + the [BarChartQt](../../../Qt/BarChartQt) example. diff --git a/src/Cxx/Qt/QtBarChart.cxx b/src/Cxx/Qt/BarChartQt.cxx similarity index 96% rename from src/Cxx/Qt/QtBarChart.cxx rename to src/Cxx/Qt/BarChartQt.cxx index 730f2d9e573b4574126e9ec7607e2dbe21570bd2..27df564ad6c3d906d5534ad3a6233e09c10b6563 100644 --- a/src/Cxx/Qt/QtBarChart.cxx +++ b/src/Cxx/Qt/BarChartQt.cxx @@ -1,8 +1,8 @@ -#include "QtBarChart.h" +#include "BarChartQt.h" // This is included here because it is forward declared in -// QtBarChart.h -#include "ui_QtBarChart.h" +// BarChartQt.h +#include "ui_BarChartQt.h" #include <vtkAxis.h> #include <vtkChartXY.h> @@ -41,9 +41,9 @@ int data_2010[] = {9058, 10941, 9979, 10270, 8900, 11228, } // namespace // Constructor -QtBarChart::QtBarChart() +BarChartQt::BarChartQt() { - this->ui = new Ui_QtBarChart; + this->ui = new Ui_BarChartQt; this->ui->setupUi(this); vtkNew<vtkGenericOpenGLRenderWindow> renderWindow; @@ -153,7 +153,7 @@ QtBarChart::QtBarChart() connect(this->ui->actionExit, SIGNAL(triggered()), this, SLOT(slotExit())); } -void QtBarChart::slotExit() +void BarChartQt::slotExit() { std::cout << "Exiting" << std::endl; qApp->exit(); diff --git a/src/Cxx/Qt/BarChartQt.extras b/src/Cxx/Qt/BarChartQt.extras new file mode 100644 index 0000000000000000000000000000000000000000..5be3c996fe822a3eb9d661152dc521a91048c312 --- /dev/null +++ b/src/Cxx/Qt/BarChartQt.extras @@ -0,0 +1,3 @@ +BarChartQt.h +BarChartQtDriver.cxx +BarChartQt.ui diff --git a/src/Cxx/Qt/QtBarChart.h b/src/Cxx/Qt/BarChartQt.h similarity index 52% rename from src/Cxx/Qt/QtBarChart.h rename to src/Cxx/Qt/BarChartQt.h index 23e7a6538b2f7489bd722ec694781c8c400a2f86..517d1cfcd06c69efe2e123d0c258d72397fbdc68 100644 --- a/src/Cxx/Qt/QtBarChart.h +++ b/src/Cxx/Qt/BarChartQt.h @@ -1,18 +1,18 @@ -#ifndef QtBarChart_H -#define QtBarChart_H +#ifndef BarChartQt_H +#define BarChartQt_H #include <QMainWindow> // Forward Qt class declarations -class Ui_QtBarChart; +class Ui_BarChartQt; -class QtBarChart : public QMainWindow +class BarChartQt : public QMainWindow { Q_OBJECT public: // Constructor/Destructor - QtBarChart(); - ~QtBarChart() = default; + BarChartQt(); + ~BarChartQt() = default; public slots: @@ -20,7 +20,7 @@ public slots: private: // Designer form - Ui_QtBarChart* ui; + Ui_BarChartQt* ui; }; #endif diff --git a/src/Cxx/Qt/BarChartQt.md b/src/Cxx/Qt/BarChartQt.md new file mode 100644 index 0000000000000000000000000000000000000000..80ecbbb21f57e7c94a3960e3708fd2fe7952c8c3 --- /dev/null +++ b/src/Cxx/Qt/BarChartQt.md @@ -0,0 +1,6 @@ +### Description + +This example shows how to create a Bar Chart. + +!!! seealso + the [BarChart](../../../Plotting/BarChart) example. diff --git a/src/Cxx/Qt/QtBarChart.ui b/src/Cxx/Qt/BarChartQt.ui similarity index 92% rename from src/Cxx/Qt/QtBarChart.ui rename to src/Cxx/Qt/BarChartQt.ui index 57a1503628e85b44137044ea89ce79c11f0452d1..b3dad7ee50dd5ace9356261ccb95f5e5a47ffef5 100644 --- a/src/Cxx/Qt/QtBarChart.ui +++ b/src/Cxx/Qt/BarChartQt.ui @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> - <class>QtBarChart</class> - <widget class="QMainWindow" name="QtBarChart"> + <class>BarChartQt</class> + <widget class="QMainWindow" name="BarChartQt"> <property name="geometry"> <rect> <x>0</x> @@ -11,7 +11,7 @@ </rect> </property> <property name="windowTitle"> - <string>QtBarChart</string> + <string>BarChartQt</string> </property> <widget class="QWidget" name="centralwidget"> <widget class="QVTKOpenGLNativeWidget" name="qvtkWidget"> diff --git a/src/Cxx/Qt/QtBarChartDriver.cxx b/src/Cxx/Qt/BarChartQtDriver.cxx similarity index 83% rename from src/Cxx/Qt/QtBarChartDriver.cxx rename to src/Cxx/Qt/BarChartQtDriver.cxx index 609c45347c290147df46cfe0a03633fcac303236..c617f105a4fcac2f87db1871c898b6a36e6c529a 100644 --- a/src/Cxx/Qt/QtBarChartDriver.cxx +++ b/src/Cxx/Qt/BarChartQtDriver.cxx @@ -3,7 +3,7 @@ #include <QVTKOpenGLNativeWidget.h> -#include "QtBarChart.h" +#include "BarChartQt.h" int main(int argc, char** argv) { @@ -13,8 +13,8 @@ int main(int argc, char** argv) // QT Stuff QApplication app(argc, argv); - QtBarChart qtBarChart; - qtBarChart.show(); + BarChartQt BarChartQt; + BarChartQt.show(); return app.exec(); } diff --git a/src/Cxx/Qt/BorderWidgetQt.md b/src/Cxx/Qt/BorderWidgetQt.md new file mode 100644 index 0000000000000000000000000000000000000000..58585a30ae24957447b65dd08c206bb896439426 --- /dev/null +++ b/src/Cxx/Qt/BorderWidgetQt.md @@ -0,0 +1,6 @@ +### Description + +This example draws a border around a region selected with the mouse. Note that the default border color is white - so if you have a white background you will not see anything! + +!!! seealso + the [BorderWidget](../../../Widgets/BorderWidget) example. diff --git a/src/Cxx/Qt/QtBarChart.extras b/src/Cxx/Qt/QtBarChart.extras deleted file mode 100644 index f8513909eccf80d063a2b22eac26a7d2b0d3e685..0000000000000000000000000000000000000000 --- a/src/Cxx/Qt/QtBarChart.extras +++ /dev/null @@ -1,3 +0,0 @@ -QtBarChart.h -QtBarChartDriver.cxx -QtBarChart.ui diff --git a/src/Cxx/Widgets/BorderWidget.md b/src/Cxx/Widgets/BorderWidget.md index 9410d4da05b94453ff0668525ac227239dfaa5a8..18b43592cda5bbfa248b9f0e9c4c39caa3afae97 100644 --- a/src/Cxx/Widgets/BorderWidget.md +++ b/src/Cxx/Widgets/BorderWidget.md @@ -1,3 +1,6 @@ ### Description This example draws a border around a region selected with the mouse. Note that the default border color is white - so if you have a white background you will not see anything! + +!!! seealso + the [BorderWidgetQt](../../../Qt/BorderWidgetQt) example. diff --git a/src/Testing/Baseline/Cxx/Qt/TestQtBarChart.png b/src/Testing/Baseline/Cxx/Qt/TestBarChartQt.png similarity index 100% rename from src/Testing/Baseline/Cxx/Qt/TestQtBarChart.png rename to src/Testing/Baseline/Cxx/Qt/TestBarChartQt.png