26#include "tdemainwindow.h"
27#include "tdemainwindowiface.h"
28#include "tdetoolbarhandler.h"
29#include "kwhatsthismanager_p.h"
30#include <tqsessionmanager.h>
31#include <tqobjectlist.h>
34#include <tqwidgetlist.h>
39#include <tdeapplication.h>
43#include <tdemenubar.h>
44#include <kstatusbar.h>
46#include <kedittoolbar.h>
47#include <tdemainwindow.h>
50#include <tdestandarddirs.h>
51#include <kstaticdeleter.h>
60class TDEMainWindowPrivate {
64 bool autoSaveSettings:1;
66 bool autoSaveWindowSize:1;
67 bool care_about_geometry:1;
69 bool newStyleRefCounting:1;
70 TQString autoSaveGroup;
74 TQTimer* settingsTimer;
76 TQRect defaultWindowSize;
77 TQPtrList<TQDockWindow> hiddenDockWindows;
81static bool no_query_exit =
false;
82static KMWSessionManaged* ksm = 0;
96 TDEConfig* config = tdeApp->sessionConfig();
105 for (it.toFirst(); it.current(); ++it){
107 it.current()->savePropertiesInternal(config, n);
109 config->
setGroup(TQString::fromLatin1(
"Number"));
110 config->
writeEntry(TQString::fromLatin1(
"NumberOfWindows"), n );
117 if ( sm.allowsInteraction() ) {
118 bool canceled =
false;
120 ::no_query_exit =
true;
121 for (it.toFirst(); it.current() && !canceled;){
124 if ( !window->testWState( TQt::WState_ForceHide ) ) {
126 TQApplication::sendEvent( window, &e );
127 canceled = !e.isAccepted();
144 ::no_query_exit =
false;
149 for (it.toFirst(); it.current() && !canceled; ++it){
151 if ( !window->testWState( TQt::WState_ForceHide ) ) {
166static bool being_first =
true;
169 : TQMainWindow( parent, name, f ),
KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 )
171 initTDEMainWindow(name, 0);
175 : TQMainWindow( parent, name, f ),
KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 )
177 initTDEMainWindow(name, cflags);
180void TDEMainWindow::initTDEMainWindow(
const char *name,
int cflags)
182 KWhatsThisManager::init ();
183 setDockMenuEnabled(
false );
185 tdeApp->setTopWidget(
this );
187 connect(tdeApp, TQ_SIGNAL(shutDown()),
this, TQ_SLOT(shuttingDown()));
192 ksm = ksmd.setObject(ksm,
new KMWSessionManaged());
199 objname = tdeApp->instanceName() +
"-mainwindow#";
203 else if( name[0] !=
'\0' && name[ strlen( name ) - 1 ] ==
'#' )
216 TQWidgetList* list = tdeApp->topLevelWidgets();
217 TQWidgetListIt it( *list );
219 for( TQWidget* w = it.current();
221 ++it, w = it.current())
222 if( w !=
this && w->name() == s )
230 s.setNum( ++unusedNumber );
237 d =
new TDEMainWindowPrivate;
238 d->showHelpMenu =
true;
239 d->settingsDirty =
false;
240 d->autoSaveSettings =
false;
241 d->autoSaveWindowSize =
true;
243 d->toolBarHandler = 0;
244 d->settingsTimer = 0;
245 d->showStatusBarAction = NULL;
246 d->shuttingDown =
false;
247 if ((d->care_about_geometry = being_first)) {
249 if ( tdeApp->geometryArgument().isNull() )
250 d->care_about_geometry =
false;
256 if ( cflags & NoDCOPObject)
261 if ( cflags & NewRefCountMode ) {
262 d->newStyleRefCounting =
true;
266 d->newStyleRefCounting =
false;
269 if (!tdeApp->authorize(
"movable_toolbars"))
270 setDockWindowsMovable(
false);
275 if ( !d->toolBarHandler )
278 return d->toolBarHandler->toolBarMenuAction();
284 if ( d->toolBarHandler )
285 d->toolBarHandler->setupActions();
290 assert ( !tdeApp->geometryArgument().isNull() );
291 assert ( d->care_about_geometry );
296 int m = XParseGeometry( tdeApp->geometryArgument().latin1(), &x, &y, (
unsigned int*)&w, (
unsigned int*)&h);
298 TQSize minSize = minimumSize();
299 TQSize maxSize = maximumSize();
300 if ( !(m & WidthValue) )
302 if ( !(m & HeightValue) )
304 w = TQMIN(w,maxSize.width());
305 h = TQMIN(h,maxSize.height());
306 w = TQMAX(w,minSize.width());
307 h = TQMAX(h,minSize.height());
310 if ( parsewidth && !(m & XValue) )
312 if ( parsewidth && !(m & YValue) )
314 if ( (m & XNegative) )
315 x = TDEApplication::desktop()->width() + x - w;
316 if ( (m & YNegative) )
317 y = TDEApplication::desktop()->height() + y - h;
325 delete d->settingsTimer;
326 TQMenuBar* mb = internalMenuBar();
328 delete d->m_interface;
336 if ( aboutAppText.isEmpty() )
339 mHelpMenu =
new KHelpMenu(
this, aboutAppText, showWhatsThis );
347 return mHelpMenu->
menu();
353 mHelpMenu =
new KHelpMenu(
this, TQString::null, showWhatsThis );
358 return mHelpMenu->
menu();
363 if ( !tdeApp->isRestored() )
365 TDEConfig *config = tdeApp->sessionConfig();
368 config->
setGroup( TQString::fromLatin1(
"Number") );
369 int n = config->
readNumEntry( TQString::fromLatin1(
"NumberOfWindows") , 1 );
370 return number >= 1 && number <= n;
375 if ( !tdeApp->isRestored() )
376 return TQString::null;
377 TDEConfig *config = tdeApp->sessionConfig();
379 return TQString::null;
382 s.prepend( TQString::fromLatin1(
"WindowProperties") );
384 if ( !config->
hasKey( TQString::fromLatin1(
"ClassName") ) )
385 return TQString::null;
387 return config->
readEntry( TQString::fromLatin1(
"ClassName") );
392 TQMainWindow::show();
394 for ( TQPtrListIterator<TQDockWindow> it( d->hiddenDockWindows ); it.current(); ++it )
395 it.current()->show();
397 d->hiddenDockWindows.clear();
404 d->hiddenDockWindows.clear();
406 TQObjectList *list = queryList(
"TQDockWindow" );
407 for( TQObjectListIt it( *list ); it.current(); ++it ) {
408 TQDockWindow *dw = (TQDockWindow*)it.current();
409 if ( dw->isTopLevel() && dw->isVisible() ) {
410 d->hiddenDockWindows.append( dw );
424 TDEConfig *config = tdeApp->sessionConfig();
425 if ( readPropertiesInternal( config, number ) ){
455 setupGUI(TQSize(), options, xmlfile);
459 if( options &
Keys ){
464 if( (options &
StatusBar) && internalStatusBar() ){
478 if( options &
Save ){
487 else if(defaultSize.isValid())
503 setUpdatesEnabled(
false );
509 TQMenuBar* mb = internalMenuBar();
514 toolbarList.setAutoDelete(
true );
516 toolbarList.setAutoDelete(
false );
519 if (d->showHelpMenu) {
531 if ( !xmlfile.isNull() ) {
534 TQString auto_file(
instance()->instanceName() +
"ui.rc");
545 if ( _conserveMemory )
562 for( TQDomNode n = doc.documentElement().firstChild();
563 !n.isNull(); n = n.nextSibling())
565 TQDomElement e = n.toElement();
567 if ( e.tagName().lower() ==
"toolbar" )
569 else if ( e.tagName().lower() ==
"menubar" )
576 setUpdatesEnabled(
true );
582 d->showHelpMenu = showHelpMenu;
587 return d->showHelpMenu;
602 TQMainWindow::setCaption( caption );
604 NETWinInfo info( tqt_xdisplay(), winId(), tqt_xrootwin(), 0 );
605 info.setName( caption.utf8().data() );
628 KXMLGUIClient::ReverseStateChange reverse)
646 if (d->settingsDirty && d->autoSaveSettings)
652 int not_withdrawn = 0;
654 for (it.toFirst(); it.current(); ++it){
655 if ( !it.current()->isHidden() && it.current()->isTopLevel() && it.current() != this )
659 if ( !no_query_exit && not_withdrawn <= 0 ) {
660 if (
queryExit() && !tdeApp->sessionSaving() && !d->shuttingDown ) {
662 disconnect(tdeApp, TQ_SIGNAL(shutDown()),
this, TQ_SLOT(shuttingDown()));
663 d->shuttingDown =
true;
691#if defined(KDE_COMPAT)
692void TDEMainWindow::updateRects()
701void TDEMainWindow::savePropertiesInternal(
TDEConfig *config,
int number )
703 bool oldASWS = d->autoSaveWindowSize;
704 d->autoSaveWindowSize =
true;
708 s.prepend(TQString::fromLatin1(
"WindowProperties"));
713 config->
writeEntry(TQString::fromLatin1(
"ObjectName"), name());
714 config->
writeEntry(TQString::fromLatin1(
"ClassName"), className());
722 d->autoSaveWindowSize = oldASWS;
727 kdDebug(200) <<
"TDEMainWindow::saveMainWindowSettings " << configGroup <<
endl;
730 if (!configGroup.isEmpty())
732 oldGroup = config->
group();
737 if ( d->autoSaveWindowSize )
740 TQStatusBar* sb = internalStatusBar();
742 if(!config->
hasDefault(
"StatusBar") && !sb->isHidden() )
745 config->
writeEntry(
"StatusBar", sb->isHidden() ?
"Disabled" :
"Enabled");
748 TQMenuBar* mb = internalMenuBar();
750 TQString MenuBar = TQString::fromLatin1(
"MenuBar");
751 if(!config->
hasDefault(
"MenuBar") && !mb->isHidden() )
754 config->
writeEntry(
"MenuBar", mb->isHidden() ?
"Disabled" :
"Enabled");
760 while ( ( toolbar = it.current() ) ) {
763 if (!configGroup.isEmpty())
767 group = (!::qstrcmp(toolbar->name(),
"unnamed") ? TQString::number(n) : TQString(
" ")+toolbar->name());
768 group.prepend(
" Toolbar");
769 group.prepend(configGroup);
774 if (!configGroup.isEmpty())
781 if ( d->toolBarHandler )
789 if ( !d->toolBarHandler )
795 delete d->toolBarHandler;
796 d->toolBarHandler = 0;
802 return ( d->toolBarHandler );
806 if(!d->showStatusBarAction){
809 connect(d->showStatusBarAction, TQ_SIGNAL(toggled(
bool)), sb, TQ_SLOT(setShown(
bool)));
810 d->showStatusBarAction->setChecked(sb->isHidden());
814bool TDEMainWindow::readPropertiesInternal(
TDEConfig *config,
int number )
822 s.prepend(TQString::fromLatin1(
"WindowProperties"));
827 if ( config->
hasKey(TQString::fromLatin1(
"ObjectName" )) )
828 setName( config->
readEntry(TQString::fromLatin1(
"ObjectName")).latin1());
845 kdDebug(200) <<
"TDEMainWindow::applyMainWindowSettings" <<
endl;
851 TQStatusBar* sb = internalStatusBar();
853 TQString entry = config->
readEntry(
"StatusBar",
"Enabled");
854 if ( entry ==
"Disabled" )
858 if(d->showStatusBarAction)
859 d->showStatusBarAction->setChecked(!sb->isHidden());
862 TQMenuBar* mb = internalMenuBar();
864 TQString entry = config->
readEntry (
"MenuBar",
"Enabled");
865 if ( entry ==
"Disabled" )
875 for ( ; it.current(); ++it) {
876 toolbar= it.current();
878 if (!configGroup.isEmpty())
882 group = (!::qstrcmp(toolbar->name(),
"unnamed") ? TQString::number(n) : TQString(
" ")+toolbar->name());
883 group.prepend(
" Toolbar");
884 group.prepend(configGroup);
904 for ( ; it.current() ; ++it ) {
905 it.current()->positionYourself( force );
908 d->settingsDirty =
false;
913 int scnum = TQApplication::desktop()->screenNumber(parentWidget());
914 TQRect desk = TQApplication::desktop()->screenGeometry(scnum);
919 w = info.
state() & NET::MaxHoriz ? desk.width() + 1 : width();
920 h = info.
state() & NET::MaxVert ? desk.height() + 1 : height();
923 w = desk.width() + 1;
924 h = desk.height() + 1;
928 TQRect size( desk.width(), w, desk.height(), h );
929 bool defaultSize = (size == d->defaultWindowSize);
930 TQString widthString = TQString::fromLatin1(
"Width %1").arg(desk.width());
931 TQString heightString = TQString::fromLatin1(
"Height %1").arg(desk.height());
932 if (!config->
hasDefault(widthString) && defaultSize)
937 if (!config->
hasDefault(heightString) && defaultSize)
945 if (d->care_about_geometry) {
949 int scnum = TQApplication::desktop()->screenNumber(parentWidget());
950 TQRect desk = TQApplication::desktop()->screenGeometry(scnum);
951 if ( d->defaultWindowSize.isNull() )
952 d->defaultWindowSize = TQRect(desk.width(), width(), desk.height(), height());
953 TQSize size( config->
readNumEntry( TQString::fromLatin1(
"Width %1").arg(desk.width()), 0 ),
954 config->
readNumEntry( TQString::fromLatin1(
"Height %1").arg(desk.height()), 0 ) );
955 if (size.isEmpty()) {
957 size = TQSize( config->
readNumEntry( TQString::fromLatin1(
"Width"), 0 ),
958 config->
readNumEntry( TQString::fromLatin1(
"Height"), 0 ) );
959 if (!size.isEmpty()) {
961 config->
writeEntry( TQString::fromLatin1(
"Width"), 0 );
962 config->
writeEntry( TQString::fromLatin1(
"Height"), 0 );
965 if ( !size.isEmpty() ) {
968 if (size.width() > desk.width()) {
969 state = state | NET::MaxHoriz;
971 if (size.height() > desk.height()) {
972 state = state | NET::MaxVert;
975 if (( state & NET::Max ) == NET::Max ) {
976 resize( desk.width(), desk.height());
978 else if(( state & NET::MaxHoriz ) == NET::MaxHoriz ) {
979 resize( width(), size.height());
981 else if(( state & NET::MaxVert ) == NET::MaxVert ) {
982 resize( size.width(), height());
988 KWin::setState( winId(), state );
990 if (size.width() > desk.width() || size.height() > desk.height())
991 setWindowState( WindowMaximized );
1001 return d->care_about_geometry;
1006 d->care_about_geometry =
false;
1012 d->settingsDirty =
true;
1013 if ( d->autoSaveSettings )
1017 if ( !d->settingsTimer )
1019 d->settingsTimer =
new TQTimer(
this );
1022 d->settingsTimer->start( 500,
true );
1028 return d->settingsDirty;
1033 return d->autoSaveGroup;
1038 d->autoSaveSettings =
true;
1039 d->autoSaveGroup = groupName;
1042 disconnect(
this, TQ_SIGNAL( dockWindowPositionChanged( TQDockWindow * ) ),
1044 connect(
this, TQ_SIGNAL( dockWindowPositionChanged( TQDockWindow * ) ),
1053 d->autoSaveSettings =
false;
1054 if ( d->settingsTimer )
1055 d->settingsTimer->stop();
1060 return d->autoSaveSettings;
1065 return d->autoSaveGroup;
1070 Q_ASSERT( d->autoSaveSettings );
1074 d->settingsDirty =
false;
1075 if ( d->settingsTimer )
1076 d->settingsTimer->stop();
1079void TDEMainWindow::resizeEvent( TQResizeEvent * )
1081 if ( d->autoSaveWindowSize )
1087 return (internalMenuBar());
1097 TQMainWindow::menuBar();
1109 TQMainWindow::statusBar();
1114void TDEMainWindow::shuttingDown()
1118 static bool reentrancy_protection =
false;
1119 if (!reentrancy_protection)
1121 reentrancy_protection =
true;
1124 reentrancy_protection =
false;
1129KMenuBar *TDEMainWindow::internalMenuBar()
1131 TQObjectList *l = queryList(
"KMenuBar", 0,
false,
false );
1132 if ( !l || !l->first() ) {
1142KStatusBar *TDEMainWindow::internalStatusBar()
1144 TQObjectList *l = queryList(
"KStatusBar", 0,
false,
false );
1145 if ( !l || !l->first() ) {
1155void TDEMainWindow::childEvent( TQChildEvent* e)
1157 TQMainWindow::childEvent( e );
1163 name =
"mainToolBar";
1167 bool honor_mode = (!strcmp(name,
"mainToolBar"));
1169 if ( builderClient() )
1170 return new TDEToolBar(
this, name, honor_mode);
1172 return new TDEToolBar(
this, DockTop,
false, name, honor_mode );
1177 toolbarList.clear();
1178 TQPtrList<TQToolBar> lst;
1179 for (
int i = (
int)TQMainWindow::DockUnmanaged; i <= (int)DockMinimized; ++i ) {
1180 lst = toolBars( (ToolBarDock)i );
1181 for ( TQToolBar *tb = lst.first(); tb; tb = lst.next() ) {
1182 if ( !tb->inherits(
"TDEToolBar" ) )
1187 return TQPtrListIterator<TDEToolBar>( toolbarList );
1193 d->tdeaccel =
new TDEAccel(
this,
"kmw-tdeaccel" );
1197void TDEMainWindow::paintEvent( TQPaintEvent * pe )
1199 TQMainWindow::paintEvent(pe);
1205 if (tb && !tb->isHidden()) {
1208 case TDEToolBar::Top:
1209 case TDEToolBar::Bottom:
1210 size += TQSize(0, tb->sizeHint().height());
1213 case TDEToolBar::Left:
1214 case TDEToolBar::Right:
1215 size += TQSize(
toolBar()->sizeHint().width(), 0);
1218 case TDEToolBar::Flat:
1219 size += TQSize(0, 3+tdeApp->style().pixelMetric( TQStyle::PM_DockWindowHandleExtent ));
1227 if (mb && !mb->isHidden()) {
1228 size += TQSize(0,mb->heightForWidth(size.width()));
1229 if (style().styleHint(TQStyle::SH_MainWindow_SpaceBelowMenuBar,
this))
1230 size += TQSize( 0, dockWindowsMovable() ? 1 : 2);
1232 TQStatusBar *sb = internalStatusBar();
1233 if( sb && !sb->isHidden() )
1234 size += TQSize(0, sb->sizeHint().height());
1239#if KDE_IS_VERSION( 3, 9, 0 )
1241#warning Remove, should be in Qt
1246 TQMainWindow::setIcon( p );
1250 KWin::setIcons( winId(), p, TQPixmap());
1259{ KXMLGUIBuilder::finalizeGUI( client ); }
1261void TDEMainWindow::virtual_hook(
int id,
void* data )
1262{ KXMLGUIBuilder::virtual_hook(
id, data );
1263 KXMLGUIClient::virtual_hook(
id, data ); }
1267#include "tdemainwindow.moc"
virtual bool saveState(TQSessionManager &sm)
virtual bool commitData(TQSessionManager &sm)
unsigned long state() const
Abstract interface for a "GUI builder", used by the GUIFactory This interface is implemented by TDEMa...
A KXMLGUIClient can be used with KXMLGUIFactory to create a GUI from actions and an XML document,...
virtual TQString xmlFile() const
This will return the name of the XML file as set by setXMLFile().
virtual TDEInstance * instance() const
void setXMLGUIBuildDocument(const TQDomDocument &doc)
virtual void setXMLFile(const TQString &file, bool merge=false, bool setXMLDoc=true)
Sets the name of the rc file containing the XML for the part.
KXMLGUIFactory * factory() const
Retrieves a pointer to the KXMLGUIFactory this client is associated with (will return 0L if the clien...
virtual void conserveMemory()
This function will attempt to give up some memory after the GUI is built.
virtual void stateChanged(const TQString &newstate, ReverseStateChange reverse=StateNoReverse)
Actions can collectively be assigned a "State".
virtual TDEActionCollection * actionCollection() const
Retrieves the entire action collection for the GUI client.
virtual TQDomDocument domDocument() const
KXMLGUIFactory, together with KXMLGUIClient objects, can be used to create a GUI of container widgets...
void removeClient(KXMLGUIClient *client)
Removes the GUI described by the client, by unplugging all provided actions and removing all owned co...
void addClient(KXMLGUIClient *client)
Creates the GUI described by the TQDomDocument of the client, using the client's actions,...
void resetContainer(const TQString &containerName, bool useTagName=false)
Use this method to free all memory allocated by the KXMLGUIFactory for a specific container,...
TDEAccel * tdeaccel()
Returns the TDEAccel object of the most recently set widget.
virtual void setWidget(TQWidget *widget)
This sets the widget to which the keyboard shortcuts should be attached.
Class to encapsulate user-driven action or event.
bool hasDefault(const TQString &key) const
TQString readEntry(const TQString &pKey, const TQString &aDefault=TQString::null) const
void revertToDefault(const TQString &key)
int readNumEntry(const TQString &pKey, int nDefault=0) const
bool hasKey(const TQString &key) const
void writeEntry(const TQString &pKey, const TQString &pValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
void setGroup(const TQString &group)
static TDEConfig * config()
DCOP interface to TDEMainWindow.
KDE top level main window
virtual void readProperties(TDEConfig *)
Read your instance-specific properties.
virtual void showAboutApplication()
This slot does nothing.
TDEPopupMenu * customHelpMenu(bool showWhatsThis=true)
Returns the help menu.
bool restore(int number, bool show=true)
Restore the session specified by number.
void appHelpActivated(void)
Open the help page for the application.
void createStandardStatusBarAction()
Sets whether TDEMainWindow should provide a menu that allows showing/hiding of the statusbar ( using ...
void setHelpMenuEnabled(bool showHelpMenu=true)
Enables the build of a standard help menu when calling createGUI().
KMenuBar * menuBar()
Returns a pointer to the menu bar.
TDEToolBar * toolBar(const char *name=0)
Returns a pointer to the toolbar with the specified name.
virtual void setIcon(const TQPixmap &)
virtual void finalizeGUI(KXMLGUIClient *client)
virtual bool queryClose()
Called before the window is closed, either by the user or indirectly by the session manager.
void setupToolbarMenuActions()
virtual void hide()
Reimplementation of TQMainWindow::hide()
static const TQString classNameOfToplevel(int number)
Returns the className() of the number of the toplevel window which should be restored.
void setupGUI(int options=ToolBar|Keys|StatusBar|Save|Create, const TQString &xmlfile=TQString::null)
Configures the current windows and its actions in the typical KDE fashion.
KStatusBar * statusBar()
Returns a pointer to the status bar.
void setStandardToolBarMenuEnabled(bool enable)
Sets whether TDEMainWindow should provide a menu that allows showing/hiding the available toolbars ( ...
virtual void setCaption(const TQString &caption)
Makes a KDE compliant caption.
bool initialGeometrySet() const
TDEAction * toolBarMenuAction()
Returns a pointer to the mainwindows action responsible for the toolbars menu.
void setSettingsDirty()
Apply a state change.
TDEPopupMenu * helpMenu(const TQString &aboutAppText=TQString::null, bool showWhatsThis=true)
Retrieve the standard help menu.
void saveNewToolbarConfig()
Rebuilds the GUI after KEditToolbar changed the toolbar layout.
virtual ~TDEMainWindow()
Destructor.
virtual void readGlobalProperties(TDEConfig *sessionConfig)
The counterpart of saveGlobalProperties().
static TQPtrList< TDEMainWindow > * getMemberList()
List of members of TDEMainWindow class.
void saveMainWindowSettings(TDEConfig *config, const TQString &groupName=TQString::null)
Save settings for statusbar, menubar and toolbar to their respective groups in the config file config...
void resetAutoSaveSettings()
Disable the auto-save-settings feature.
static bool canBeRestored(int number)
Session Management
void parseGeometry(bool parsewidth)
parse the geometry from the geometry command line argument
TQSize sizeForCentralWidgetSize(TQSize size) TDE_DEPRECATED
@ Create
calls createGUI() once ToolBar, Keys and Statusbar have been taken care of.
@ Save
auto-saves (and loads) the toolbar/menubar/statusbar settings and window size using the default name.
@ ToolBar
adds action to show/hide the toolbar(s) and adds action to configure the toolbar(s).
@ StatusBar
adds action to show/hide the statusbar if the statusbar exists.
@ Keys
adds action to show the key configure action.
void saveWindowSize(TDEConfig *config) const
For inherited classes Note that the group must be set before calling.
bool autoSaveSettings() const
static TQPtrList< TDEMainWindow > * memberList
List of members of TDEMainWindow class.
virtual void closeEvent(TQCloseEvent *)
Reimplemented to call the queryClose() and queryExit() handlers.
bool settingsDirty() const
For inherited classes.
int configureToolbars()
Show a standard configure toolbar dialog.
void restoreWindowSize(TDEConfig *config)
For inherited classes Note that the group must be set before calling, and that a -geometry on the com...
void ignoreInitialGeometry()
bool isHelpMenuEnabled()
Return true when the help menu is enabled.
virtual void saveGlobalProperties(TDEConfig *sessionConfig)
Save your application-wide properties.
void setAutoSaveSettings(const TQString &groupName=TQString::fromLatin1("MainWindow"), bool saveWindowSize=true)
Call this to enable "auto-save" of toolbar/menubar/statusbar settings (and optionally window size).
void applyMainWindowSettings(TDEConfig *config, const TQString &groupName, bool force)
Read settings for statusbar, menubar and toolbar from their respective groups in the config file and ...
bool isStandardToolBarMenuEnabled() const
TQPtrListIterator< TDEToolBar > toolBarIterator()
TQString settingsGroup() const
For inherited classes.
virtual void saveProperties(TDEConfig *)
Save your instance-specific properties.
TDEMainWindow(TQWidget *parent=0, const char *name=0, WFlags f=(WFlags)(WType_TopLevel|WDestructiveClose))
Construct a main window.
virtual void slotStateChanged(const TQString &newstate)
Apply a state change.
void saveAutoSaveSettings()
This slot should only be called in case you reimplement closeEvent() and if you are using the "auto-s...
virtual void show()
Reimplementation of TQMainWindow::show()
virtual void setPlainCaption(const TQString &caption)
Make a plain caption without any modifications.
bool hasMenuBar()
Returns true, if there is a menubar.
TQString autoSaveGroup() const
void createGUI(const TQString &xmlfile=TQString::null, bool _conserveMemory=true)
Create a GUI given a local XML file.
kndbgstream & endl(kndbgstream &s)
kdbgstream kdDebug(int area=0)
TQString locate(const char *type, const TQString &filename, const TDEInstance *instance=TDEGlobal::instance())
TDEAction * configureToolbars(const TQObject *recvr, const char *slot, TDEActionCollection *parent, const char *name)
The Customize Toolbar dialog.
TDEToggleAction * showStatusbar(const TQObject *recvr, const char *slot, TDEActionCollection *parent, const char *_name)
Show/Hide the statusbar.
TDEAction * keyBindings(const TQObject *recvr, const char *slot, TDEActionCollection *parent, const char *name)
Display the configure key bindings dialog.
TQString name(StdAccel id)