You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdevelop/src/toplevel.cpp

36 lines
639 B

#include <kxmlguiclient.h>
#include <tdeapplication.h>
#include <tdeconfig.h>
#include "toplevel.h"
#include "core.h"
#include "simplemainwindow.h"
TDevMainWindow *TopLevel::s_instance = 0;
bool TopLevel::mainWindowValid()
{
return s_instance != 0;
}
TDevMainWindow *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(TDevMainWindow *instance)
{
if ( s_instance == instance )
s_instance = 0;
}