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
00031 #include "Profile.h"
00032
00033 class KToggleAction;
00034
00035 namespace Konsole
00036 {
00037
00038 class IncrementalSearchBar;
00039 class ViewManager;
00040 class ViewProperties;
00041 class SessionController;
00042 class ProfileList;
00043 class BookmarkHandler;
00044
00055 class MainWindow : public KXmlGuiWindow
00056 {
00057 Q_OBJECT
00058
00059 public:
00064 MainWindow();
00065
00070 ViewManager* viewManager() const;
00071
00076 IncrementalSearchBar* searchBar() const;
00077
00079 void setSessionList(ProfileList* list);
00080
00084 BookmarkHandler* bookmarkHandler() const;
00085
00092 void setDefaultProfile(Profile::Ptr profile);
00093
00098 Profile::Ptr defaultProfile() const;
00099
00100
00101 signals:
00110 void newSessionRequest(Profile::Ptr profile,
00111 const QString& directory,
00112 ViewManager* view);
00113
00124 void newWindowRequest(Profile::Ptr profile,
00125 const QString& directory);
00126
00130 void closeActiveSessionRequest();
00131
00132 protected:
00133
00134 virtual bool queryClose();
00135
00136 private slots:
00137 void newTab();
00138 void newWindow();
00139 void showManageProfilesDialog();
00140 void showRemoteConnectionDialog();
00141 void showShortcutsDialog();
00142 void newFromProfile(Profile::Ptr profile);
00143 void activeViewChanged(SessionController* controller);
00144 void activeViewTitleChanged(ViewProperties*);
00145
00146 void sessionListChanged(const QList<QAction*>& actions);
00147 void viewFullScreen(bool fullScreen);
00148 void configureNotifications();
00149
00150
00151
00152 void setMenuBarVisibleOnce(bool visible);
00153
00154 void openUrls(const QList<KUrl>& urls);
00155
00156 private:
00157 void correctShortcuts();
00158 void removeMenuAccelerators();
00159 void setupActions();
00160 void setupWidgets();
00161 QString activeSessionDir() const;
00162 void disconnectController(SessionController* controller);
00163
00164 private:
00165 ViewManager* _viewManager;
00166 BookmarkHandler* _bookmarkHandler;
00167 IncrementalSearchBar* _searchBar;
00168 KToggleAction* _toggleMenuBarAction;
00169
00170 QPointer<SessionController> _pluggedController;
00171
00172 Profile::Ptr _defaultProfile;
00173 bool _menuBarVisibilitySet;
00174 };
00175
00176 }
00177
00178 #endif // KONSOLEMAINWINDOW_H