]> Devoid-pointer.net GitWeb - FFBChecker.git/commitdiff
Use version string as main window title.
authorMichal Malý <madcatxster@prifuk.cz>
Fri, 26 Jul 2013 08:44:09 +0000 (10:44 +0200)
committerMichal Malý <madcatxster@prifuk.cz>
Fri, 26 Jul 2013 08:44:09 +0000 (10:44 +0200)
main.cpp
mainwindow.cpp
mainwindow.h

index 8dd2256eef6af356c1dd649e466fa0de9d649db8..4d8e1faeda554634212f5788d94bc2c1e6b4b164 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -1,16 +1,14 @@
 #include "deviceprober.h"
 #include "mainwindow.h"
 #include <QtWidgets/QApplication>
-#include <QDebug>
 
 int main(int argc, char** argv)
 {
   QApplication myApp(argc, argv);
   const QString VERSION_STRING = QString(APP_NAME) + " " + QString::number(APP_VERSION_MAJOR) + "." + QString::number(APP_VERSION_MINOR) +
                                  QString(APP_VERSION_REL);
-  qDebug() << VERSION_STRING;
   std::shared_ptr<DeviceProber> prober(new DeviceProber);
-  MainWindow* mWin = new MainWindow(prober);
+  MainWindow* mWin = new MainWindow(prober, VERSION_STRING);
 
   mWin->show();
   return myApp.exec();
index 69ff348acf93b91aa95ca96ac278ae3a1206f409..7a3ee0f03af3b5e28f3fdb2715556bdbadaa6445 100644 (file)
@@ -8,12 +8,13 @@ const QString MainWindow::res_effectPlaying("Playing");
 const QString MainWindow::res_effectStopped("Stopped");
 const QString MainWindow::res_inputFormatErrCap("Invalid input format.");
 
-MainWindow::MainWindow(std::shared_ptr<DeviceProber> prober, QWidget* parent) :
+MainWindow::MainWindow(std::shared_ptr<DeviceProber> prober, const QString& title, QWidget* parent) :
   QMainWindow(parent),
   m_prober(prober),
   ui(new Ui::MainWindow)
 {
   ui->setupUi(this);
+  this->setWindowTitle(title);
 
   m_constantEffSet = new ConstantEffectSettings();
   m_periodicEffSet = new PeriodicEffectSettings();
index 7b6e373773757ff338fa4856e7447a78d28cdb3b..f134b9f0a4adad42dd0507b6547ec6c7754b4458 100644 (file)
@@ -19,7 +19,7 @@ class MainWindow : public QMainWindow
   Q_OBJECT
 
 public:
-  explicit MainWindow(std::shared_ptr<DeviceProber> prober, QWidget* parent = 0);
+  explicit MainWindow(std::shared_ptr<DeviceProber> prober, const QString& title, QWidget* parent = 0);
   ~MainWindow();
 
 private: