From 78ad6c009b334925675998ae2ab02cc1d6d97e18 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Enar=20V=C3=A4ikene?= <enar@vaikene.net>
Date: Thu, 1 Dec 2011 16:05:22 +0200
Subject: [PATCH] Renamed Gui::Window to a more generic Gui::Panel, which can
 be a window, but also a panel as part of some other user interface layout.

---
 src/libs/Gui/CMakeLists.txt            |  4 ++--
 src/libs/Gui/Panel                     |  1 +
 src/libs/Gui/Window                    |  1 -
 src/libs/Gui/{window.cpp => panel.cpp} | 10 +++++-----
 src/libs/Gui/{window.h => panel.h}     | 27 +++++++++++++++-----------
 src/libs/Gui/version.h                 |  4 ++--
 6 files changed, 26 insertions(+), 21 deletions(-)
 create mode 100644 src/libs/Gui/Panel
 delete mode 100644 src/libs/Gui/Window
 rename src/libs/Gui/{window.cpp => panel.cpp} (85%)
 rename src/libs/Gui/{window.h => panel.h} (62%)

diff --git a/src/libs/Gui/CMakeLists.txt b/src/libs/Gui/CMakeLists.txt
index fab0577..19fd172 100644
--- a/src/libs/Gui/CMakeLists.txt
+++ b/src/libs/Gui/CMakeLists.txt
@@ -15,12 +15,12 @@ set(eVaf_LIBRARIES)
 
 # Source files
 set(SRCS
-    window.cpp
+    panel.cpp
 )
 
 # Header files for the meta-object compiler
 set(MOC_HDRS
-    window.h
+    panel.h
 )
 
 # Version info resource file for Windows builds
diff --git a/src/libs/Gui/Panel b/src/libs/Gui/Panel
new file mode 100644
index 0000000..896d171
--- /dev/null
+++ b/src/libs/Gui/Panel
@@ -0,0 +1 @@
+#include "panel.h"
diff --git a/src/libs/Gui/Window b/src/libs/Gui/Window
deleted file mode 100644
index 80b3d1c..0000000
--- a/src/libs/Gui/Window
+++ /dev/null
@@ -1 +0,0 @@
-#include "window.h"
diff --git a/src/libs/Gui/window.cpp b/src/libs/Gui/panel.cpp
similarity index 85%
rename from src/libs/Gui/window.cpp
rename to src/libs/Gui/panel.cpp
index 880e118..f552789 100644
--- a/src/libs/Gui/window.cpp
+++ b/src/libs/Gui/panel.cpp
@@ -1,5 +1,5 @@
 /**
- * @file Gui/window.cpp
+ * @file Gui/panel.cpp
  * @brief Version information for eVaf modules
  * @author Enar Vaikene
  *
@@ -17,15 +17,15 @@
  * Agreement provided with the Software.
  */
 
-#include "window.h"
+#include "panel.h"
 
 using namespace eVaf;
 
 //-------------------------------------------------------------------
 
-Gui::Window::Window(QWidget * parent)
-    : QWidget(parent)
+Gui::Panel::Panel(QWidget * parent, Qt::WindowFlags f)
+    : QWidget(parent, f)
 {}
 
-Gui::Window::~Window()
+Gui::Panel::~Panel()
 {}
diff --git a/src/libs/Gui/window.h b/src/libs/Gui/panel.h
similarity index 62%
rename from src/libs/Gui/window.h
rename to src/libs/Gui/panel.h
index 15c426a..8c70ba6 100644
--- a/src/libs/Gui/window.h
+++ b/src/libs/Gui/panel.h
@@ -1,5 +1,5 @@
 /**
- * @file Gui/window.h
+ * @file Gui/panel.h
  * @brief Version information for eVaf modules
  * @author Enar Vaikene
  *
@@ -17,8 +17,8 @@
  * Agreement provided with the Software.
  */
 
-#ifndef __GUI_WINDOW_H
-#  define __GUI_WINDOW_H
+#ifndef __GUI_PANEL_H
+#  define __GUI_PANEL_H
 
 #include "libgui.h"
 
@@ -35,21 +35,26 @@ namespace eVaf {
 namespace Gui {
 
 /**
- * eVaf GUI window class.
- * @code#include <Gui/Window>@endcode
+ * eVaf GUI panel class.
+ * @code#include <Gui/Panel>@endcode
  *
- * The Gui::Window class is a common ancestor for all the eVaf windows. eVaf applications can have different window managers
- * that manage Gui::Window objects.
+ * The Gui::Panel class is the generic widget for eVaf GUI applications. It is an empty
+ * widget that can be filled with actual user interface elements like labels, edit boxes etc.
+ * Gui::Panel acts like a normal widget, which can be shown as a stand-alone window or added to other
+ * user interface layouts.
+ *
+ * The main purpose of Gui::Panel is that it can be added to one of the eVaf document interface
+ * managers.
  */
-class GUI_EXPORT Window : public QWidget
+class GUI_EXPORT Panel : public QWidget
 {
     Q_OBJECT
 
 public:
 
-    Window(QWidget * parent = 0);
+    Panel(QWidget * parent = 0, Qt::WindowFlags f = 0);
 
-    virtual ~Window();
+    virtual ~Panel();
 
 };
 
@@ -57,4 +62,4 @@ public:
 } // namespace eVaf
 
 
-#endif // window.h
+#endif // panel.h
diff --git a/src/libs/Gui/version.h b/src/libs/Gui/version.h
index a298704..dc36c0a 100644
--- a/src/libs/Gui/version.h
+++ b/src/libs/Gui/version.h
@@ -25,12 +25,12 @@
 /**
  * Module/library version number in the form major,minor,release,build
  */
-#define VER_FILE_VERSION                0,1,1,1
+#define VER_FILE_VERSION                0,2,1,3
 
 /**
  * Module/library version number in the string format (shall end with \0)
  */
-#define VER_FILE_VERSION_STR            "0.1.1.1\0"
+#define VER_FILE_VERSION_STR            "0.2.1.3\0"
 
 /**
  * Module/library name (shall end with \0)
-- 
2.49.0