dlugolecki.net.pl
Dziennik
Polecane
Software
projects
/
vlp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cec0990
)
Encapsulate some classes in namespaces
author
Rafał Długołęcki
<rafal@dlugolecki.net.pl>
Thu, 28 Jan 2016 20:45:12 +0000
(21:45 +0100)
committer
Rafał Długołęcki
<rafal@dlugolecki.net.pl>
Thu, 28 Jan 2016 20:45:12 +0000
(21:45 +0100)
18 files changed:
src/edit/PreferencesDialog.cpp
patch
|
blob
|
history
src/edit/PreferencesDialog.h
patch
|
blob
|
history
src/edit/ProgramStructureDialog.cpp
patch
|
blob
|
history
src/edit/ProgramStructureDialog.h
patch
|
blob
|
history
src/edit/UnitStructureDialog.cpp
patch
|
blob
|
history
src/edit/UnitStructureDialog.h
patch
|
blob
|
history
src/edit/editor.cpp
patch
|
blob
|
history
src/edit/editor.h
patch
|
blob
|
history
src/kernel/connect_dialog.cpp
patch
|
blob
|
history
src/kernel/connect_dialog.h
patch
|
blob
|
history
src/kernel/kernel.cpp
patch
|
blob
|
history
src/kernel/kernel.h
patch
|
blob
|
history
src/kernel/kill_interpreter_dialog.cpp
patch
|
blob
|
history
src/kernel/kill_interpreter_dialog.h
patch
|
blob
|
history
src/kernel/lock.cpp
patch
|
blob
|
history
src/kernel/lock.h
patch
|
blob
|
history
src/kernel/options.cpp
patch
|
blob
|
history
src/kernel/options.h
patch
|
blob
|
history
diff --git
a/src/edit/PreferencesDialog.cpp
b/src/edit/PreferencesDialog.cpp
index 4e7d3a002d6788ecf5b05490efdf289d0152ad07..ff355ce9f9efc65d92aac1cb7e34d14fb47c4862 100644
(file)
--- a/
src/edit/PreferencesDialog.cpp
+++ b/
src/edit/PreferencesDialog.cpp
@@
-1,5
+1,8
@@
#include "PreferencesDialog.h"
#include "PreferencesDialog.h"
+namespace loglan {
+namespace vlp {
+
PreferencesDialog::PreferencesDialog(QWidget * parent)
: QDialog(parent)
{
PreferencesDialog::PreferencesDialog(QWidget * parent)
: QDialog(parent)
{
@@
-42,3
+45,6
@@
void PreferencesDialog::setGenPath(QString path)
{
return genPath->setText(path);
}
{
return genPath->setText(path);
}
+
+}
+}
diff --git
a/src/edit/PreferencesDialog.h
b/src/edit/PreferencesDialog.h
index 2cd02ba4391fe5f620a4d2315793d5376cc4542f..7311c659a8271eba95333d3ac01dfe895a03e8ff 100644
(file)
--- a/
src/edit/PreferencesDialog.h
+++ b/
src/edit/PreferencesDialog.h
@@
-6,6
+6,9
@@
#include "ui/dialogs/PreferencesDialog.h"
#include "ui/dialogs/PreferencesDialog.h"
+namespace loglan {
+namespace vlp {
+
/**
* Program Unit Dialog class
* Displays dialog for generating code template for unit structure
/**
* Program Unit Dialog class
* Displays dialog for generating code template for unit structure
@@
-65,4
+68,7
@@
public:
void setGenPath(QString path);
};
void setGenPath(QString path);
};
+}
+}
+
#endif /* _VLP_EDITOR_PREFERENCESDIALOG_H */
#endif /* _VLP_EDITOR_PREFERENCESDIALOG_H */
diff --git
a/src/edit/ProgramStructureDialog.cpp
b/src/edit/ProgramStructureDialog.cpp
index 25750c887918c69ecec3bf026e48e1ceb1be86eb..623c6aef643d51b2d7096edf63433c5e188e90f3 100644
(file)
--- a/
src/edit/ProgramStructureDialog.cpp
+++ b/
src/edit/ProgramStructureDialog.cpp
@@
-1,5
+1,8
@@
#include "ProgramStructureDialog.h"
#include "ProgramStructureDialog.h"
+namespace loglan {
+namespace vlp {
+
ProgramStructureDialog::ProgramStructureDialog(QWidget * parent)
: QDialog(parent)
ProgramStructureDialog::ProgramStructureDialog(QWidget * parent)
: QDialog(parent)
@@
-25,3
+28,6
@@
QString ProgramStructureDialog::getCode()
code.sprintf("PROGRAM %s\n\nBEGIN\n\nEND", getProgramName().toStdString().c_str());
return code;
}
code.sprintf("PROGRAM %s\n\nBEGIN\n\nEND", getProgramName().toStdString().c_str());
return code;
}
+
+}
+}
diff --git
a/src/edit/ProgramStructureDialog.h
b/src/edit/ProgramStructureDialog.h
index 35fbe04524914f62de101fdc9b7b4ed49521b002..854e3d9c9c8690cfa790f10a111079c2908a2440 100644
(file)
--- a/
src/edit/ProgramStructureDialog.h
+++ b/
src/edit/ProgramStructureDialog.h
@@
-7,6
+7,9
@@
#include "ui/dialogs/ProgramStructureDialog.h"
#include "ui/dialogs/ProgramStructureDialog.h"
+namespace loglan {
+namespace vlp {
+
/**
* Program Structure Dialog class
* Displays dialog for generating code template for program structure
/**
* Program Structure Dialog class
* Displays dialog for generating code template for program structure
@@
-38,4
+41,7
@@
public:
QString getCode();
};
QString getCode();
};
+}
+}
+
#endif /* _VLP_EDITOR_PROGRAMSTRUCTUREDIALOG_H */
#endif /* _VLP_EDITOR_PROGRAMSTRUCTUREDIALOG_H */
diff --git
a/src/edit/UnitStructureDialog.cpp
b/src/edit/UnitStructureDialog.cpp
index a947a129cc22f1418557407f9abf26d258ab78de..01db86b569e31cf14fae18e0ce88a5877439a990 100644
(file)
--- a/
src/edit/UnitStructureDialog.cpp
+++ b/
src/edit/UnitStructureDialog.cpp
@@
-1,5
+1,8
@@
#include "UnitStructureDialog.h"
#include "UnitStructureDialog.h"
+namespace loglan {
+namespace vlp {
+
#define TYPENUM 5
const char *UnitTypes[TYPENUM] = {
#define TYPENUM 5
const char *UnitTypes[TYPENUM] = {
@@
-45,3
+48,6
@@
QString UnitStructureDialog::getCode()
);
return code;
}
);
return code;
}
+
+}
+}
diff --git
a/src/edit/UnitStructureDialog.h
b/src/edit/UnitStructureDialog.h
index 32fd7df77df1b88635222961cbdcd30b558be720..6dc5aac2d6e926ab7e60d53ceb55ad3783c29680 100644
(file)
--- a/
src/edit/UnitStructureDialog.h
+++ b/
src/edit/UnitStructureDialog.h
@@
-6,6
+6,9
@@
#include "ui/dialogs/UnitStructureDialog.h"
#include "ui/dialogs/UnitStructureDialog.h"
+namespace loglan {
+namespace vlp {
+
/**
* Program Unit Dialog class
* Displays dialog for generating code template for unit structure
/**
* Program Unit Dialog class
* Displays dialog for generating code template for unit structure
@@
-37,4
+40,7
@@
public:
QString getCode();
};
QString getCode();
};
+}
+}
+
#endif /* _VLP_EDITOR_PROGRAMSTRUCTUREDIALOG_H */
#endif /* _VLP_EDITOR_PROGRAMSTRUCTUREDIALOG_H */
diff --git
a/src/edit/editor.cpp
b/src/edit/editor.cpp
index b507a6fb6ee796149135d1c6dc044988657ce2fa..563a3e60cd18853ca6dfc0dc3e1e84bb394e6fd8 100644
(file)
--- a/
src/edit/editor.cpp
+++ b/
src/edit/editor.cpp
@@
-20,6
+20,9
@@
#include "editor.h"
#include "editor.h"
+namespace loglan {
+namespace vlp {
+
/**
* Editor constructor. Initializes and sets variables of Loglan Editor.
*
/**
* Editor constructor. Initializes and sets variables of Loglan Editor.
*
@@
-366,6
+369,9
@@
void Editor::on_actionUnit_structure_triggered()
}
}
}
}
+}
+}
+
/**
* Program main function.
* argv[1] is mandatory and should be a path to the home directory of
/**
* Program main function.
* argv[1] is mandatory and should be a path to the home directory of
@@
-377,7
+383,7
@@
void Editor::on_actionUnit_structure_triggered()
int main(int argc, char **argv)
{
QApplication app(argc, argv);
int main(int argc, char **argv)
{
QApplication app(argc, argv);
-
Editor * editor = new
Editor(argc, argv);
+
loglan::vlp::Editor * editor = new loglan::vlp::
Editor(argc, argv);
editor->show();
return app.exec();
}
editor->show();
return app.exec();
}
diff --git
a/src/edit/editor.h
b/src/edit/editor.h
index 42b2c2cf28ae43359def3e83b05b23014b5e7d5c..01e2e2a9918d994be3e086b2c69453b98f3781d9 100644
(file)
--- a/
src/edit/editor.h
+++ b/
src/edit/editor.h
@@
-9,6
+9,9
@@
#include "ui/editor.h"
#include "ui/editor.h"
+namespace loglan {
+namespace vlp {
+
#define COMP_MODE 1
#define GEN_MODE 2
#define ALL_MODE 3
#define COMP_MODE 1
#define GEN_MODE 2
#define ALL_MODE 3
@@
-70,4
+73,7
@@
private slots:
void on_editor_cursorPositionChanged();
};
void on_editor_cursorPositionChanged();
};
+}
+}
+
#endif // QWERTY_H
#endif // QWERTY_H
diff --git
a/src/kernel/connect_dialog.cpp
b/src/kernel/connect_dialog.cpp
index 9df1a65443b1f84e8381d29e4cf20b77889d3ec3..9484101bb6c3735569e38d4a2a010565071ef944 100644
(file)
--- a/
src/kernel/connect_dialog.cpp
+++ b/
src/kernel/connect_dialog.cpp
@@
-2,6
+2,9
@@
#include "connect_dialog.h"
#include "connect_dialog.h"
+namespace loglan {
+namespace vlp {
+
ConnectDialog::ConnectDialog(QWidget * parent)
: QDialog(parent, Qt::Dialog)
{
ConnectDialog::ConnectDialog(QWidget * parent)
: QDialog(parent, Qt::Dialog)
{
@@
-16,3
+19,6
@@
QString ConnectDialog::getAddress()
{
return address->text();
}
{
return address->text();
}
+
+}
+}
diff --git
a/src/kernel/connect_dialog.h
b/src/kernel/connect_dialog.h
index 99d1acef17e025195c9cd29730e4b3e45febd33c..4219d33a791ecf4656fcad9ec770da40cbfe6ba3 100644
(file)
--- a/
src/kernel/connect_dialog.h
+++ b/
src/kernel/connect_dialog.h
@@
-6,6
+6,9
@@
#include "ui/connect_dialog.h"
#include "ui/connect_dialog.h"
+namespace loglan {
+namespace vlp {
+
/**
* Kill Interpreter Dialog class
*/
/**
* Kill Interpreter Dialog class
*/
@@
-17,4
+20,7
@@
public:
QString getAddress();
};
QString getAddress();
};
+}
+}
+
#endif /* _VLP_KERNEL_CONNECTDIALOG_H */
#endif /* _VLP_KERNEL_CONNECTDIALOG_H */
diff --git
a/src/kernel/kernel.cpp
b/src/kernel/kernel.cpp
index c943c48930500408c4d83df06927a861b9ead1e4..a37c89433931be1787eefdd19dcc09a426b5bfd5 100644
(file)
--- a/
src/kernel/kernel.cpp
+++ b/
src/kernel/kernel.cpp
@@
-77,6
+77,9
@@
#include "../../config.h"
#include "../../config.h"
+namespace loglan {
+namespace vlp {
+
char CharLine[25] = "________________________";
/**
char CharLine[25] = "________________________";
/**
@@
-1110,6
+1113,9
@@
void QKernel::on_actionInfo_triggered()
wait_for_info = TRUE;
}
wait_for_info = TRUE;
}
+}
+}
+
/**
* Program main function
* All program arguments but the first one (argv[0]: program name) are saved and
/**
* Program main function
* All program arguments but the first one (argv[0]: program name) are saved and
@@
-1122,8
+1128,8
@@
int main(int argc, char **argv)
XInitThreads();
QApplication * app = new QApplication(argc, argv);
XInitThreads();
QApplication * app = new QApplication(argc, argv);
- QKernel kernel(argc, argv);
+
loglan::vlp::
QKernel kernel(argc, argv);
kernel.show();
return app->exec();
kernel.show();
return app->exec();
-}
+}
\ No newline at end of file
diff --git
a/src/kernel/kernel.h
b/src/kernel/kernel.h
index a07b55b91e24aaae7b530d785ce7bab0376a5638..7213b461a9a54d996923b19cfe45a4785b588cfb 100644
(file)
--- a/
src/kernel/kernel.h
+++ b/
src/kernel/kernel.h
@@
-55,6
+55,9
@@
#define NORM_COL 2
#define NORM_COL 2
+namespace loglan {
+namespace vlp {
+
/**
* Interpreter slot
*/
/**
* Interpreter slot
*/
@@
-187,4
+190,7
@@
private slots:
void on_actionUnlock_console_triggered();
};
void on_actionUnlock_console_triggered();
};
+}
+}
+
#endif /* VLP_KERNEL_H */
#endif /* VLP_KERNEL_H */
diff --git
a/src/kernel/kill_interpreter_dialog.cpp
b/src/kernel/kill_interpreter_dialog.cpp
index 6f97a764bca4408c81bd6cd10062fa981a771cb5..409e191cf227a15deb84f3016fec0d0404c200a2 100644
(file)
--- a/
src/kernel/kill_interpreter_dialog.cpp
+++ b/
src/kernel/kill_interpreter_dialog.cpp
@@
-2,6
+2,9
@@
#include "kill_interpreter_dialog.h"
#include "kill_interpreter_dialog.h"
+namespace loglan {
+namespace vlp {
+
KillInterpreterDialog::KillInterpreterDialog(QWidget * parent)
: QDialog(parent, Qt::Dialog)
{
KillInterpreterDialog::KillInterpreterDialog(QWidget * parent)
: QDialog(parent, Qt::Dialog)
{
@@
-16,3
+19,6
@@
int KillInterpreterDialog::getInterpreterId()
{
return interpreterId->text().toInt();
}
{
return interpreterId->text().toInt();
}
+
+}
+}
diff --git
a/src/kernel/kill_interpreter_dialog.h
b/src/kernel/kill_interpreter_dialog.h
index 5511d61206907141361fb4d9d6f4d5a492e07933..a7eabdffab8c2c94e9f906c819903ed4f912c6d5 100644
(file)
--- a/
src/kernel/kill_interpreter_dialog.h
+++ b/
src/kernel/kill_interpreter_dialog.h
@@
-5,6
+5,9
@@
#include "ui/kill_dialog.h"
#include "ui/kill_dialog.h"
+namespace loglan {
+namespace vlp {
+
/**
* Kill Interpreter Dialog class
*/
/**
* Kill Interpreter Dialog class
*/
@@
-16,4
+19,7
@@
public:
int getInterpreterId();
};
int getInterpreterId();
};
+}
+}
+
#endif /* _VLP_KERNEL_KILLINTERPRETERDIALOG_H */
#endif /* _VLP_KERNEL_KILLINTERPRETERDIALOG_H */
diff --git
a/src/kernel/lock.cpp
b/src/kernel/lock.cpp
index e4814e05603499e6d31b8dd5645ca978d4abb705..8f71c0a9ba84956273514ffe7512357ec95d5d38 100644
(file)
--- a/
src/kernel/lock.cpp
+++ b/
src/kernel/lock.cpp
@@
-2,6
+2,9
@@
#include "lock.h"
#include "lock.h"
+namespace loglan {
+namespace vlp {
+
LockDialog::LockDialog(QWidget * parent)
: QDialog(parent, Qt::Dialog)
{
LockDialog::LockDialog(QWidget * parent)
: QDialog(parent, Qt::Dialog)
{
@@
-22,3
+25,6
@@
void LockDialog::retype()
label->setText("Retype");
lineEdit->setText("");
}
label->setText("Retype");
lineEdit->setText("");
}
+
+}
+}
diff --git
a/src/kernel/lock.h
b/src/kernel/lock.h
index 152137fee719f277a33db7375c2ff37b3332008e..2c29f0a779e2dc1eeb7d44a3ec1ecceaa69b9eb8 100644
(file)
--- a/
src/kernel/lock.h
+++ b/
src/kernel/lock.h
@@
-5,6
+5,9
@@
#include "ui/lock_dialog.h"
#include "ui/lock_dialog.h"
+namespace loglan {
+namespace vlp {
+
/**
* Lock Dialog class
*/
/**
* Lock Dialog class
*/
@@
-17,4
+20,7
@@
public:
void retype();
};
void retype();
};
+}
+}
+
#endif /* _VLP_KERNEL_LOCKDIALOG_H */
#endif /* _VLP_KERNEL_LOCKDIALOG_H */
diff --git
a/src/kernel/options.cpp
b/src/kernel/options.cpp
index 5830ca02b94c05d59802f75ac5a6ba0124453799..dc116520adf0b33506be1f87a55b1fa57eb98e65 100644
(file)
--- a/
src/kernel/options.cpp
+++ b/
src/kernel/options.cpp
@@
-4,6
+4,9
@@
#include "vlp/config.h"
#include "options.h"
#include "vlp/config.h"
#include "options.h"
+namespace loglan {
+namespace vlp {
+
OptionsDialog::OptionsDialog(QString configFilePath, QWidget * parent)
: QDialog(parent)
{
OptionsDialog::OptionsDialog(QString configFilePath, QWidget * parent)
: QDialog(parent)
{
@@
-130,3
+133,6
@@
void OptionsDialog::saveConfig(const char * fname)
}
config_destroy(&cfg);
}
}
config_destroy(&cfg);
}
+
+}
+}
diff --git
a/src/kernel/options.h
b/src/kernel/options.h
index ecb73e317e0e505d58de1ab185f32820be2c85ee..cc73b04b9214034e7a733b67c311e95b2ae1775b 100644
(file)
--- a/
src/kernel/options.h
+++ b/
src/kernel/options.h
@@
-5,6
+5,9
@@
#include "ui/optionsdialog.h"
#include "ui/optionsdialog.h"
+namespace loglan {
+namespace vlp {
+
/**
* Options Dialog class
*/
/**
* Options Dialog class
*/
@@
-27,4
+30,7
@@
private slots:
void on_delConnectionButton_clicked();
};
void on_delConnectionButton_clicked();
};
+}
+}
+
#endif /* _VLP_KERNEL_OPTIONS_H */
#endif /* _VLP_KERNEL_OPTIONS_H */