[Foo2zjs-commits] r60 - / download-gui
white at alioth.debian.org
white at alioth.debian.org
Tue Sep 25 15:08:24 UTC 2007
Author: white
Date: 2007-09-25 15:08:24 +0000 (Tue, 25 Sep 2007)
New Revision: 60
Added:
download-gui/
download-gui/download-gui.pro
download-gui/gui.cpp
download-gui/gui.h
download-gui/main.cpp
Log:
First version of a download gui thingy around getweb (just to evaluate)
Added: download-gui/download-gui.pro
===================================================================
--- download-gui/download-gui.pro (rev 0)
+++ download-gui/download-gui.pro 2007-09-25 15:08:24 UTC (rev 60)
@@ -0,0 +1,12 @@
+######################################################################
+# Automatically generated by qmake (2.01a) Tue Sep 25 23:32:57 2007
+######################################################################
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+HEADERS += gui.h
+SOURCES += gui.cpp main.cpp
Added: download-gui/gui.cpp
===================================================================
--- download-gui/gui.cpp (rev 0)
+++ download-gui/gui.cpp 2007-09-25 15:08:24 UTC (rev 60)
@@ -0,0 +1,33 @@
+#include "gui.h"
+
+MainWindow::MainWindow(QWidget *parent)
+ :QWidget(parent)
+{
+ int check = QMessageBox::question(this, tr("Firmware downloader"),
+ tr("Do you want to proceed? (Fill me with text)"), tr("&Yes"), tr("&No"),
+ QString::null, 0, 1);
+
+
+ if (! check == 0 ) {
+ exit(0);
+ }
+ qDebug()<<check;
+
+ setWindowTitle(tr("Firmware download"));
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ QPushButton *hpButton = new QPushButton(tr("Download HP-blablabla"));
+ QPushButton *firmButton = new QPushButton(tr("Download really-non-free-blablabla"));
+ QPushButton *exitButton = new QPushButton(tr("Exit"));
+
+ hpButton->setFont(QFont("Times", 18));
+ firmButton->setFont(QFont("Times", 18));
+ exitButton->setFont(QFont("Times", 18));
+
+ mainLayout->addWidget(hpButton, 0, 0);
+ mainLayout->addWidget(firmButton, 1, 0);
+ mainLayout->addWidget(exitButton, 2, 0);
+ setMinimumSize(400, 200);
+ setLayout(mainLayout);
+
+ connect(exitButton, SIGNAL(clicked()), qApp, SLOT(quit()));
+};
Added: download-gui/gui.h
===================================================================
--- download-gui/gui.h (rev 0)
+++ download-gui/gui.h 2007-09-25 15:08:24 UTC (rev 60)
@@ -0,0 +1,24 @@
+#ifndef GUI_H
+#define GUI_H
+
+#include <QMainWindow>
+#include <QWidget>
+#include <QVBoxLayout>
+#include <QPushButton>
+#include <QMessageBox>
+#include <QAction>
+#include <QApplication>
+#include <QAbstractButton>
+
+#include <QDebug>
+
+class MainWindow : public QWidget
+{
+ Q_OBJECT
+
+public:
+ MainWindow(QWidget *parent = 0);
+
+};
+
+#endif // GUI_H
Added: download-gui/main.cpp
===================================================================
--- download-gui/main.cpp (rev 0)
+++ download-gui/main.cpp 2007-09-25 15:08:24 UTC (rev 60)
@@ -0,0 +1,10 @@
+#include <QApplication>
+#include "gui.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow window;
+ window.show();
+ return app.exec();
+}
More information about the Foo2zjs-commits
mailing list