StatusBar in KMainWindow

David Faure dfaure at klaralvdalens-datakonsult.se
Thu Mar 13 09:30:36 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 13 March 2003 09:05, Benjamin Meyer wrote:
> @@ -729,9 +730,11 @@ void KMainWindow::applyMainWindowSetting
>          i = config->readListEntry (QString::fromLatin1("StatusBar"), 
> entryList, ';');
>          entry = entryList.first();
>          if (entry == QString::fromLatin1("Disabled")){
> +           d->showStatusbar->setChecked(false);
>            sb->hide();
>          }
>          else{
> +            d->showStatusbar->setChecked(true);
>              sb->show();
>         }
>      }
> @@ -939,6 +942,8 @@ KStatusBar *KMainWindow::statusBar()
>          // trigger a re-layout and trigger a call to the private
>          // setStatusBar method.
>          QMainWindow::statusBar();
> +       d->showStatusbar = KStdAction::showStatusbar(this, 
> SLOT(setSettingsDirty()), actionCollection());
> +        connect(d->showStatusbar, SIGNAL(toggled(bool)), sb, 
> SLOT(setShown(bool)));
>      }
>      return sb;
>  }

This might be a little too intrusive IMHO. The app will have no way to choose
whether it wants this action or not.
And in e.g. Konqueror we don't want it (there isn't a single statusbar,
but one per view).

I think we rather need a dedicated class, KToggleStatusBar, like we have
KToggleToolBar, that does all the magic behind the scenes, but one still
has to create it explicitly using KStdAction::showStatusbar.

- -- 
David Faure -- faure at kde.org, dfaure at klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD4DBQE+cE++72KcVAmwbhARApxuAJ9PdFnNykXRcRq9Em3JjZhRtyDXqQCYzghn
abkj/emw/HyxCqL6f7pLxw==
=A71P
-----END PGP SIGNATURE-----





More information about the kde-core-devel mailing list