#include <QDebug>
#include "usersettings.h"
+/**
+ *
+ */
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
topResultDialog = NULL;
settingsDialog = new SettingsDialog;
- connect(settingsDialog,SIGNAL(sendregistration()),this,SLOT(clientRegUserToServer()));
- connect(settingsDialog,SIGNAL(userNameChanged()),this,SLOT(clientUserLogin()));
- connect(settingsDialog, SIGNAL(logout()), this, SLOT(setUsernameToMainPanel()));
+ connect(settingsDialog, SIGNAL(sendregistration()), this, SLOT(clientRegUserToServer()));
+ connect(settingsDialog, SIGNAL(userNameChanged()), this, SLOT(clientUserLogin()));
+ connect(settingsDialog, SIGNAL(logout()), this, SLOT(setUsernameToMainPanel()));
+ connect(settingsDialog, SIGNAL(saveprofile()), this, SLOT(saveProfile()));
httpClient = new HttpClient(this);
connect(httpClient->myXmlreader, SIGNAL(receivedCategoryList()), this, SLOT(setCategoryCompoBox()));
customButtonResults->show();
}
+/**
+ *
+ */
MainWindow::~MainWindow()
{
delete ui;
}
+/**
+ *
+ */
void MainWindow::changeEvent(QEvent *e)
{
QMainWindow::changeEvent(e);
httpClient->sendResultXml(category, result);
}
}
+
/**
* This slot function called when ever dialog rejected.
*/
helpDialog = NULL;
}
}
+
/**
*
*/
connect(topResultDialog, SIGNAL(rejected()), this, SLOT(killDialog()));
topResultDialog->show();
}
+
+/**
+ * This slot function save user profile data to server
+ */
+void MainWindow::saveProfile()
+{
+ if(httpClient)
+ httpClient->sendProfileXml();
+}