kapptemplate
Go to the documentation of this file.
21 #include "%{APPNAMELC}.moc"
24 #include <kactioncollection.h>
26 #include <kedittoolbar.h>
27 #include <kfiledialog.h>
28 #include <kshortcutsdialog.h>
29 #include <klibloader.h>
30 #include <kmessagebox.h>
31 #include <kstandardaction.h>
32 #include <kstatusbar.h>
36 #include <QApplication>
39 : KParts::MainWindow( )
42 setXMLFile(
"%{APPNAMELC}_shell.rc");
50 KLibFactory *factory = KLibLoader::self()->factory(
"lib%{APPNAMELC}part");
55 m_part =
static_cast<KParts::ReadWritePart *
>(factory->create(
this,
61 setCentralWidget(m_part->widget());
71 KMessageBox::error(
this, i18n(
"Could not find our Part!"));
81 setAutoSaveSettings();
88 void %{
APPNAME}::load(
const KUrl& url)
90 m_part->openUrl( url );
95 KStandardAction::openNew(
this, SLOT(fileNew()), actionCollection());
96 KStandardAction::open(
this, SLOT(fileOpen()), actionCollection());
98 KStandardAction::quit(qApp, SLOT(closeAllWindows()), actionCollection());
100 createStandardStatusBarAction();
101 setStandardToolBarMenuEnabled(
true);
107 void %{
APPNAME}::saveProperties(KConfigGroup & )
114 void %{
APPNAME}::readProperties(
const KConfigGroup & )
132 if ( ! m_part->url().isEmpty() || m_part->isModified() )
138 void %{
APPNAME}::optionsConfigureKeys()
146 void %{
APPNAME}::optionsConfigureToolbars()
157 void %{
APPNAME}::applyNewToolbarConfig()
168 KFileDialog::getOpenUrl( KUrl(),
QString(),
this );
170 if (url.isEmpty() ==
false)
176 if ( m_part->url().isEmpty() && ! m_part->isModified() )
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:39:44 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.