blob: dfdc5a191d63f453540d8a529578f0a56aac607a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
//
// C++ Interface: actionproperty
//
// Description:
//
//
// Author: Jonas Bähr (C) 2004
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef ACTIONPROPERTY_H
#define ACTIONPROPERTY_H
#include "actionpropertybase.h"
class KrAction;
class TDEShortcut;
/**
* Use this widget where ever you need to manipulate a UserAction
* @author Jonas Bähr (http://www.jonas-baehr.de)
*/
class ActionProperty : public ActionPropertyBase {
TQ_OBJECT
public:
ActionProperty( TQWidget *parent=0, const char *name=0, KrAction *action=0 );
~ActionProperty();
/**
* @return the currently displayed action
*/
KrAction* action() { return _action; };
/**
* This inits the widget with the actions properties.
* If no action is provided, the last used will be taken!
* It also resets the changed() state.
* @param action the action which should be displayd
*/
void updateGUI( KrAction *action = 0 );
/**
* This writes the displayed properties back into the action.
* If no action is provided, the last used will be taken!
* It also resets the changed() state.
* @param action the action which should be manipulated
*/
void updateAction( KrAction *action = 0 );
/**
* clears everything
*/
void clear();
/**
* @return true if all properties got valid values
*/
bool validProperties();
/**
* @return true if any property got changed
*/
bool isModified() { return _modified; };
signals:
/**
* emited when any actionproperty changed. This signal is only emited when
* the _modified attribute changes to true. If there are changes made and
* _modified is already true, no signal is emited!
*/
void changed();
protected slots:
void setModified( bool m = true );
/**
* executes the AddPlaceholderPopup
*/
void addPlaceholder();
/**
* asks for an existing path
*/
void addStartpath();
/**
* (availability) asks for a new protocol
*/
void newProtocol();
/**
* (availability) changes a protocol of the list
*/
void editProtocol();
/**
* (availability) removes a protocol from the list
*/
void removeProtocol();
/**
* (availability) asks for a new path
*/
void addPath();
/**
* (availability) edits a path of the list
*/
void editPath();
/**
* (availability) removes a path from the list
*/
void removePath();
/**
* (availability) asks for a new mime-type
*/
void addMime();
/**
* (availability) changes a mime-type of the list
*/
void editMime();
/**
* (availability) removes a mime-type from the list
*/
void removeMime();
/**
* (availability) asks for a new file-filter
*/
void newFile();
/**
* (availability) edits a file-filter of the list
*/
void editFile();
/**
* (availability) removes a file-filter from the lsit
*/
void removeFile();
private:
KrAction *_action;
bool _modified;
private slots:
/**
* This updates the ShortcutButton
* @internal
*/
void changedShortcut(const TDEShortcut& shortcut);
};
#endif
|