[Foo2zjs-commits] r71 - / trunk trunk/hannah

white at alioth.debian.org white at alioth.debian.org
Fri Sep 28 09:22:21 UTC 2007


Author: white
Date: 2007-09-28 09:22:20 +0000 (Fri, 28 Sep 2007)
New Revision: 71

Added:
   trunk/hannah/
   trunk/hannah/gui.cpp
   trunk/hannah/gui.h
Removed:
   hannah/
   trunk/hannah/gui.cpp
   trunk/hannah/gui.h
Log:
Remove old one

Copied: trunk/hannah (from rev 68, hannah)

Deleted: trunk/hannah/gui.cpp
===================================================================
--- hannah/gui.cpp	2007-09-27 11:03:31 UTC (rev 68)
+++ trunk/hannah/gui.cpp	2007-09-28 09:22:20 UTC (rev 71)
@@ -1,165 +0,0 @@
-#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);
-	}
-
-	setWindowTitle(tr("Foo2zjs firmware downloader"));
-	QVBoxLayout *mainLayout = new QVBoxLayout;
-	hp2600Button = new QCheckBox(tr("Download firmware for HP2600"));
-	hp1600Button = new QCheckBox(tr("Download firmware for HP1600"));
-	hp1020Button = new QCheckBox(tr("Download firmware for HP1020"));
-	hp1018Button = new QCheckBox(tr("Download firmware for HP1018"));
-	hp1005Button = new QCheckBox(tr("Download firmware for HP1005"));
-	hp1000Button = new QCheckBox(tr("Download firmware for HP1000"));
-	minolta2530Button = new QCheckBox(tr("Download firmware for Minolta 2530"));
-	minolta2490Button = new QCheckBox(tr("Download firmware for Minolta 2490"));
-	minolta2480Button = new QCheckBox(tr("Download firmware for Minolta 2480"));
-	minolta2430Button = new QCheckBox(tr("Download firmware for Minolta 2430"));
-	minolta2300Button = new QCheckBox(tr("Download firmware for Minolta 2300"));
-	minolta2200Button = new QCheckBox(tr("Download firmware for Minolta 2200"));
-	minoltaproButton = new QCheckBox(tr("Download firmware for Minolta PageWorks/Pro L"));
-	samsung3160Button = new QCheckBox(tr("Download firmware for Samsung CLX-3160"));
-	samsung600Button = new QCheckBox(tr("Download firmware for Samsung CLP-600"));
-	samsung300Button = new QCheckBox(tr("Download firmware for Samsung CLP-300"));
-	xerox6115Button = new QCheckBox(tr("Download firmware for Xerox Phaser 6115"));
-	xerox6110Button = new QCheckBox(tr("Download firmware for Xerox Phaser 6110"));
-	QCheckBox *allButton = new QCheckBox(tr("Mark all for download"));
-	QPushButton *downloadButton = new QPushButton(tr("Download marked firmwares"));
-	QPushButton *exitButton = new QPushButton(tr("Exit"));
-	
-	hp2600Button->setFont(QFont("Times", 18));
-	hp1600Button->setFont(QFont("Times", 18));
-	hp1020Button->setFont(QFont("Times", 18));
-	hp1018Button->setFont(QFont("Times", 18));
-	hp1005Button->setFont(QFont("Times", 18));
-	hp1000Button->setFont(QFont("Times", 18));
-	minolta2530Button->setFont(QFont("Times", 18));
-	minolta2490Button->setFont(QFont("Times", 18));
-	minolta2480Button->setFont(QFont("Times", 18));
-	minolta2430Button->setFont(QFont("Times", 18));
-	minolta2300Button->setFont(QFont("Times", 18));
-	minolta2200Button->setFont(QFont("Times", 18));
-	minoltaproButton->setFont(QFont("Times", 18));
-	samsung3160Button->setFont(QFont("Times", 18));
-	samsung600Button->setFont(QFont("Times", 18));
-	samsung300Button->setFont(QFont("Times", 18));
-	xerox6115Button->setFont(QFont("Times", 18));
-	xerox6110Button->setFont(QFont("Times", 18));
-	allButton->setFont(QFont("Times", 18));
-	downloadButton->setFont(QFont("Times", 18));
-	exitButton->setFont(QFont("Times", 18));
-
-	mainLayout->addWidget(hp2600Button, 0, 0);
-	mainLayout->addWidget(hp1600Button, 1, 0);
-	mainLayout->addWidget(hp1020Button, 2, 0);
-	mainLayout->addWidget(hp1018Button, 3, 0);
-	mainLayout->addWidget(hp1005Button, 4, 0);
-	mainLayout->addWidget(hp1000Button, 5, 0);
-	mainLayout->addWidget(minolta2530Button, 6, 0);
-	mainLayout->addWidget(minolta2490Button, 7, 0);
-	mainLayout->addWidget(minolta2480Button, 8, 0);
-	mainLayout->addWidget(minolta2430Button, 9, 0);
-	mainLayout->addWidget(minolta2300Button, 10, 0);
-	mainLayout->addWidget(minolta2200Button, 11, 0);
-	mainLayout->addWidget(minoltaproButton, 12, 0);
-	mainLayout->addWidget(samsung3160Button, 13, 0);
-	mainLayout->addWidget(samsung600Button, 14, 0);
-	mainLayout->addWidget(samsung300Button, 15, 0);
-	mainLayout->addWidget(xerox6115Button, 16, 0);
-	mainLayout->addWidget(xerox6110Button, 17, 0);
-	mainLayout->addWidget(allButton, 18, 0);
-	mainLayout->addWidget(downloadButton, 19, 0);
-	mainLayout->addWidget(exitButton, 20, 0);
-        setMinimumSize(600, 700);
-        setLayout(mainLayout);
-	
-	connect(exitButton, SIGNAL(clicked()), qApp, SLOT(quit()));
-
-	connect(allButton, SIGNAL(stateChanged(int)), this, SLOT(setCheckBoxes(int)));
-	connect(downloadButton, SIGNAL(clicked()), this, SLOT(callGetweb()));
-};
-
-void MainWindow::setCheckBoxes(int state)
-{
-	switch (state) {
-		case 2:
-			hp2600Button->setCheckState(Qt::Checked);
-			hp1600Button->setCheckState(Qt::Checked);
-			hp1020Button->setCheckState(Qt::Checked);
-			hp1018Button->setCheckState(Qt::Checked);
-			hp1005Button->setCheckState(Qt::Checked);
-			hp1000Button->setCheckState(Qt::Checked);
-			minolta2530Button->setCheckState(Qt::Checked);
-			minolta2490Button->setCheckState(Qt::Checked);
-			minolta2480Button->setCheckState(Qt::Checked);
-			minolta2430Button->setCheckState(Qt::Checked);
-			minolta2300Button->setCheckState(Qt::Checked);
-			minolta2200Button->setCheckState(Qt::Checked);
-			minoltaproButton->setCheckState(Qt::Checked);
-			samsung3160Button->setCheckState(Qt::Checked);
-			samsung600Button->setCheckState(Qt::Checked);
-			samsung300Button->setCheckState(Qt::Checked);
-			xerox6115Button->setCheckState(Qt::Checked);
-			xerox6110Button->setCheckState(Qt::Checked);
-			break;
-		case 0:
-			hp2600Button->setCheckState(Qt::Unchecked);
-			hp1600Button->setCheckState(Qt::Unchecked);
-			hp1020Button->setCheckState(Qt::Unchecked);
-			hp1018Button->setCheckState(Qt::Unchecked);
-			hp1005Button->setCheckState(Qt::Unchecked);
-			hp1000Button->setCheckState(Qt::Unchecked);
-			minolta2530Button->setCheckState(Qt::Unchecked);
-			minolta2490Button->setCheckState(Qt::Unchecked);
-			minolta2480Button->setCheckState(Qt::Unchecked);
-			minolta2430Button->setCheckState(Qt::Unchecked);
-			minolta2300Button->setCheckState(Qt::Unchecked);
-			minolta2200Button->setCheckState(Qt::Unchecked);
-			minoltaproButton->setCheckState(Qt::Unchecked);
-			samsung3160Button->setCheckState(Qt::Unchecked);
-			samsung600Button->setCheckState(Qt::Unchecked);
-			samsung300Button->setCheckState(Qt::Unchecked);
-			xerox6115Button->setCheckState(Qt::Unchecked);
-			xerox6110Button->setCheckState(Qt::Unchecked);
-			break;
-		default:
-			break;
-		}
-}
-
-void MainWindow::callGetweb()
-{
-
-//	QObject *parent;
-
-	QString string_buttons = "hp2600Button, hp1600Button";
-	
-	QStringList list_buttons;
-	
-	list_buttons << string_buttons;
-	qDebug()<<list_buttons;
-
-	QList<QString>::iterator list;
-
-//	for(list=list_buttons.begin(); list <list_buttons.end(); ++list) {
-//		QCheckBox(list)->setCheckState(Qt::Checked);
-//	}
-	
-
-/*	QString getweb = "/usr/bin/getweb";
-	
-	QStringList firmware;
-
-	QProcess *newCall = new QProcess(parent);
-	newCall->start(getweb, firmware);
-*/
-};

