Modified welcome text file so it shows proper names in the reporsitory
[confmgr] / src / mainwindow.cpp
index 1afe99a..6b7a6b8 100644 (file)
@@ -1,6 +1,7 @@
 #include "mainwindow.h"
 #include "ui_mainwindow.h"
 #include "xmlutil.h"
+#include "aboutdialog.h"
 #include <QDebug>
 #include <QMessageBox>
 
@@ -11,6 +12,10 @@ MainWindow::MainWindow(QWidget *parent) :
     ui->setupUi(this);
     connect(&mFrmAddProfile, SIGNAL(ProfileAddedSuccessfully(Profile)),
             this, SLOT(updateProfileList(Profile)));
+/*
+    connect(&ui->mainMenuAbout, SIGNAL(Triggered(QAction*)),
+            this, SLOT(mainAboutClickedSlot()));
+*/
     Initialize();
 }
 
@@ -104,5 +109,27 @@ void MainWindow::on_mainPBEditProfile_clicked()
     qDebug() << "Profile to be Edited: " << endl << Xmlutil::generateProfileXML(p);
     mFrmAddProfile.setParent(this, Qt::Window);
     mFrmAddProfile.setAttribute(Qt::WA_Maemo5StackedWindow);
+    mFrmAddProfile.clear();
     mFrmAddProfile.showProfile(p);
 }
+
+void MainWindow::on_mainPBQuit_clicked()
+{
+    mConfig.writeAllProfiles();
+    mConfig.closeConfig();
+    close();
+}
+
+void MainWindow::on_actionAbout_triggered()
+{
+    AboutDialog abtdlg;
+    abtdlg.exec();
+}
+
+void MainWindow::on_actionAdd_Templated_Profile_triggered()
+{
+    QMessageBox msg;
+    msg.setText("Placeholder for a nice function yet to be implemented!");
+    msg.exec();
+    return;
+}