17 #include <QApplication>
19 #include <kshortcutsdialog.h>
20 #include <kedittoolbar.h>
21 #include <kstandardaction.h>
24 #include <kiconloader.h>
25 #include <kstatusbar.h>
27 #include <kactioncollection.h>
28 #include <ksqueezedtextlabel.h>
43 createStandardStatusBarAction();
44 setStandardToolBarMenuEnabled(
true);
47 KStandardAction::quit(qApp, SLOT(closeAllWindows()), actionCollection());
48 KStandardAction::configureToolbars(
this, SLOT(
slotConfToolbar()), actionCollection());
49 KStandardAction::keyBindings(
this, SLOT(
slotConfKeys()), actionCollection());
52 connect( m_mainWidget, SIGNAL(signalCaptionChangeRequest(QString)),
53 SLOT(setCaption(QString)) );
54 setCentralWidget( m_mainWidget );
57 this, SLOT(slotShowStatusMsg(QString)) );
58 createGUI(
"knodeui.rc" );
59 knGlobals.setComponentData( KComponentData() );
61 applyMainWindowSettings(KGlobal::config()->group(
"mainWindow_options") );
66 saveMainWindowSettings(
knGlobals.config()->group(
"mainWindow_options") );
76 saveMainWindowSettings(
knGlobals.config()->group(
"mainWindow_options") );
77 KEditToolBar dlg( actionCollection() );
78 dlg.setResourceFile(
"knodeui.rc" );
85 createGUI(
"knodeui.rc");
87 applyMainWindowSettings(
knGlobals.config()->group(
"mainWindow_options") );
92 KShortcutsDialog::configure(actionCollection(), KShortcutsEditor::LetterShortcutsAllowed);
100 void KNMainWindow::setupStatusBar()
103 mProgressDialog->hide();
106 mLittleProgress->show();
108 statusBar()->addPermanentWidget( mLittleProgress, 0 );
110 mStatusMsgLabel =
new KSqueezedTextLabel( QString(), statusBar() );
111 mStatusMsgLabel->setTextElideMode( Qt::ElideRight );
112 mStatusMsgLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
113 statusBar()->addWidget( mStatusMsgLabel, 2 );
118 void KNMainWindow::slotShowStatusMsg(
const QString &msg ) {
119 mStatusMsgLabel->setText( msg );
void openURL(const KUrl &)
static BroadcastStatus * instance()
This is the central part of the KNode GUI.
void slotNewToolbarConfig()
KSqueezedTextLabel * statusBarLabelGroup() const
KNMainWindow(QWidget *parent=0)
KSqueezedTextLabel * statusBarLabelFilter() const
void openURL(const KUrl &url)
handle URL given as command-line argument
#define knGlobals
Keep compatibility with the old way.