27 #include "actionmanager.h"
28 #include "kowindowlist.h"
29 #include "kowindowlist.moc"
32 : TQObject( 0, name ), mDefaultWindow( 0 )
37 KOWindowList::~KOWindowList()
43 if ( !korg->hasDocument() ) mDefaultWindow = korg;
44 else mWindowList.append( korg );
49 if ( korg == mDefaultWindow ) mDefaultWindow = 0;
50 else mWindowList.removeRef( korg );
55 if ( mWindowList.count() == 1 && !mDefaultWindow )
return true;
56 if ( mWindowList.count() == 0 && mDefaultWindow )
return true;
63 for( inst = mWindowList.first(); inst; inst = mWindowList.next() )
71 return mDefaultWindow;
KOrg::MainWindow * findInstance(const KURL &url)
Is there a instance with this URL?
bool lastInstance()
Is there only one instance left?
KOWindowList(const char *name=0)
Constructs a new list of KOrganizer windows.
void addWindow(KOrg::MainWindow *)
Register a main window.
void removeWindow(KOrg::MainWindow *)
Unregister a main window.
KOrg::MainWindow * defaultInstance()
Return default instance.
interface for korganizer main window
virtual KURL getCurrentURL() const =0
Get current URL.