• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

  • tdeui
tdeactionselector.h
1/* This file is part of the KDE project
2 Copyright (C) 2002 Anders Lund <anders.lund@lund.tdcadsl.dk>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
7
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
17*/
18
19#ifndef _TDEACTION_SELECTOR_H_
20#define _TDEACTION_SELECTOR_H_
21
22#include <tqwidget.h>
23
24#include <tdelibs_export.h>
25
26class TQListBox;
27class TQListBoxItem;
28class TQKeyEvent;
29class TQEvent;
30class TQIconSet;
31
32class TDEActionSelectorPrivate;
33
79class TDEUI_EXPORT TDEActionSelector : public TQWidget {
80 TQ_OBJECT
81 TQ_ENUMS( ButtonIconSize InsertionPolicy )
82 TQ_PROPERTY( bool moveOnDoubleClick READ moveOnDoubleClick WRITE setMoveOnDoubleClick )
83 TQ_PROPERTY( bool keyboardEnabled READ keyboardEnabled WRITE setKeyboardEnabled )
84 TQ_PROPERTY( TQString availableLabel READ availableLabel WRITE setAvailableLabel )
85 TQ_PROPERTY( TQString selectedLabel READ selectedLabel WRITE setSelectedLabel )
86 TQ_PROPERTY( ButtonIconSize buttonIconSize READ buttonIconSize WRITE setButtonIconSize )
87 TQ_PROPERTY( InsertionPolicy availableInsertionPolicy READ availableInsertionPolicy WRITE setAvailableInsertionPolicy )
88 TQ_PROPERTY( InsertionPolicy selectedInsertionPolicy READ selectedInsertionPolicy WRITE setSelectedInsertionPolicy )
89 TQ_PROPERTY( bool showUpDownButtons READ showUpDownButtons WRITE setShowUpDownButtons )
90
91public:
92 TDEActionSelector( TQWidget *parent=0, const char *name=0 );
93 ~TDEActionSelector();
94
98 TQListBox *availableListBox() const;
99
103 TQListBox *selectedListBox() const;
104
108 enum MoveButton {
109 ButtonAdd,
110 ButtonRemove,
111 ButtonUp,
112 ButtonDown
113 };
114
125 enum ButtonIconSize {
126 SmallIcon,
127 Small,
128 Medium,
129 Large,
130 XLarge
131 };
132
145 enum InsertionPolicy {
146 BelowCurrent,
147 Sorted,
148 AtTop,
149 AtBottom
150 };
151
159 bool moveOnDoubleClick() const;
160
165 void setMoveOnDoubleClick( bool enable );
166
185 bool keyboardEnabled() const;
186
191 void setKeyboardEnabled( bool enable );
192
196 TQString availableLabel() const;
197
204 void setAvailableLabel( const TQString & text );
205
209 TQString selectedLabel() const;
210
217 void setSelectedLabel( const TQString & text );
218
222 ButtonIconSize buttonIconSize() const;
223
228 void setButtonIconSize( ButtonIconSize size );
229
235 InsertionPolicy availableInsertionPolicy() const;
236
241 void setAvailableInsertionPolicy( InsertionPolicy policy );
242
248 InsertionPolicy selectedInsertionPolicy() const;
249
254 void setSelectedInsertionPolicy( InsertionPolicy policy );
255
259 bool showUpDownButtons() const;
260
265 void setShowUpDownButtons( bool show );
266
271 void setButtonIcon( const TQString &icon, MoveButton button );
272
279 void setButtonIconSet( const TQIconSet &iconset, MoveButton button );
280
284 void setButtonTooltip( const TQString &tip, MoveButton button );
285
289 void setButtonWhatsThis( const TQString &text, MoveButton button );
290
298 void setButtonsEnabled();
299
300signals:
304 void added( TQListBoxItem *item );
305
309 void removed( TQListBoxItem *item );
310
314 void movedUp( TQListBoxItem *item );
315
319 void movedDown( TQListBoxItem *item );
320
324// void addedToSelection( TQListBoxItem *item );
325
326public slots:
331 void polish();
332
333protected:
337 void keyPressEvent( TQKeyEvent * );
338
342 bool eventFilter( TQObject *, TQEvent * );
343
344private slots:
348 void buttonAddClicked();
349
353 void buttonRemoveClicked();
354
358 void buttonUpClicked();
359
363 void buttonDownClicked();
364
368 void itemDoubleClicked( TQListBoxItem *item );
369
373 void slotCurrentChanged( TQListBoxItem * ) { setButtonsEnabled(); }
374
375private:
376
380 void moveItem( TQListBoxItem *item );
381
385 void loadIcons();
386
394 int insertionIndex( TQListBox *lb, InsertionPolicy policy );
395
399 TDEActionSelectorPrivate *d;
400};
401
402#endif // _TDEACTION_SELECTOR_H_
TDEActionSelector
A widget for selecting and arranging actions/objects.
Definition: tdeactionselector.h:79
TDEActionSelector::movedUp
void movedUp(TQListBoxItem *item)
Emitted when an item is moved upwards in the "selected" listbox.
TDEActionSelector::InsertionPolicy
InsertionPolicy
This enum defines policies for where to insert moved items in a listbox.
Definition: tdeactionselector.h:145
TDEActionSelector::MoveButton
MoveButton
This enum indentifies the moving buttons.
Definition: tdeactionselector.h:108
TDEActionSelector::movedDown
void movedDown(TQListBoxItem *item)
Emitted when an item is moved downwards in the "selected" listbox.
TDEActionSelector::ButtonIconSize
ButtonIconSize
This enum identifies the icon sizes, used for the move buttons.
Definition: tdeactionselector.h:125
TDEActionSelector::added
void added(TQListBoxItem *item)
Emitted when an item is moved to the "selected" listbox.
TDEActionSelector::removed
void removed(TQListBoxItem *item)
Emitted when an item is moved out of the "selected" listbox.

tdeui

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

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.9.4
This website is maintained by Timothy Pearson.