1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
/*
* createfavouritedialog.cpp
* ui
*
* Created by Mikael Gransell on 4/18/06.
* Copyright 2006 __MyCompanyName__. All rights reserved.
*
*/
#include "createfavouritedialog.h"
#include "rpctypes.h"
CreateFavouriteDialog::CreateFavouriteDialog( const BackendConnectionPtr& backendConn,
QWidget* parent )
: QDialog(parent),
backendConnection(backendConn)
{
ui.setupUi(this);
}
void CreateFavouriteDialog::on_createButton_clicked()
{
rpc_types::FavouriteHub hubEntry;
hubEntry.name = ui.nameEdit->text().toStdString();
hubEntry.server = ui.serverEdit->text().toStdString();
hubEntry.nick = ui.nickEdit->text().toStdString();
hubEntry.password = ui.pwdEdit->text().toStdString();
hubEntry.autoConnect = ui.autoConnectCheckBox->isChecked();
// Add the favourite and close the dialog
backendConnection->addFavouriteHub(hubEntry);
done(QDialog::Accepted);
}
|