From 6fa7ffa7e14e6ab7adf07e950d8142ee6058273f Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Tue, 2 Sep 2014 22:32:56 +0200 Subject: [PATCH] Added GUI for the Type editor. --- .../src/plugins/georges_editor/CMakeLists.txt | 3 + .../georges_editor/georges_editor_form.cpp | 4 +- .../georges_editor/georges_typ_dialog.cpp | 36 +++++ .../georges_editor/georges_typ_dialog.h | 31 ++++ .../georges_editor/georges_typ_dialog.ui | 140 ++++++++++++++++++ .../georges_editor/typ_browser_ctrl.cpp | 1 + .../plugins/georges_editor/typ_browser_ctrl.h | 3 + 7 files changed, 217 insertions(+), 1 deletion(-) create mode 100644 code/studio/src/plugins/georges_editor/georges_typ_dialog.cpp create mode 100644 code/studio/src/plugins/georges_editor/georges_typ_dialog.h create mode 100644 code/studio/src/plugins/georges_editor/georges_typ_dialog.ui create mode 100644 code/studio/src/plugins/georges_editor/typ_browser_ctrl.cpp create mode 100644 code/studio/src/plugins/georges_editor/typ_browser_ctrl.h diff --git a/code/studio/src/plugins/georges_editor/CMakeLists.txt b/code/studio/src/plugins/georges_editor/CMakeLists.txt index 36b3fd735..0f0cbc1e0 100644 --- a/code/studio/src/plugins/georges_editor/CMakeLists.txt +++ b/code/studio/src/plugins/georges_editor/CMakeLists.txt @@ -21,12 +21,15 @@ SET(OVQT_PLUG_GEORGES_EDITOR_HDR georges_editor_plugin.h dfn_browser_ctrl.h georges_dfn_dialog.h filepath_property_manager.h + typ_browser_ctrl.h + georges_typ_dialog.h ) SET(OVQT_PLUG_GEORGES_EDITOR_UIS georges_editor_form.ui georges_dirtree_form.ui georges_treeview_form.ui georges_dfn_dialog.ui + georges_typ_dialog.ui ) SET(OVQT_PLUGIN_GEORGES_EDITOR_RCS georges_editor.qrc) diff --git a/code/studio/src/plugins/georges_editor/georges_editor_form.cpp b/code/studio/src/plugins/georges_editor/georges_editor_form.cpp index 4cbe90f2e..f2c1c3528 100644 --- a/code/studio/src/plugins/georges_editor/georges_editor_form.cpp +++ b/code/studio/src/plugins/georges_editor/georges_editor_form.cpp @@ -21,6 +21,7 @@ #include "georges_dirtree_dialog.h" #include "georges_treeview_dialog.h" #include "georges_dfn_dialog.h" +#include "georges_typ_dialog.h" #include "../core/icore.h" #include "../core/menu_manager.h" @@ -316,7 +317,8 @@ namespace GeorgesQt GeorgesDockWidget* GeorgesEditorForm::loadTypDialog( const QString &fileName ) { - return NULL; + GeorgesTypDialog *d = new GeorgesTypDialog(); + return d; } GeorgesDockWidget* GeorgesEditorForm::loadDfnDialog( const QString &fileName ) diff --git a/code/studio/src/plugins/georges_editor/georges_typ_dialog.cpp b/code/studio/src/plugins/georges_editor/georges_typ_dialog.cpp new file mode 100644 index 000000000..cf0102c71 --- /dev/null +++ b/code/studio/src/plugins/georges_editor/georges_typ_dialog.cpp @@ -0,0 +1,36 @@ +#include "georges_typ_dialog.h" + +GeorgesTypDialog::GeorgesTypDialog( QWidget *parent ) : +GeorgesDockWidget( parent ) +{ + m_ui.setupUi( this ); + setupConnections(); +} + +GeorgesTypDialog::~GeorgesTypDialog() +{ +} + + +void GeorgesTypDialog::write() +{ +} + +void GeorgesTypDialog::onAddClicked() +{ +} + +void GeorgesTypDialog::onRemoveClicked() +{ +} + +void GeorgesTypDialog::setupConnections() +{ + connect( m_ui.addButton, SIGNAL( clicked( bool ) ), this, SLOT( onAddClicked() ) ); + connect( m_ui.removeButton, SIGNAL( clicked( bool ) ), this, SLOT( onRemoveClicked() ) ); +} + +void GeorgesTypDialog::log( const QString &msg ) +{ +} + diff --git a/code/studio/src/plugins/georges_editor/georges_typ_dialog.h b/code/studio/src/plugins/georges_editor/georges_typ_dialog.h new file mode 100644 index 000000000..3808e019a --- /dev/null +++ b/code/studio/src/plugins/georges_editor/georges_typ_dialog.h @@ -0,0 +1,31 @@ +#ifndef GEORGES_TYP_DIALOG +#define GEORGES_TYP_DIALOG + +#include "georges_dock_widget.h" +#include "ui_georges_typ_dialog.h" + + +class GeorgesTypDialog : public GeorgesDockWidget +{ + Q_OBJECT +public: + GeorgesTypDialog( QWidget *parent = NULL ); + ~GeorgesTypDialog(); + + void write(); + +private Q_SLOTS: + void onAddClicked(); + void onRemoveClicked(); + +private: + void setupConnections(); + void log( const QString &msg ); + + + Ui::GeorgesTypDialog m_ui; +}; + + +#endif + diff --git a/code/studio/src/plugins/georges_editor/georges_typ_dialog.ui b/code/studio/src/plugins/georges_editor/georges_typ_dialog.ui new file mode 100644 index 000000000..6cd080579 --- /dev/null +++ b/code/studio/src/plugins/georges_editor/georges_typ_dialog.ui @@ -0,0 +1,140 @@ + + + GeorgesTypDialog + + + + 0 + 0 + 682 + 425 + + + + + + + + + + + QTabWidget::West + + + 0 + + + + Type + + + + + + Qt::Horizontal + + + + + 0 + 0 + + + + + + + + + + Label + + + + + Value + + + + + + + + + 0 + 0 + + + + Add + + + + + + + + 0 + 0 + + + + Remove + + + + + + + Qt::Horizontal + + + + 15 + 20 + + + + + + + + + + + + + Comment + + + + + + + + + + Log + + + + + + + + + + + + + + + QtTreePropertyBrowser + QWidget +
qttreepropertybrowser.h
+ 1 +
+
+ + +
diff --git a/code/studio/src/plugins/georges_editor/typ_browser_ctrl.cpp b/code/studio/src/plugins/georges_editor/typ_browser_ctrl.cpp new file mode 100644 index 000000000..002a89290 --- /dev/null +++ b/code/studio/src/plugins/georges_editor/typ_browser_ctrl.cpp @@ -0,0 +1 @@ +#include "typ_browser_ctrl.h" diff --git a/code/studio/src/plugins/georges_editor/typ_browser_ctrl.h b/code/studio/src/plugins/georges_editor/typ_browser_ctrl.h new file mode 100644 index 000000000..bf29e1cc8 --- /dev/null +++ b/code/studio/src/plugins/georges_editor/typ_browser_ctrl.h @@ -0,0 +1,3 @@ +#ifndef TYP_BROWSER_CTRL +#define TYP_BROWSER_CTRL +#endif