hard code some size hint into the file system support dialog so it doesn't open

way too small on first time. also, add some const accessors to the class while
we're at it.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=1076607
This commit is contained in:
Volker Lanz 2010-01-18 13:46:45 +00:00
parent 908bfe3669
commit 90720ad383
3 changed files with 11 additions and 4 deletions

2
TODO
View File

@ -23,8 +23,6 @@ Random plans and ideas for 1.1 and beyond:
hopefully be able to get meaningful progress status reporting while resizing, hopefully be able to get meaningful progress status reporting while resizing,
checking and so on. checking and so on.
* Default size of File System Support dialog window.
* Re-design partition list. Maybe include all disks into the list and drop the * Re-design partition list. Maybe include all disks into the list and drop the
devices panel? devices panel?

View File

@ -39,8 +39,6 @@ FileSystemSupportDialog::FileSystemSupportDialog(QWidget* parent) :
setCaption(i18nc("@title:window", "File System Support")); setCaption(i18nc("@title:window", "File System Support"));
setButtons(KDialog::Ok); setButtons(KDialog::Ok);
resize(dialogWidget().width(), dialogWidget().height());
setupDialog(); setupDialog();
setupConnections(); setupConnections();
@ -54,6 +52,11 @@ FileSystemSupportDialog::~FileSystemSupportDialog()
saveDialogSize(kcg); saveDialogSize(kcg);
} }
QSize FileSystemSupportDialog::sizeHint() const
{
return QSize(690, 490);
}
void FileSystemSupportDialog::setupDialog() void FileSystemSupportDialog::setupDialog()
{ {
QPixmap yes(BarIcon("dialog-ok")); QPixmap yes(BarIcon("dialog-ok"));

View File

@ -48,18 +48,24 @@ class FileSystemSupportDialog : public KDialog
public: public:
QTreeWidget& tree() { Q_ASSERT(m_Tree); return *m_Tree; } QTreeWidget& tree() { Q_ASSERT(m_Tree); return *m_Tree; }
const QTreeWidget& tree() const { Q_ASSERT(m_Tree); return *m_Tree; }
KPushButton& buttonRescan() { Q_ASSERT(m_ButtonRescan); return *m_ButtonRescan; } KPushButton& buttonRescan() { Q_ASSERT(m_ButtonRescan); return *m_ButtonRescan; }
const KPushButton& buttonRescan() const { Q_ASSERT(m_ButtonRescan); return *m_ButtonRescan; }
}; };
public: public:
FileSystemSupportDialog(QWidget* parent); FileSystemSupportDialog(QWidget* parent);
~FileSystemSupportDialog(); ~FileSystemSupportDialog();
public:
QSize sizeHint() const;
protected slots: protected slots:
void onButtonRescanClicked(); void onButtonRescanClicked();
protected: protected:
FileSystemSupportDialogWidget& dialogWidget() { Q_ASSERT(m_FileSystemSupportDialogWidget); return *m_FileSystemSupportDialogWidget; } FileSystemSupportDialogWidget& dialogWidget() { Q_ASSERT(m_FileSystemSupportDialogWidget); return *m_FileSystemSupportDialogWidget; }
const FileSystemSupportDialogWidget& dialogWidget() const { Q_ASSERT(m_FileSystemSupportDialogWidget); return *m_FileSystemSupportDialogWidget; }
void setupDialog(); void setupDialog();
void setupConnections(); void setupConnections();