KDevelop API Documentation

src/toplevel.cpp

Go to the documentation of this file.
00001 #include <kapplication.h> 00002 #include <kconfig.h> 00003 00004 00005 #include "toplevel.h" 00006 #include "core.h" 00007 00008 00009 #include "mainwindow.h" 00010 00011 00012 KDevMainWindow *TopLevel::s_instance = 0; 00013 00014 00015 bool TopLevel::mainWindowValid() 00016 { 00017 return s_instance != 0; 00018 } 00019 00020 KDevMainWindow *TopLevel::getInstance() 00021 { 00022 if (!s_instance) 00023 { 00024 MainWindow *mainWindow = new MainWindow; 00025 s_instance = mainWindow; 00026 00027 mainWindow->init(); 00028 00029 kapp->setMainWidget(mainWindow); 00030 } 00031 00032 return s_instance; 00033 } 00034 00035 void TopLevel::invalidateInstance(KDevMainWindow *instance) 00036 { 00037 if ( s_instance == instance ) 00038 s_instance = 0; 00039 }
KDE Logo
This file is part of the documentation for KDevelop Version 3.0.4.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Oct 6 17:39:14 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003