Copied: trunk/hannah/gui.cpp (from rev 70, hannah/gui.cpp)
===================================================================
--- trunk/hannah/gui.cpp	                        (rev 0)
+++ trunk/hannah/gui.cpp	2007-09-28 09:22:20 UTC (rev 71)
@@ -0,0 +1,175 @@
+#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);
+	}
+
+	setWindowTitle(tr("Foo2zjs firmware downloader"));
+	QVBoxLayout *mainLayout = new QVBoxLayout;
+	hp2600Button = new QCheckBox(tr("Download firmware for HP2600"));
+	hp1600Button = new QCheckBox(tr("Download firmware for HP1600"));
+	hp1020Button = new QCheckBox(tr("Download firmware for HP1020"));
+	hp1018Button = new QCheckBox(tr("Download firmware for HP1018"));
+	hp1005Button = new QCheckBox(tr("Download firmware for HP1005"));
+	hp1000Button = new QCheckBox(tr("Download firmware for HP1000"));
+	minolta2530Button = new QCheckBox(tr("Download firmware for Minolta 2530"));
+	minolta2490Button = new QCheckBox(tr("Download firmware for Minolta 2490"));
+	minolta2480Button = new QCheckBox(tr("Download firmware for Minolta 2480"));
+	minolta2430Button = new QCheckBox(tr("Download firmware for Minolta 2430"));
+	minolta2300Button = new QCheckBox(tr("Download firmware for Minolta 2300"));
+	minolta2200Button = new QCheckBox(tr("Download firmware for Minolta 2200"));
+	minoltaproButton = new QCheckBox(tr("Download firmware for Minolta PageWorks/Pro L"));
+	samsung3160Button = new QCheckBox(tr("Download firmware for Samsung CLX-3160"));
+	samsung600Button = new QCheckBox(tr("Download firmware for Samsung CLP-600"));
+	samsung300Button = new QCheckBox(tr("Download firmware for Samsung CLP-300"));
+	xerox6115Button = new QCheckBox(tr("Download firmware for Xerox Phaser 6115"));
+	xerox6110Button = new QCheckBox(tr("Download firmware for Xerox Phaser 6110"));
+	QCheckBox *allButton = new QCheckBox(tr("Mark all for download"));
+	QPushButton *downloadButton = new QPushButton(tr("Download marked firmwares"));
+	QPushButton *exitButton = new QPushButton(tr("Exit"));
+	
+	hp2600Button->setFont(QFont("Times", 18));
+	hp1600Button->setFont(QFont("Times", 18));
+	hp1020Button->setFont(QFont("Times", 18));
+	hp1018Button->setFont(QFont("Times", 18));
+	hp1005Button->setFont(QFont("Times", 18));
+	hp1000Button->setFont(QFont("Times", 18));
+	minolta2530Button->setFont(QFont("Times", 18));
+	minolta2490Button->setFont(QFont("Times", 18));
+	minolta2480Button->setFont(QFont("Times", 18));
+	minolta2430Button->setFont(QFont("Times", 18));
+	minolta2300Button->setFont(QFont("Times", 18));
+	minolta2200Button->setFont(QFont("Times", 18));
+	minoltaproButton->setFont(QFont("Times", 18));
+	samsung3160Button->setFont(QFont("Times", 18));
+	samsung600Button->setFont(QFont("Times", 18));
+	samsung300Button->setFont(QFont("Times", 18));
+	xerox6115Button->setFont(QFont("Times", 18));
+	xerox6110Button->setFont(QFont("Times", 18));
+	allButton->setFont(QFont("Times", 18));
+	downloadButton->setFont(QFont("Times", 18));
+	exitButton->setFont(QFont("Times", 18));
+
+	mainLayout->addWidget(hp2600Button, 0, 0);
+	mainLayout->addWidget(hp1600Button, 1, 0);
+	mainLayout->addWidget(hp1020Button, 2, 0);
+	mainLayout->addWidget(hp1018Button, 3, 0);
+	mainLayout->addWidget(hp1005Button, 4, 0);
+	mainLayout->addWidget(hp1000Button, 5, 0);
+	mainLayout->addWidget(minolta2530Button, 6, 0);
+	mainLayout->addWidget(minolta2490Button, 7, 0);
+	mainLayout->addWidget(minolta2480Button, 8, 0);
+	mainLayout->addWidget(minolta2430Button, 9, 0);
+	mainLayout->addWidget(minolta2300Button, 10, 0);
+	mainLayout->addWidget(minolta2200Button, 11, 0);
+	mainLayout->addWidget(minoltaproButton, 12, 0);
+	mainLayout->addWidget(samsung3160Button, 13, 0);
+	mainLayout->addWidget(samsung600Button, 14, 0);
+	mainLayout->addWidget(samsung300Button, 15, 0);
+	mainLayout->addWidget(xerox6115Button, 16, 0);
+	mainLayout->addWidget(xerox6110Button, 17, 0);
+	mainLayout->addWidget(allButton, 18, 0);
+	mainLayout->addWidget(downloadButton, 19, 0);
+	mainLayout->addWidget(exitButton, 20, 0);
+        setMinimumSize(600, 700);
+        setLayout(mainLayout);
+
+	buttonGroup = new QButtonGroup;
+	buttonGroup->setExclusive(false);
+	buttonGroup->addButton(hp2600Button, 0);
+	buttonGroup->addButton(hp1600Button, 1);
+	buttonGroup->addButton(hp1020Button, 2);
+	buttonGroup->addButton(hp1018Button, 3);
+	buttonGroup->addButton(hp1005Button, 4);
+	buttonGroup->addButton(hp1000Button, 5);
+	buttonGroup->addButton(minolta2530Button, 6);
+	buttonGroup->addButton(minolta2490Button, 7);
+	buttonGroup->addButton(minolta2480Button, 8);
+	buttonGroup->addButton(minolta2430Button, 9);
+	buttonGroup->addButton(minolta2300Button, 10);
+	buttonGroup->addButton(minolta2200Button, 11);
+	buttonGroup->addButton(minoltaproButton, 12);
+	buttonGroup->addButton(samsung3160Button, 13);
+	buttonGroup->addButton(samsung600Button, 14);
+	buttonGroup->addButton(samsung300Button, 15);
+	buttonGroup->addButton(xerox6115Button, 16);
+	buttonGroup->addButton(xerox6110Button, 17);
+	
+	connect(exitButton, SIGNAL(clicked()), qApp, SLOT(quit()));
+
+	connect(allButton, SIGNAL(stateChanged(int)), this, SLOT(setCheckBoxes(int)));
+	connect(downloadButton, SIGNAL(clicked()), this, SLOT(callGetweb()));
+};
+
+void MainWindow::setCheckBoxes(int state)
+{
+	switch (state) {
+		case 2:
+			hp2600Button->setCheckState(Qt::Checked);
+			hp1600Button->setCheckState(Qt::Checked);
+			hp1020Button->setCheckState(Qt::Checked);
+			hp1018Button->setCheckState(Qt::Checked);
+			hp1005Button->setCheckState(Qt::Checked);
+			hp1000Button->setCheckState(Qt::Checked);
+			minolta2530Button->setCheckState(Qt::Checked);
+			minolta2490Button->setCheckState(Qt::Checked);
+			minolta2480Button->setCheckState(Qt::Checked);
+			minolta2430Button->setCheckState(Qt::Checked);
+			minolta2300Button->setCheckState(Qt::Checked);
+			minolta2200Button->setCheckState(Qt::Checked);
+			minoltaproButton->setCheckState(Qt::Checked);
+			samsung3160Button->setCheckState(Qt::Checked);
+			samsung600Button->setCheckState(Qt::Checked);
+			samsung300Button->setCheckState(Qt::Checked);
+			xerox6115Button->setCheckState(Qt::Checked);
+			xerox6110Button->setCheckState(Qt::Checked);
+			break;
+		case 0:
+			hp2600Button->setCheckState(Qt::Unchecked);
+			hp1600Button->setCheckState(Qt::Unchecked);
+			hp1020Button->setCheckState(Qt::Unchecked);
+			hp1018Button->setCheckState(Qt::Unchecked);
+			hp1005Button->setCheckState(Qt::Unchecked);
+			hp1000Button->setCheckState(Qt::Unchecked);
+			minolta2530Button->setCheckState(Qt::Unchecked);
+			minolta2490Button->setCheckState(Qt::Unchecked);
+			minolta2480Button->setCheckState(Qt::Unchecked);
+			minolta2430Button->setCheckState(Qt::Unchecked);
+			minolta2300Button->setCheckState(Qt::Unchecked);
+			minolta2200Button->setCheckState(Qt::Unchecked);
+			minoltaproButton->setCheckState(Qt::Unchecked);
+			samsung3160Button->setCheckState(Qt::Unchecked);
+			samsung600Button->setCheckState(Qt::Unchecked);
+			samsung300Button->setCheckState(Qt::Unchecked);
+			xerox6115Button->setCheckState(Qt::Unchecked);
+			xerox6110Button->setCheckState(Qt::Unchecked);
+			break;
+		default:
+			break;
+		}
+}
+
+void MainWindow::callGetweb()
+{
+	QAbstractButton *a;
+	int count = 0;
+	QStringList current_list;
+	current_list << "hp2600" << "hp1600" << "hp1020" << "hp1018" << "hp1005" << "hp1000" << "minolta2530" << "minolta2490" << "minolta2480" << "minolta2430" << "minolta2300" << "minolta2200" << "minoltapro" << "samsung3160" << "samsung600" << "samsung300" << "xerox6115" << "xerox6110";
+
+	foreach( a, buttonGroup->buttons() ) {
+		if ( a->isChecked() ) {
+			arguments << current_list.at(count);
+		}
+		count++;
+	}
+	// Make sure to empty arguments, after it is used for the script
+	qDebug()<<arguments;
+};

