Commit 98ae1fcf authored by Benjamin Meyer's avatar Benjamin Meyer

KMainWindow can now handle the statusbar and toolbar, removed unnecessary

functionality.

svn path=/trunk/kdegraphics/kpdf/; revision=214429
parent 5e4de973
...@@ -28,9 +28,6 @@ Shell::Shell() ...@@ -28,9 +28,6 @@ Shell::Shell()
// then, setup our actions // then, setup our actions
setupActions(); setupActions();
// and a status bar
statusBar()->show();
// this routine will find and load our Part. it finds the Part by // this routine will find and load our Part. it finds the Part by
// name which is a bad idea usually.. but it's alright in this // name which is a bad idea usually.. but it's alright in this
// case since our Part is made for this Shell // case since our Part is made for this Shell
...@@ -80,8 +77,8 @@ Shell::setupActions() ...@@ -80,8 +77,8 @@ Shell::setupActions()
KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection()); KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
KStdAction::quit(kapp, SLOT(quit()), actionCollection()); KStdAction::quit(kapp, SLOT(quit()), actionCollection());
m_toolbarAction = KStdAction::showToolbar(this, SLOT(optionsShowToolbar()), actionCollection()); createStandardStatusBarAction();
m_statusbarAction = KStdAction::showStatusbar(this, SLOT(optionsShowStatusbar()), actionCollection()); setStandardToolBarMenuEnabled(true);
KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection()); KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection());
KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection()); KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection());
...@@ -127,28 +124,6 @@ Shell::fileSaveAs() ...@@ -127,28 +124,6 @@ Shell::fileSaveAs()
*/ */
} }
void
Shell::optionsShowToolbar()
{
// this is all very cut and paste code for showing/hiding the
// toolbar
if (m_toolbarAction->isChecked())
toolBar()->show();
else
toolBar()->hide();
}
void
Shell::optionsShowStatusbar()
{
// this is all very cut and paste code for showing/hiding the
// statusbar
if (m_statusbarAction->isChecked())
statusBar()->show();
else
statusBar()->hide();
}
void void
Shell::optionsConfigureKeys() Shell::optionsConfigureKeys()
{ {
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
#include <kapplication.h> #include <kapplication.h>
#include <kparts/mainwindow.h> #include <kparts/mainwindow.h>
class KToggleAction;
namespace KPDF namespace KPDF
{ {
...@@ -59,8 +57,6 @@ namespace KPDF ...@@ -59,8 +57,6 @@ namespace KPDF
void fileOpen(); void fileOpen();
void fileSaveAs(); void fileSaveAs();
void optionsShowToolbar();
void optionsShowStatusbar();
void optionsConfigureKeys(); void optionsConfigureKeys();
void optionsConfigureToolbars(); void optionsConfigureToolbars();
...@@ -73,8 +69,6 @@ namespace KPDF ...@@ -73,8 +69,6 @@ namespace KPDF
private: private:
KParts::ReadOnlyPart* m_part; KParts::ReadOnlyPart* m_part;
KToggleAction* m_toolbarAction;
KToggleAction* m_statusbarAction;
}; };
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment