protobuf client->server communication almost working

This commit is contained in:
Max-Wilhelm Bruker 2011-12-18 18:35:14 +01:00
parent 4eb9dfc5bf
commit 314f17091d
96 changed files with 1633 additions and 860 deletions

View file

@ -9,7 +9,8 @@
#include <QLineEdit>
#include "tab_admin.h"
#include "abstractclient.h"
#include "protocol_items.h"
#include "pb/admin_commands.pb.h"
ShutdownDialog::ShutdownDialog(QWidget *parent)
: QDialog(parent)
@ -100,14 +101,19 @@ void TabAdmin::retranslateUi()
void TabAdmin::actUpdateServerMessage()
{
client->sendCommand(new Command_UpdateServerMessage());
client->sendCommand(client->prepareAdminCommand(Command_UpdateServerMessage()));
}
void TabAdmin::actShutdownServer()
{
ShutdownDialog dlg;
if (dlg.exec())
client->sendCommand(new Command_ShutdownServer(dlg.getReason(), dlg.getMinutes()));
if (dlg.exec()) {
Command_ShutdownServer cmd;
cmd.set_reason(dlg.getReason().toStdString());
cmd.set_minutes(dlg.getMinutes());
client->sendCommand(client->prepareAdminCommand(cmd));
}
}
void TabAdmin::actUnlock()