Konsole
MainWindow.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KONSOLEMAINWINDOW_H
00021 #define KONSOLEMAINWINDOW_H
00022
00023
00024 #include <QtCore/QPointer>
00025
00026
00027 #include <KXmlGuiWindow>
00028 #include <KUrl>
00029
00030 class KToggleAction;
00031
00032 namespace Konsole
00033 {
00034
00035 class IncrementalSearchBar;
00036 class ViewManager;
00037 class ViewProperties;
00038 class SessionController;
00039 class Profile;
00040 class ProfileList;
00041 class BookmarkHandler;
00042
00053 class MainWindow : public KXmlGuiWindow
00054 {
00055 Q_OBJECT
00056
00057 public:
00062 MainWindow();
00063
00068 ViewManager* viewManager() const;
00069
00074 IncrementalSearchBar* searchBar() const;
00075
00077 void setSessionList(ProfileList* list);
00078
00082 BookmarkHandler* bookmarkHandler() const;
00083
00090 void setDefaultProfile(const QString& key);
00091
00096 QString defaultProfile() const;
00097
00098
00099 signals:
00108 void newSessionRequest(const QString& key ,
00109 const QString& directory,
00110 ViewManager* view);
00111
00122 void newWindowRequest(const QString& key,
00123 const QString& directory);
00124
00128 void closeActiveSessionRequest();
00129
00130 protected:
00131
00132 virtual bool queryClose();
00133
00134 private slots:
00135 void newTab();
00136 void newWindow();
00137 void showManageProfilesDialog();
00138 void showRemoteConnectionDialog();
00139 void showShortcutsDialog();
00140 void newFromProfile(const QString&);
00141 void activeViewChanged(SessionController* controller);
00142 void activeViewTitleChanged(ViewProperties*);
00143
00144 void sessionListChanged(const QList<QAction*>& actions);
00145 void viewFullScreen(bool fullScreen);
00146 void configureNotifications();
00147
00148
00149
00150 void setMenuBarVisibleOnce(bool visible);
00151
00152 void openUrls(const QList<KUrl>& urls);
00153
00154 private:
00155 void correctShortcuts();
00156 void setupActions();
00157 void setupWidgets();
00158 QString activeSessionDir() const;
00159 void disconnectController(SessionController* controller);
00160
00161 private:
00162 ViewManager* _viewManager;
00163 BookmarkHandler* _bookmarkHandler;
00164 IncrementalSearchBar* _searchBar;
00165 KToggleAction* _toggleMenuBarAction;
00166
00167 QPointer<SessionController> _pluggedController;
00168
00169 QString _defaultProfile;
00170 bool _menuBarVisibilitySet;
00171 };
00172
00173 }
00174
00175 #endif // KONSOLEMAINWINDOW_H