From: Rafał Długołęcki Date: Thu, 28 Jan 2016 21:24:54 +0000 (+0100) Subject: Restructure code X-Git-Tag: 3.4-b1~26 X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=f43129215d9cc2dcd6bf5f2a4c6b1bebec34de16;p=vlp.git Restructure code --- diff --git a/Makefile.am b/Makefile.am index f936788..c074aeb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -87,10 +87,10 @@ bin_logker_HEADERS = \ src/kernel/kernel.moc.cpp: \ src/kernel/kernel.h \ src/kernel/ui/kernelwindow.h \ - src/kernel/ui/lock_dialog.h \ - src/kernel/ui/optionsdialog.h \ - src/kernel/ui/kill_dialog.h \ - src/kernel/ui/connect_dialog.h + src/kernel/ui/dialogs/LockDialog.h \ + src/kernel/ui/dialogs/OptionsDialog.h \ + src/kernel/ui/dialogs/KillDialog.h \ + src/kernel/ui/dialogs/ConnectDialog.h moc-qt4 src/kernel/kernel.h -o src/kernel/kernel.moc.cpp moc-qt4 src/kernel/options.h -o src/kernel/options.moc.cpp # $(MOC) -i src/kernel/kernel.cpp -o src/kernel/kernel.moc @@ -98,27 +98,24 @@ src/kernel/kernel.moc.cpp: \ src/kernel/ui/kernelwindow.h: uic src/kernel/ui/kernelwindow.ui -o src/kernel/ui/kernelwindow.h -src/kernel/ui/lock_dialog.h: - uic src/kernel/ui/lock_dialog.ui -o src/kernel/ui/lock_dialog.h +src/kernel/ui/dialogs/LockDialog.h: + uic src/kernel/ui/dialogs/LockDialog.ui -o src/kernel/ui/dialogs/LockDialog.h -src/kernel/ui/optionsdialog.h: - uic src/kernel/ui/optionsdialog.ui -o src/kernel/ui/optionsdialog.h +src/kernel/ui/dialogs/OptionsDialog.h: + uic src/kernel/ui/dialogs/OptionsDialog.ui -o src/kernel/ui/dialogs/OptionsDialog.h -src/kernel/ui/kill_dialog.h: - uic src/kernel/ui/kill_dialog.ui -o src/kernel/ui/kill_dialog.h +src/kernel/ui/dialogs/KillDialog.h: + uic src/kernel/ui/dialogs/KillDialog.ui -o src/kernel/ui/dialogs/KillDialog.h -src/kernel/ui/connect_dialog.h: - uic src/kernel/ui/connect_dialog.ui -o src/kernel/ui/connect_dialog.h +src/kernel/ui/dialogs/ConnectDialog.h: + uic src/kernel/ui/dialogs/ConnectDialog.ui -o src/kernel/ui/dialogs/ConnectDialog.h clean-logker-extra: rm -f src/kernel/*.moc rm -f src/kernel/*.moc.cpp - rm -f src/kernel/ui/kernelwindow.h - rm -f src/kernel/ui/lock_dialog.h - rm -f src/kernel/ui/optionsdialog.h - rm -f src/kernel/ui/kill_dialog.h - rm -f src/kernel/ui/connect_dialog.h + rm -f src/kernel/ui/dialogs/*.h + rm -f src/kernel/ui/*.h rm -f bin/logker bin_logint_SOURCES = \ diff --git a/src/kernel/connect_dialog.cpp b/src/kernel/connect_dialog.cpp index 9484101..26b4a83 100644 --- a/src/kernel/connect_dialog.cpp +++ b/src/kernel/connect_dialog.cpp @@ -4,6 +4,7 @@ namespace loglan { namespace vlp { +namespace dialog { ConnectDialog::ConnectDialog(QWidget * parent) : QDialog(parent, Qt::Dialog) @@ -22,3 +23,4 @@ QString ConnectDialog::getAddress() } } +} diff --git a/src/kernel/connect_dialog.h b/src/kernel/connect_dialog.h index 4219d33..58cd994 100644 --- a/src/kernel/connect_dialog.h +++ b/src/kernel/connect_dialog.h @@ -4,10 +4,11 @@ #include #include -#include "ui/connect_dialog.h" +#include "ui/dialogs/ConnectDialog.h" namespace loglan { namespace vlp { +namespace dialog { /** * Kill Interpreter Dialog class @@ -20,6 +21,7 @@ public: QString getAddress(); }; +} } } diff --git a/src/kernel/kernel.cpp b/src/kernel/kernel.cpp index a37c894..6e9beec 100644 --- a/src/kernel/kernel.cpp +++ b/src/kernel/kernel.cpp @@ -411,7 +411,7 @@ void QKernel::on_actionConnect_triggered() { MESSAGE m; - ConnectDialog dialog(this); + dialog::ConnectDialog dialog(this); dialog.setWindowTitle("IP Address:"); if (dialog.exec()) { @@ -527,7 +527,7 @@ void QKernel::on_actionMessage_triggered() */ void QKernel::on_actionKill_triggered() { - KillInterpreterDialog dialog(this); + dialog::KillInterpreterDialog dialog(this); dialog.setWindowTitle("Kill interpreter"); if (dialog.exec()) { @@ -783,7 +783,7 @@ void QKernel::on_actionInfo_messages_triggered() */ void QKernel::on_actionOptions_triggered() { - OptionsDialog optionsDialog(getConfigFilePath(), this); + dialog::OptionsDialog optionsDialog(getConfigFilePath(), this); if (optionsDialog.exec()) { optionsDialog.saveConfig(getConfigFilePath()); @@ -798,7 +798,7 @@ void QKernel::on_actionOptions_triggered() */ void QKernel::on_actionLock_console_triggered() { - LockDialog lockDialog(this); + dialog::LockDialog lockDialog(this); if (lockDialog.exec()) { QString password = lockDialog.getPassword(); @@ -832,7 +832,7 @@ void QKernel::on_actionLock_console_triggered() */ void QKernel::on_actionUnlock_console_triggered() { - LockDialog lockDialog(this); + dialog::LockDialog lockDialog(this); if (lockDialog.exec()) { QString password = lockDialog.getPassword(); diff --git a/src/kernel/kill_interpreter_dialog.cpp b/src/kernel/kill_interpreter_dialog.cpp index 409e191..9e2e823 100644 --- a/src/kernel/kill_interpreter_dialog.cpp +++ b/src/kernel/kill_interpreter_dialog.cpp @@ -4,6 +4,7 @@ namespace loglan { namespace vlp { +namespace dialog { KillInterpreterDialog::KillInterpreterDialog(QWidget * parent) : QDialog(parent, Qt::Dialog) @@ -22,3 +23,4 @@ int KillInterpreterDialog::getInterpreterId() } } +} diff --git a/src/kernel/kill_interpreter_dialog.h b/src/kernel/kill_interpreter_dialog.h index a7eabdf..2e0f931 100644 --- a/src/kernel/kill_interpreter_dialog.h +++ b/src/kernel/kill_interpreter_dialog.h @@ -3,10 +3,11 @@ #include -#include "ui/kill_dialog.h" +#include "ui/dialogs/KillDialog.h" namespace loglan { namespace vlp { +namespace dialog { /** * Kill Interpreter Dialog class @@ -19,6 +20,7 @@ public: int getInterpreterId(); }; +} } } diff --git a/src/kernel/lock.cpp b/src/kernel/lock.cpp index 8f71c0a..6a4fe08 100644 --- a/src/kernel/lock.cpp +++ b/src/kernel/lock.cpp @@ -4,6 +4,7 @@ namespace loglan { namespace vlp { +namespace dialog { LockDialog::LockDialog(QWidget * parent) : QDialog(parent, Qt::Dialog) @@ -28,3 +29,4 @@ void LockDialog::retype() } } +} diff --git a/src/kernel/lock.h b/src/kernel/lock.h index 2c29f0a..7ddd6ac 100644 --- a/src/kernel/lock.h +++ b/src/kernel/lock.h @@ -3,10 +3,11 @@ #include -#include "ui/lock_dialog.h" +#include "ui/dialogs/LockDialog.h" namespace loglan { namespace vlp { +namespace dialog { /** * Lock Dialog class @@ -20,6 +21,7 @@ public: void retype(); }; +} } } diff --git a/src/kernel/options.cpp b/src/kernel/options.cpp index dc11652..e3d20b7 100644 --- a/src/kernel/options.cpp +++ b/src/kernel/options.cpp @@ -6,6 +6,7 @@ namespace loglan { namespace vlp { +namespace dialog { OptionsDialog::OptionsDialog(QString configFilePath, QWidget * parent) : QDialog(parent) @@ -136,3 +137,4 @@ void OptionsDialog::saveConfig(const char * fname) } } +} diff --git a/src/kernel/options.h b/src/kernel/options.h index cc73b04..6459295 100644 --- a/src/kernel/options.h +++ b/src/kernel/options.h @@ -3,10 +3,11 @@ #include -#include "ui/optionsdialog.h" +#include "ui/dialogs/OptionsDialog.h" namespace loglan { namespace vlp { +namespace dialog { /** * Options Dialog class @@ -30,6 +31,7 @@ private slots: void on_delConnectionButton_clicked(); }; +} } } diff --git a/src/kernel/ui/connect_dialog.ui b/src/kernel/ui/dialogs/ConnectDialog.ui similarity index 100% rename from src/kernel/ui/connect_dialog.ui rename to src/kernel/ui/dialogs/ConnectDialog.ui diff --git a/src/kernel/ui/kill_dialog.ui b/src/kernel/ui/dialogs/KillDialog.ui similarity index 100% rename from src/kernel/ui/kill_dialog.ui rename to src/kernel/ui/dialogs/KillDialog.ui diff --git a/src/kernel/ui/lock_dialog.ui b/src/kernel/ui/dialogs/LockDialog.ui similarity index 100% rename from src/kernel/ui/lock_dialog.ui rename to src/kernel/ui/dialogs/LockDialog.ui diff --git a/src/kernel/ui/optionsdialog.ui b/src/kernel/ui/dialogs/OptionsDialog.ui similarity index 100% rename from src/kernel/ui/optionsdialog.ui rename to src/kernel/ui/dialogs/OptionsDialog.ui