Deleted: trunk/hannah/gui.h
===================================================================
--- hannah/gui.h	2007-09-27 11:03:31 UTC (rev 68)
+++ trunk/hannah/gui.h	2007-09-28 09:22:20 UTC (rev 71)
@@ -1,50 +0,0 @@
-#ifndef GUI_H
-#define GUI_H
-
-#include <QMainWindow>
-#include <QWidget>
-#include <QVBoxLayout>
-#include <QPushButton>
-#include <QMessageBox>
-#include <QApplication>
-#include <QProcess>
-#include <QCheckBox>
-
-#include <QDebug>
-
-class MainWindow : public QWidget
-{
-	Q_OBJECT
-
-public:
-	MainWindow(QWidget *parent = 0);
-
-private:
-	int state;
-	
-	QCheckBox *hp2600Button;
-	QCheckBox *hp1600Button;
-	QCheckBox *hp1020Button;
-	QCheckBox *hp1018Button;
-	QCheckBox *hp1005Button;
-	QCheckBox *hp1000Button;
-	QCheckBox *minolta2530Button;
-	QCheckBox *minolta2490Button;
-	QCheckBox *minolta2480Button;
-	QCheckBox *minolta2430Button;
-	QCheckBox *minolta2300Button;
-	QCheckBox *minolta2200Button;
-	QCheckBox *minoltaproButton;
-	QCheckBox *samsung3160Button;
-	QCheckBox *samsung600Button;
-	QCheckBox *samsung300Button;
-	QCheckBox *xerox6115Button;
-	QCheckBox *xerox6110Button;
-	
-
-private slots:
-	void callGetweb();
-	void setCheckBoxes(int);
-};
-
-#endif // GUI_H

