#include <libconfig.h>
-class VLPEntry {
-public:
- int ID;
- char addr[255];
- /** 0 - explicit */
- int type;
- char progdir[255];
- char homedir[255];
- char item[255];
-};
-
-class QInstall: public QMainWindow {
- Q_OBJECT
-public:
- QMenuBar *bar;
- Q3ListBox *nodelist;
- QPushButton *infob;
- QList<VLPEntry*> Nodes;
-
- QInstall();
- bool check_id(int);
- bool check_addr(char*);
-
-public slots:
- void SetOptions();
- void AddNode();
- void DelNode();
- void Info();
-};
-
+#include "lgconfig.h"
QApplication *app;
QInstall::QInstall()
{
- QFont f("Helvetica", 12, QFont::Bold);
- QPixmap mp;
-
-// infob = new QPushButton(this);
-
- setWindowTitle("VLP Configuration Tool");
-
- QMenu * programMenu = NULL;
- programMenu = menuBar()->addMenu("&Program");
- programMenu->addAction("Configure", this, SLOT(SetOptions()));
- programMenu->addAction("Quit", app, SLOT(quit()));
-
-// bar = new QMenuBar(this);
-// bar->insertItem("Configure", this, SLOT(SetOptions()));
-// bar->insertItem("Quit", app, SLOT(quit()));
-// bar->setFont(f);
-// infob->setGeometry(0, bar->height(), 200, 30);
- if (mp.load("logo.bmp")) {
-// infob->setPixmap(mp);
-// infob->resize(mp.width(), mp.height());
- }
-// resize(infob->width(), infob->height() + bar->height());
+ setupUi(this);
+
Nodes.clear();
}
return TRUE;
}
-/**
- * @attention Currently not in use
- */
-void QInstall::Info()
-{
-}
-
void QInstall::AddNode()
{
QDialog dlg(this);
}
}
-void QInstall::SetOptions()
+void QInstall::on_actionConfigure_triggered()
{
QDialog dlg(this);
QLabel *tmpQLabel;
}
}
-#include "lgconfig.moc"
+
+void QInstall::on_actionQuit_triggered()
+{
+ QApplication::instance()->quit();
+}
+
int main(int argc, char **argv)
{