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

Konsole

MainWindow.h

Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2006-2007 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 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         // reimplemented from KMainWindow
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         // single shot call to set the visibility of the menu bar.  Has no 
00149         // effect if the menu bar is a MacOS-style top-level menu
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

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