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

tdeui

  • tdeui
tdecompletionbox.h
1/* This file is part of the KDE libraries
2
3 Copyright (c) 2000 Carsten Pfeiffer <pfeiffer@kde.org>
4 2000 Stefan Schimanski <1Stein@gmx.de>
5 2000,2001,2002,2003,2004 Dawit Alemayehu <adawit@kde.org>
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public
9 License (LGPL) as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
16
17 You should have received a copy of the GNU Library General Public License
18 along with this library; see the file COPYING.LIB. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA.
21*/
22
23#ifndef TDECOMPLETIONBOX_H
24#define TDECOMPLETIONBOX_H
25
26class TQEvent;
27#include <tqstringlist.h>
28#include <tdelistbox.h>
29
43class TDEUI_EXPORT TDECompletionBox : public TDEListBox
44{
45 TQ_OBJECT
46 TQ_PROPERTY( bool isTabHandling READ isTabHandling WRITE setTabHandling )
47 TQ_PROPERTY(TQString cancelledText READ cancelledText WRITE setCancelledText)
48 TQ_PROPERTY( bool activateOnSelect READ activateOnSelect WRITE setActivateOnSelect )
49
50public:
57 TDECompletionBox( TQWidget *parent, const char *name = 0 );
58
62 ~TDECompletionBox();
63
64 virtual TQSize sizeHint() const;
65
71 bool activateOnSelect() const;
72
73public slots:
77 TQStringList items() const;
78
84 void insertItems( const TQStringList& items, int index = -1 );
85
89 void setItems( const TQStringList& items );
90
102 virtual void popup();
103
113 void setTabHandling( bool enable );
114
123 bool isTabHandling() const;
124
135 void setCancelledText( const TQString& txt);
136
140 TQString cancelledText() const;
141
149 void setActivateOnSelect(bool state);
150
151
155 void down();
156
160 void up();
161
165 void pageDown();
166
170 void pageUp();
171
175 void home();
176
180 void end();
181
185 virtual void show();
186
190 virtual void hide();
191
192signals:
197 void activated( const TQString& );
198
203 void userCancelled( const TQString& );
204
205protected:
211 TQRect calculateGeometry() const;
212
216 void sizeAndPosition();
217
222 virtual bool eventFilter( TQObject *, TQEvent * );
223
224protected slots:
229 virtual void slotActivated( TQListBoxItem * );
230
231private slots:
232 void slotSetCurrentItem( TQListBoxItem *i ) { setCurrentItem( i ); } // grrr
233 void slotCurrentChanged();
234 void canceled();
235 void slotItemClicked( TQListBoxItem * );
236
237protected:
238 virtual void virtual_hook( int id, void* data );
239
240private:
241 class TDECompletionBoxPrivate;
242 TDECompletionBoxPrivate* const d;
243};
244
245
246#endif // TDECOMPLETIONBOX_H
TDECompletionBox::hide
virtual void hide()
Re-implemented for internal reasons.
Definition tdecompletionbox.cpp:324
TDECompletionBox::userCancelled
void userCancelled(const TQString &)
Emitted whenever the user chooses to ignore the available selections and close the this box.
TDECompletionBox::cancelledText
TQString cancelledText() const
Definition tdecompletionbox.cpp:441
TDECompletionBox::TDECompletionBox
TDECompletionBox(TQWidget *parent, const char *name=0)
Constructs a TDECompletionBox.
Definition tdecompletionbox.cpp:47
TDECompletionBox::activated
void activated(const TQString &)
Emitted when an item was selected, contains the text of the selected item.
TDECompletionBox::slotActivated
virtual void slotActivated(TQListBoxItem *)
Called when an item was activated.
Definition tdecompletionbox.cpp:99
TDECompletionBox::down
void down()
Moves the selection one line down or select the first item if nothing is selected yet.
Definition tdecompletionbox.cpp:381
TDECompletionBox::setItems
void setItems(const TQStringList &items)
Clears the box and inserts items.
Definition tdecompletionbox.cpp:477
TDECompletionBox::eventFilter
virtual bool eventFilter(TQObject *, TQEvent *)
Reimplemented from TDEListBox to get events from the viewport (to hide this widget on mouse-click,...
Definition tdecompletionbox.cpp:108
TDECompletionBox::pageDown
void pageDown()
Moves the selection one page down.
Definition tdecompletionbox.cpp:402
TDECompletionBox::setActivateOnSelect
void setActivateOnSelect(bool state)
Set whether or not the selected signal should be emitted when an item is selected.
Definition tdecompletionbox.cpp:549
TDECompletionBox::up
void up()
Moves the selection one line up or select the first item if nothing is selected yet.
Definition tdecompletionbox.cpp:396
TDECompletionBox::setCancelledText
void setCancelledText(const TQString &txt)
Sets the text to be emitted if the user chooses not to pick from the available matches.
Definition tdecompletionbox.cpp:436
TDECompletionBox::home
void home()
Moves the selection up to the first item.
Definition tdecompletionbox.cpp:416
TDECompletionBox::popup
virtual void popup()
Adjusts the size of the box to fit the width of the parent given in the constructor and pops it up at...
Definition tdecompletionbox.cpp:250
TDECompletionBox::calculateGeometry
TQRect calculateGeometry() const
This calculates the size of the dropdown and the relative position of the top left corner with respec...
Definition tdecompletionbox.cpp:332
TDECompletionBox::insertItems
void insertItems(const TQStringList &items, int index=-1)
Inserts items into the box.
Definition tdecompletionbox.cpp:468
TDECompletionBox::pageUp
void pageUp()
Moves the selection one page up.
Definition tdecompletionbox.cpp:409
TDECompletionBox::setTabHandling
void setTabHandling(bool enable)
Makes this widget (when visible) capture Tab-key events to traverse the items in the dropdown list.
Definition tdecompletionbox.cpp:426
TDECompletionBox::activateOnSelect
bool activateOnSelect() const
Definition tdecompletionbox.cpp:554
TDECompletionBox::show
virtual void show()
Re-implemented for internal reasons.
Definition tdecompletionbox.cpp:300
TDECompletionBox::end
void end()
Moves the selection down to the last item.
Definition tdecompletionbox.cpp:421
TDECompletionBox::isTabHandling
bool isTabHandling() const
Definition tdecompletionbox.cpp:431
TDECompletionBox::items
TQStringList items() const
Returns a list of all items currently in the box.
Definition tdecompletionbox.cpp:85
TDECompletionBox::sizeAndPosition
void sizeAndPosition()
This properly sizes and positions the listbox.
Definition tdecompletionbox.cpp:268

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.15.0
This website is maintained by Timothy Pearson.