Copied: trunk/hannah/gui.h (from rev 70, hannah/gui.h)
===================================================================
--- trunk/hannah/gui.h	                        (rev 0)
+++ trunk/hannah/gui.h	2007-09-28 09:22:20 UTC (rev 71)
@@ -0,0 +1,54 @@
+#ifndef GUI_H
+#define GUI_H
+
+#include <QMainWindow>
+#include <QWidget>
+#include <QVBoxLayout>
+#include <QPushButton>
+#include <QMessageBox>
+#include <QApplication>
+#include <QProcess>
+#include <QCheckBox>
+#include <QAbstractButton>
+#include <QButtonGroup>
+
+#include <QDebug>
+
+class MainWindow : public QWidget
+{
+	Q_OBJECT
+
+public:
+	MainWindow(QWidget *parent = 0);
+
+private:
+	int state;
+
+	QCheckBox *hp2600Button;
+	QCheckBox *hp1600Button;
+	QCheckBox *hp1020Button;
+	QCheckBox *hp1018Button;
+	QCheckBox *hp1005Button;
+	QCheckBox *hp1000Button;
+	QCheckBox *minolta2530Button;
+	QCheckBox *minolta2490Button;
+	QCheckBox *minolta2480Button;
+	QCheckBox *minolta2430Button;
+	QCheckBox *minolta2300Button;
+	QCheckBox *minolta2200Button;
+	QCheckBox *minoltaproButton;
+	QCheckBox *samsung3160Button;
+	QCheckBox *samsung600Button;
+	QCheckBox *samsung300Button;
+	QCheckBox *xerox6115Button;
+	QCheckBox *xerox6110Button;
+	QButtonGroup *buttonGroup;
+
+	QStringList arguments;
+
+private slots:
+	void callGetweb();
+	void setCheckBoxes(int);
+};
+
+#endif // GUI_H




More information about the Foo2zjs-commits mailing list