• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • applications API Reference
  • KDE Home
  • Contact Us
 

Konsole

  • kde-4.14
  • applications
  • konsole
  • src
ProfileList.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2008 by Robert Knight <robertknight@gmail.com>
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  02110-1301 USA.
18 */
19 
20 #ifndef PROFILELIST_H
21 #define PROFILELIST_H
22 
23 // Qt
24 #include <QtCore/QList>
25 #include <QtCore/QSet>
26 #include <QtCore/QObject>
27 
28 // Konsole
29 #include "Profile.h"
30 #include "konsole_export.h"
31 
32 class QAction;
33 class QActionGroup;
34 class QKeySequence;
35 
36 namespace Konsole
37 {
38 class Profile;
39 
51 class KONSOLEPRIVATE_EXPORT ProfileList : public QObject
52 {
53  Q_OBJECT
54 
55 public:
64  ProfileList(bool addShortcuts , QObject* parent);
65 
71  QList<QAction*> actions();
72 
74  void syncWidgetActions(QWidget* widget, bool sync);
75 signals:
81  void profileSelected(Profile::Ptr profile);
85  void actionsChanged(const QList<QAction*>& actions);
86 
87 private slots:
88  void triggered(QAction* action);
89  void favoriteChanged(Profile::Ptr profile, bool isFavorite);
90  void profileChanged(Profile::Ptr profile);
91  void shortcutChanged(Profile::Ptr profile, const QKeySequence& sequence);
92 
93 private:
94  QAction* actionForProfile(Profile::Ptr profile) const;
95  void updateAction(QAction* action , Profile::Ptr profile);
96  void updateEmptyAction();
97 
98  QActionGroup* _group;
99  bool _addShortcuts;
100 
101  // action to show when the list is empty
102  QAction* _emptyListAction;
103  QSet<QWidget*> _registeredWidgets;
104 };
105 }
106 
107 #endif // PROFILELIST_H
QWidget
QActionGroup
Konsole::ProfileList
ProfileList provides a list of actions which represent session profiles that a SessionManager can cre...
Definition: ProfileList.h:51
konsole_export.h
QObject
QSet< QWidget * >
QList
Konsole::Profile::Ptr
KSharedPtr< Profile > Ptr
Definition: Profile.h:67
QKeySequence
QAction
KONSOLEPRIVATE_EXPORT
#define KONSOLEPRIVATE_EXPORT
Definition: konsole_export.h:33
Profile.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Konsole

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

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Konsole

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal