• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

Konsole

MainWindow.h

Go to the documentation of this file.
00001 /*
00002     Copyright 2006-2008 by Robert Knight <robertknight@gmail.com>
00003 
00004     This program is free software; you can redistribute it and/or modify
00005     it under the terms of the GNU General Public License as published by
00006     the Free Software Foundation; either version 2 of the License, or
00007     (at your option) any later version.
00008 
00009     This program is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012     GNU General Public License for more details.
00013 
00014     You should have received a copy of the GNU General Public License
00015     along with this program; if not, write to the Free Software
00016     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017     02110-1301  USA.
00018 */
00019 
00020 #ifndef KONSOLEMAINWINDOW_H
00021 #define KONSOLEMAINWINDOW_H
00022 
00023 // Qt
00024 #include <QtCore/QPointer>
00025 
00026 // KDE
00027 #include <KXmlGuiWindow>
00028 #include <KUrl>
00029 
00030 // Local
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         // reimplemented from KMainWindow
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         // single shot call to set the visibility of the menu bar.  Has no 
00151         // effect if the menu bar is a MacOS-style top-level menu
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

Konsole

Skip menu "Konsole"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • Konsole
  • Libraries
  •   libkonq
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal