summaryrefslogtreecommitdiffstats
path: root/src/toplevel.cpp
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit114a878c64ce6f8223cfd22d76a20eb16d177e5e (patch)
treeacaf47eb0fa12142d3896416a69e74cbf5a72242 /src/toplevel.cpp
downloadtdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.tar.gz
tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/toplevel.cpp')
-rw-r--r--src/toplevel.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/toplevel.cpp b/src/toplevel.cpp
new file mode 100644
index 00000000..048b325c
--- /dev/null
+++ b/src/toplevel.cpp
@@ -0,0 +1,35 @@
+#include <kxmlguiclient.h>
+#include <kapplication.h>
+#include <kconfig.h>
+
+
+#include "toplevel.h"
+#include "core.h"
+
+#include "simplemainwindow.h"
+
+KDevMainWindow *TopLevel::s_instance = 0;
+
+bool TopLevel::mainWindowValid()
+{
+ return s_instance != 0;
+}
+
+KDevMainWindow *TopLevel::getInstance()
+{
+ if (!s_instance)
+ {
+ SimpleMainWindow *mainWindow = new SimpleMainWindow(0, "SimpleMainWindow");
+ s_instance = mainWindow;
+ mainWindow->init();
+ kapp->setMainWidget(mainWindow);
+ }
+
+ return s_instance;
+}
+
+void TopLevel::invalidateInstance(KDevMainWindow *instance)
+{
+ if ( s_instance == instance )
+ s_instance = 0;
+}