~ubuntu-branches/ubuntu/precise/konsole/precise-proposed

« back to all changes in this revision

Viewing changes to src/ProfileList.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-12-16 13:14:43 UTC
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: package-import@ubuntu.com-20111216131443-rhdplbmmuxntat3k
Tags: upstream-4.7.90
ImportĀ upstreamĀ versionĀ 4.7.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#ifndef PROFILELIST_H
21
21
#define PROFILELIST_H
22
22
 
 
23
// Qt
23
24
#include <QtCore/QList>
24
25
#include <QtCore/QSet>
25
26
#include <QtCore/QObject>
26
27
 
 
28
// Konsole
27
29
#include "Profile.h"
28
30
#include "konsole_export.h"
29
31
 
36
38
 
37
39
class Profile;
38
40
 
39
 
/** 
40
 
 * ProfileList provides a list of actions which represent session profiles 
41
 
 * that a SessionManager can create a session from.  
 
41
/**
 
42
 * ProfileList provides a list of actions which represent session profiles
 
43
 * that a SessionManager can create a session from.
42
44
 *
43
45
 * These actions can be plugged into a GUI.
44
46
 *
45
 
 * Currently only profiles marked as favorites in the SessionManager are included. 
 
47
 * Currently only profiles marked as favorites in the SessionManager are included.
46
48
 *
47
 
 * The user-data associated with each session can be passed to the createProfile() method of the 
48
 
 * SessionManager to create a new terminal session. 
 
49
 * The user-data associated with each session can be passed to the createProfile() method of the
 
50
 * SessionManager to create a new terminal session.
49
51
 */
50
52
class KONSOLEPRIVATE_EXPORT ProfileList : public QObject
51
53
{
52
54
Q_OBJECT
53
55
 
54
56
public:
55
 
    /** 
56
 
     * Constructs a new session list which displays sessions 
57
 
     * that can be created by @p manager 
 
57
    /**
 
58
     * Constructs a new session list which displays sessions
 
59
     * that can be created by @p manager
58
60
     *
59
61
     * @param addShortcuts True if the shortcuts associated with profiles
60
62
     * in the session manager should be added to the actions
62
64
     */
63
65
    ProfileList(bool addShortcuts , QObject* parent);
64
66
 
65
 
    /** 
 
67
    /**
66
68
     * Returns a list of actions representing the types of sessions which can be created by
67
 
     * manager().  
 
69
     * manager().
68
70
     * The user-data associated with each action is the string key that can be passed to
69
 
     * the manager to request creation of a new session. 
 
71
     * the manager to request creation of a new session.
70
72
     */
71
73
    QList<QAction*> actions();
72
74
 
73
 
    /** TODO: Document me */ 
 
75
    /** TODO: Document me */
74
76
    void syncWidgetActions(QWidget* widget,bool sync);
75
77
signals:
76
 
   /** 
 
78
   /**
77
79
    * Emitted when the user selects an action from the list.
78
 
    * 
 
80
    *
79
81
    * @param profile The profile to select
80
82
    */
81
83
   void profileSelected(Profile::Ptr profile);
97
99
 
98
100
    QActionGroup*   _group;
99
101
    bool _addShortcuts;
100
 
    
 
102
 
101
103
    // action to show when the list is empty
102
104
    QAction* _emptyListAction;
103
105
    QSet<QWidget*> _registeredWidgets;
104
 
}; 
 
106
};
105
107
 
106
108
}
107
109