##// END OF EJS Templates
New bar calculate layout
New bar calculate layout

File last commit:

r2254:3e008d6a7c89
r2303:ebdfe8e2c2c9
Show More
widget.cpp
61 lines | 2.4 KiB | text/x-c | CppLexer
Marek Rosa
Added simple demoLauncher application
r2229 #include "widget.h"
#include <QDir>
#include <QGridLayout>
#include <QApplication>
Marek Rosa
Quick demolauncher fix
r2252 #include "graphicsbutton.h"
Marek Rosa
Added simple demoLauncher application
r2229
Widget::Widget(QWidget *parent)
Marek Rosa
Cleaned up demoLauncher
r2254 : QWidget(parent)
Marek Rosa
Added simple demoLauncher application
r2229 {
Marek Rosa
Quick demolauncher fix
r2252 setMinimumSize(200, 200);
Marek Rosa
Cleaned up demoLauncher
r2254 m_appFolder = QDir(QApplication::applicationDirPath());
Tero Ahola
Qt5 build fixes
r2239 #ifdef Q_OS_MAC
Tero Ahola
Demo launcher now works on OSX
r2237 // The executable is inside an application bundle (a folder) on OSX
m_appFolder.cdUp();
m_appFolder.cdUp();
m_appFolder.cdUp();
#endif
Marek Rosa
Quick demolauncher fix
r2252
QDir imageFolder = m_appFolder;
imageFolder.cdUp();
imageFolder.cdUp();
Marek Rosa
Cleaned up demoLauncher
r2254 imageFolder.cd("doc");
imageFolder.cd("images");
Marek Rosa
demolauncher fix
r2232
Tero Ahola
Demo launcher now works on OSX
r2237 // Create push buttons for starting the executables
Marek Rosa
Added simple demoLauncher application
r2229 QGridLayout* demosLayout = new QGridLayout;
Marek Rosa
Quick demolauncher fix
r2252
Marek Rosa
Cleaned up demoLauncher
r2254 GraphicsButton *button = new GraphicsButton(imageFolder.absolutePath() + QDir::separator() + "demos_audio.png", m_appFolder, "audio", this);
Marek Rosa
Quick demolauncher fix
r2252 demosLayout->addWidget(button, 0, 0);
Marek Rosa
Cleaned up demoLauncher
r2254 button = new GraphicsButton(imageFolder.absolutePath() + QDir::separator() +"examples_callout.png", m_appFolder, "callout", this);
Marek Rosa
Quick demolauncher fix
r2252 demosLayout->addWidget(button, 0, 1);
Marek Rosa
Cleaned up demoLauncher
r2254 button = new GraphicsButton(imageFolder.absolutePath() + QDir::separator() +"demo_chartthemes_blue_cerulean.png", m_appFolder, "chartthemes", this);
Marek Rosa
Quick demolauncher fix
r2252 demosLayout->addWidget(button, 0, 2);
Marek Rosa
Cleaned up demoLauncher
r2254 button = new GraphicsButton(imageFolder.absolutePath() + QDir::separator() +"demos_nesteddonuts.png", m_appFolder, "nesteddonuts", this);
Marek Rosa
Quick demolauncher fix
r2252 demosLayout->addWidget(button, 1, 0);
Marek Rosa
Cleaned up demoLauncher
r2254 button = new GraphicsButton(imageFolder.absolutePath() + QDir::separator() +"examples_zoomlinechart1.png", m_appFolder, "zoomlinechart", this);
Marek Rosa
Quick demolauncher fix
r2252 demosLayout->addWidget(button, 1, 1);
Marek Rosa
Cleaned up demoLauncher
r2254 button = new GraphicsButton(imageFolder.absolutePath() + QDir::separator() +"examples_stackedbarchartdrilldown1.png", m_appFolder, "stackedbarchartdrilldown", this);
Marek Rosa
Quick demolauncher fix
r2252 demosLayout->addWidget(button, 1, 2);
Marek Rosa
Cleaned up demoLauncher
r2254 button = new GraphicsButton(imageFolder.absolutePath() + QDir::separator() +"piechart_customization.png", m_appFolder, "piechartcustomization", this);
Marek Rosa
Quick demolauncher fix
r2252 demosLayout->addWidget(button, 2, 0);
Marek Rosa
Cleaned up demoLauncher
r2254 button = new GraphicsButton(imageFolder.absolutePath() + QDir::separator() +"examples_datetimeaxis.png", m_appFolder, "datetimeaxis", this);
Marek Rosa
Quick demolauncher fix
r2252 demosLayout->addWidget(button, 2, 1);
Marek Rosa
Cleaned up demoLauncher
r2254 button = new GraphicsButton(imageFolder.absolutePath() + QDir::separator() +"examples_donutbreakdown.png", m_appFolder, "donutbreakdown", this);
Marek Rosa
Quick demolauncher fix
r2252 demosLayout->addWidget(button, 2, 2);
Marek Rosa
Added simple demoLauncher application
r2229 setLayout(demosLayout);
}
Widget::~Widget()
Marek Rosa
Cleaned up demoLauncher
r2254 {
Marek Rosa
Quick demolauncher fix
r2252 }