1- #ifndef MAINWINDOW_HPP
2- #define MAINWINDOW_HPP
1+ #ifndef MainWindow_HPP
2+ #define MainWindow_HPP
33
44#include < QtCore/QVariant>
55#include < QtGui/QIcon>
1313
1414QT_BEGIN_NAMESPACE
1515
16- class Ui_MainWindow {
16+ class Ui_MainWindow
17+ {
1718public:
1819 QWidget *centralwidget;
1920 QPushButton *btnRun;
@@ -23,31 +24,22 @@ class Ui_MainWindow {
2324 QLabel *labelUnitSelected;
2425 QStatusBar *statusbar;
2526
26- void setupUi (QMainWindow *MainWindow) {
27+ void setupUi (QMainWindow *MainWindow)
28+ {
2729 if (MainWindow->objectName ().isEmpty ())
2830 MainWindow->setObjectName (" MainWindow" );
29- MainWindow->resize (586 , 421 );
30- QSizePolicy sizePolicy (QSizePolicy::Policy::Fixed, QSizePolicy::Policy::Fixed);
31- sizePolicy.setHorizontalStretch (0 );
32- sizePolicy.setVerticalStretch (0 );
33- sizePolicy.setHeightForWidth (MainWindow->sizePolicy ().hasHeightForWidth ());
34- MainWindow->setSizePolicy (sizePolicy);
35- MainWindow->setMinimumSize (QSize (586 , 421 ));
36- MainWindow->setMaximumSize (QSize (586 , 421 ));
37- QIcon icon;
38- icon.addFile (QString::fromUtf8 (" RunAsGPU_Icon.png" ), QSize (), QIcon::Mode::Normal, QIcon::State::Off);
39- MainWindow->setWindowIcon (icon);
31+ MainWindow->resize (660 , 460 );
32+ MainWindow->setFixedSize (QSize (660 , 460 ));
4033 centralwidget = new QWidget (MainWindow);
4134 centralwidget->setObjectName (" centralwidget" );
4235 btnRun = new QPushButton (centralwidget);
4336 btnRun->setObjectName (" btnRun" );
44- btnRun->setGeometry (QRect (467 , 310 , 111 , 34 ));
37+ btnRun->setGeometry (QRect (530 , 310 , 111 , 34 ));
4538 appList = new QListView (centralwidget);
4639 appList->setObjectName (" appList" );
47- appList->setGeometry (QRect (0 , 20 , 581 , 281 ));
48- appList->setStyleSheet (" QListView::item:selected { background-color: #0078d7; }" );
49- appList->setFocusPolicy (Qt::StrongFocus);
40+ appList->setGeometry (QRect (10 , 20 , 641 , 281 ));
5041 appList->setSelectionBehavior (QAbstractItemView::SelectionBehavior::SelectRows);
42+ appList->setWordWrap (true );
5143 btnApplicationAdd = new QPushButton (centralwidget);
5244 btnApplicationAdd->setObjectName (" btnApplicationAdd" );
5345 btnApplicationAdd->setGeometry (QRect (0 , 310 , 121 , 34 ));
@@ -56,7 +48,8 @@ class Ui_MainWindow {
5648 btnUnitSelector->setGeometry (QRect (130 , 310 , 88 , 34 ));
5749 labelUnitSelected = new QLabel (centralwidget);
5850 labelUnitSelected->setObjectName (" labelUnitSelected" );
59- labelUnitSelected->setGeometry (QRect (0 , 350 , 571 , 31 ));
51+ labelUnitSelected->setGeometry (QRect (10 , 350 , 631 , 71 ));
52+ labelUnitSelected->setWordWrap (true );
6053 MainWindow->setCentralWidget (centralwidget);
6154 statusbar = new QStatusBar (MainWindow);
6255 statusbar->setObjectName (" statusbar" );
@@ -66,26 +59,26 @@ class Ui_MainWindow {
6659
6760 QMetaObject::connectSlotsByName (MainWindow);
6861
69- performLogic ();
62+ performLogic (MainWindow );
7063 } // setupUi
7164
72- void retranslateUi (QMainWindow *MainWindow) const {
65+ void retranslateUi (QMainWindow *MainWindow)
66+ {
7367 MainWindow->setWindowTitle (QCoreApplication::translate (" MainWindow" , " RunAsGPU" , nullptr ));
7468 btnRun->setText (QCoreApplication::translate (" MainWindow" , " Run Application" , nullptr ));
7569 btnApplicationAdd->setText (QCoreApplication::translate (" MainWindow" , " Add Application" , nullptr ));
7670 btnUnitSelector->setText (QCoreApplication::translate (" MainWindow" , " Select GPU" , nullptr ));
7771 labelUnitSelected->setText (QCoreApplication::translate (" MainWindow" , " Selected GPU: {{UNIT}}" , nullptr ));
7872 } // retranslateUi
7973
80- void performLogic () const ;
74+ void performLogic (QMainWindow* window ) const ;
8175
8276};
8377
8478namespace Ui {
85- class MainWindow : public Ui_MainWindow {
86- };
79+ class MainWindow : public Ui_MainWindow {};
8780} // namespace Ui
8881
8982QT_END_NAMESPACE
9083
91- #endif // MAINWINDOW_HPP
84+ #endif // MainWindow_HPP
0 commit comments