summaryrefslogtreecommitdiffabout
path: root/microkde
Unidiff
Diffstat (limited to 'microkde') (more/less context) (show whitespace changes)
-rw-r--r--microkde/kdeui/kmainwindow.cpp9
-rw-r--r--microkde/kdeui/kmainwindow.h2
2 files changed, 6 insertions, 5 deletions
diff --git a/microkde/kdeui/kmainwindow.cpp b/microkde/kdeui/kmainwindow.cpp
index 3ae4c87..fa678f2 100644
--- a/microkde/kdeui/kmainwindow.cpp
+++ b/microkde/kdeui/kmainwindow.cpp
@@ -44,25 +44,25 @@ public:
44 bool care_about_geometry:1; 44 bool care_about_geometry:1;
45 QString autoSaveGroup; 45 QString autoSaveGroup;
46//US KAccel * kaccel; 46//US KAccel * kaccel;
47//US KMainWindowInterface *m_interface; 47//US KMainWindowInterface *m_interface;
48 KDEPrivate::ToolBarHandler *toolBarHandler; 48 KDEPrivate::ToolBarHandler *toolBarHandler;
49 QTimer* settingsTimer; 49 QTimer* settingsTimer;
50 KToggleAction *showStatusBarAction; 50 KToggleAction *showStatusBarAction;
51 QRect defaultWindowSize; 51 QRect defaultWindowSize;
52}; 52};
53 53
54static bool no_query_exit = false; 54static bool no_query_exit = false;
55 55
56KMainWindow::KMainWindow( QWidget* parent, const char *name, WFlags f ) 56KMainWindow::KMainWindow( QWidget* parent, const char *name )
57 : QMainWindow( parent, name ) /*LR, f ) with the default widget flag we cannot have fastload */ /*US, KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 )*/ 57 : QMainWindow( parent, name ) /*LR, f ) with the default widget flag we cannot have fastload */ /*US, KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 )*/
58{ 58{
59 mQToolBar = 0; 59 mQToolBar = 0;
60 initKMainWindow(name); 60 initKMainWindow(name);
61} 61}
62 62
63void KMainWindow::parseGeometry(bool parsewidth) 63void KMainWindow::parseGeometry(bool parsewidth)
64{ 64{
65//US the following code is not getting used in the embedded version !! So disable it for now 65//US the following code is not getting used in the embedded version !! So disable it for now
66/*US 66/*US
67 67
68 assert ( !kapp->geometryArgument().isNull() ); 68 assert ( !kapp->geometryArgument().isNull() );
@@ -838,28 +838,29 @@ void KMainWindow::setSettingsDirty()
838} 838}
839 839
840bool KMainWindow::settingsDirty() const 840bool KMainWindow::settingsDirty() const
841{ 841{
842 return d->settingsDirty; 842 return d->settingsDirty;
843} 843}
844 844
845QString KMainWindow::settingsGroup() const 845QString KMainWindow::settingsGroup() const
846{ 846{
847 return d->autoSaveGroup; 847 return d->autoSaveGroup;
848} 848}
849 849
850void KMainWindow::resizeEvent( QResizeEvent * ) 850void KMainWindow::resizeEvent( QResizeEvent * e)
851{ 851{
852 if ( d->autoSaveWindowSize ) 852 if ( d->autoSaveWindowSize )
853 setSettingsDirty(); 853 setSettingsDirty();
854 QMainWindow::resizeEvent( e );
854} 855}
855 856
856bool KMainWindow::hasMenuBar() 857bool KMainWindow::hasMenuBar()
857{ 858{
858 return (internalMenuBar()); 859 return (internalMenuBar());
859} 860}
860 861
861//US KMenuBar *KMainWindow::menuBar() 862//US KMenuBar *KMainWindow::menuBar()
862QMenuBar *KMainWindow::menuBar() 863QMenuBar *KMainWindow::menuBar()
863{ 864{
864//US KMenuBar * mb = internalMenuBar(); 865//US KMenuBar * mb = internalMenuBar();
865 QMenuBar * mb = internalMenuBar(); 866 QMenuBar * mb = internalMenuBar();
@@ -931,27 +932,27 @@ QStatusBar *KMainWindow::internalStatusBar()
931 932
932//US KStatusBar *s = (KStatusBar*)l->first(); 933//US KStatusBar *s = (KStatusBar*)l->first();
933 QStatusBar *s = (QStatusBar*)l->first(); 934 QStatusBar *s = (QStatusBar*)l->first();
934 delete l; 935 delete l;
935 return s; 936 return s;
936} 937}
937 938
938void KMainWindow::childEvent( QChildEvent* e) 939void KMainWindow::childEvent( QChildEvent* e)
939{ 940{
940 QMainWindow::childEvent( e ); 941 QMainWindow::childEvent( e );
941} 942}
942 943
943void KMainWindow::paintEvent( QPaintEvent * ) 944void KMainWindow::paintEvent( QPaintEvent * e)
944{ 945{
945 // do nothing 946 QMainWindow::paintEvent( e );
946} 947}
947 948
948QSize KMainWindow::sizeForCentralWidgetSize(QSize size) 949QSize KMainWindow::sizeForCentralWidgetSize(QSize size)
949{ 950{
950 KToolBar *tb = (KToolBar*)child( "mainToolBar", "KToolBar" ); 951 KToolBar *tb = (KToolBar*)child( "mainToolBar", "KToolBar" );
951 if (tb && !tb->isHidden()) { 952 if (tb && !tb->isHidden()) {
952 switch( tb->barPos() ) 953 switch( tb->barPos() )
953 { 954 {
954 case KToolBar::Top: 955 case KToolBar::Top:
955 case KToolBar::Bottom: 956 case KToolBar::Bottom:
956 size += QSize(0, tb->sizeHint().height()); 957 size += QSize(0, tb->sizeHint().height());
957 break; 958 break;
diff --git a/microkde/kdeui/kmainwindow.h b/microkde/kdeui/kmainwindow.h
index 2aafb9d..2dc8033 100644
--- a/microkde/kdeui/kmainwindow.h
+++ b/microkde/kdeui/kmainwindow.h
@@ -85,25 +85,25 @@ public:
85 * 85 *
86 * @param f Specify the widget flags. The default is 86 * @param f Specify the widget flags. The default is
87 * WType_TopLevel and WDestructiveClose. TopLevel indicates that a 87 * WType_TopLevel and WDestructiveClose. TopLevel indicates that a
88 * main window is a toplevel window, regardless of whether it has a 88 * main window is a toplevel window, regardless of whether it has a
89 * parent or not. DestructiveClose indicates that a main window is 89 * parent or not. DestructiveClose indicates that a main window is
90 * automatically destroyed when its window is closed. Pass 0 if 90 * automatically destroyed when its window is closed. Pass 0 if
91 * you do not want this behavior. 91 * you do not want this behavior.
92 * 92 *
93 * KMainWindows must be created on the heap with 'new', like: 93 * KMainWindows must be created on the heap with 'new', like:
94 * <pre> KMainWindow *kmw = new KMainWindow (...</pre> 94 * <pre> KMainWindow *kmw = new KMainWindow (...</pre>
95 **/ 95 **/
96 //LR remove WDestructiveClose 96 //LR remove WDestructiveClose
97 KMainWindow( QWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel /*| WDestructiveClose*/ ); 97 KMainWindow( QWidget* parent = 0, const char *name = 0 ); //, WFlags f = WType_TopLevel /*| WDestructiveClose*/ ;
98 98
99 99
100 /** 100 /**
101 * Destructor. 101 * Destructor.
102 * 102 *
103 * Will also destroy the toolbars, and menubar if 103 * Will also destroy the toolbars, and menubar if
104 * needed. 104 * needed.
105 */ 105 */
106 virtual ~KMainWindow(); 106 virtual ~KMainWindow();
107 107
108 /** 108 /**
109 * Retrieve the standard help menu. 109 * Retrieve the standard help menu.