Initial (testing) layout for emulauncher.
authorMikko Keinänen <mikko.keinanen@gmail.com>
Tue, 28 Sep 2010 21:24:51 +0000 (00:24 +0300)
committerMikko Keinänen <mikko.keinanen@gmail.com>
Tue, 28 Sep 2010 21:24:51 +0000 (00:24 +0300)
src/emulauncher.cpp
src/emulauncher.h

index fe4206a..24afb36 100644 (file)
 // You should have received a copy of the GNU General Public License
 // along with EmuFront.  If not, see <http://www.gnu.org/licenses/>.
 
+#include <QtGui>
 #include "emulauncher.h"
 
 EmuLauncher::EmuLauncher(QWidget *parent) :
     QWidget(parent)
 {
+    initWidgets();
+    layout();
+    //connectSignals();
+}
+
+void EmuLauncher::initWidgets()
+{
+    //micTable = new QTableView(this);
+    mediaTypeSelectBox = new QComboBox;
+    platformSelectBox = new QComboBox;
+    selectButton = new QPushButton(tr("&Update"));
+    //populateMediaTypeSelectBox();
+    //populatePlatformSelectBox();
 }
 
 void EmuLauncher::layout()
 {
-    micTable = 0;
-    mediaTypeSelectBox = 0;
-    platformSelectBox = 0;
+    QGridLayout *grid = new QGridLayout;
+    grid->addWidget(platformSelectBox, 0, 0);
+    grid->addWidget(mediaTypeSelectBox, 1, 0);
+    grid->addWidget(selectButton, 2, 0);
+    //grid->addWidget(micTable, 3, 0);
+    setLayout(grid);
 }
 
 void EmuLauncher::connectSignals()
 {
+    connect(selectButton, SIGNAL(clicked()), this, SLOT(updateMediaImageContainers()));
 }
 
 void EmuLauncher::populateMediaTypeSelectBox()
@@ -42,3 +60,7 @@ void EmuLauncher::populateMediaTypeSelectBox()
 void EmuLauncher::populatePlatformSelectBox()
 {
 }
+
+void EmuLauncher::updateMediaImageContainers()
+{
+}
index 821ccac..b51f711 100644 (file)
@@ -24,6 +24,7 @@
 
 class QTableView;
 class QComboBox;
+class QPushButton;
 
 class EmuLauncher : public QWidget
 {
@@ -33,12 +34,15 @@ public:
 
 signals:
 
-public slots:
+private slots:
+    void updateMediaImageContainers();
 
 private:
     QTableView *micTable;
     QComboBox *platformSelectBox;
     QComboBox *mediaTypeSelectBox;
+    QPushButton *selectButton;
+    void initWidgets();
     void layout();
     void connectSignals();
     void populatePlatformSelectBox();