[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdebase/ksysguard/gui
From: Benjamin Meyer <benjamin () csh ! rit ! edu>
Date: 2004-07-15 14:09:06
Message-ID: 20040715140906.75F9C99D4 () office ! kde ! org
[Download RAW message or body]
CVS commit by bmeyer:
convert to setupGUI(), resolves several edge cases with custom saving of
window size/position
M +5 -0 WorkSheet.cc 1.81
M +2 -1 WorkSheet.h 1.30
M +3 -21 ksysguard.cc 1.83
--- kdebase/ksysguard/gui/WorkSheet.cc #1.80:1.81
@@ -446,4 +446,9 @@ void WorkSheet::dropEvent( QDropEvent *e
}
+QSize WorkSheet::sizeHint() const
+{
+ return QSize( 200,150 );
+}
+
void WorkSheet::customEvent( QCustomEvent *e )
{
--- kdebase/ksysguard/gui/WorkSheet.h #1.29:1.30
@@ -86,4 +86,5 @@ class WorkSheet : public QWidget, public
protected:
+ virtual QSize sizeHint() const;
void dragEnterEvent( QDragEnterEvent* );
void dropEvent( QDropEvent* );
--- kdebase/ksysguard/gui/ksysguard.cc #1.82:1.83
@@ -121,19 +121,14 @@ TopLevel::TopLevel( const char *name )
KStdAction::revert( this, SLOT( resetWorkSheets() ), actionCollection() );
- KStdAction::showToolbar( "mainToolBar", actionCollection() );
mActionStatusBar = KStdAction::showStatusbar( this, SLOT( showStatusBar() ),
actionCollection() );
mActionStatusBar->setChecked( false );
- KStdAction::configureToolbars( this, SLOT( editToolbars() ), actionCollection() );
- KStdAction::keyBindings(guiFactory(), SLOT(configureShortcuts()),
-actionCollection());
-
new KAction( i18n( "Configure &Style..." ), "colorize", 0, this,
SLOT( editStyle() ), actionCollection(), "configure_style" );
- createGUI();
-
- resize( 600, 440 );
+ // TODO remove resize and fix so sizeHints() determines default size.
+ resize( 640, 480 );
+ setupGUI();
}
@@ -383,11 +378,4 @@ void TopLevel::readProperties( KConfig *
if ( cfg->readBoolEntry( "isMinimized" ) == true )
showMinimized();
- else {
- int wx = cfg->readNumEntry( "PosX", 100 );
- int wy = cfg->readNumEntry( "PosY", 100 );
- int ww = cfg->readNumEntry( "SizeX", 600 );
- int wh = cfg->readNumEntry( "SizeY", 375 );
- setGeometry( wx, wy, ww, wh );
- }
QValueList<int> sizes = cfg->readIntListEntry( "SplitterSizeList" );
@@ -418,13 +406,7 @@ void TopLevel::saveProperties( KConfig *
mActionOpenRecent->saveEntries( cfg );
- cfg->writeEntry( "PosX", x() );
- cfg->writeEntry( "PosY", y() );
- cfg->writeEntry( "SizeX", width() );
- cfg->writeEntry( "SizeY", height() );
cfg->writeEntry( "isMinimized", isMinimized() );
cfg->writeEntry( "SplitterSizeList", mSplitter->sizes() );
- saveMainWindowSettings( cfg );
-
KSGRD::Style->saveProperties( cfg );
KSGRD::SensorMgr->saveProperties( cfg );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic