1 // Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
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 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // Author: Sergey TELKOV
30 #pragma warning( disable:4251 )
36 class QTX_EXPORT QtxListBox : public QListBox
41 QtxListBox( QWidget* = 0, const char* = 0, WFlags = 0 );
42 virtual ~QtxListBox();
44 bool isEditEnabled() const;
45 bool defaultEditAction() const;
46 bool isModificationEnabled() const;
48 QListBoxItem* editedItem() const;
49 int editedIndex() const;
51 void startEdition( const int );
52 void startEdition( const QListBoxItem* );
53 void endEdition( const bool );
55 void ensureItemVisible( const int );
56 void ensureItemVisible( const QListBoxItem* );
58 virtual bool eventFilter( QObject*, QEvent* );
60 const QValidator* validator() const;
62 void moveItemToTop( const int );
63 void moveItemToBottom( const int );
64 void moveItem( const int, const int );
66 void createItem( const int = -1 );
67 void deleteItem( const int = -1 );
70 void itemEdited( int );
71 void itemEdited( QListBoxItem* );
72 void itemMoved( int, int );
75 virtual void setEditEnabled( bool );
76 virtual void setDefaultEditAction( bool );
77 virtual void setModificationEnabled( bool );
79 virtual void clearValidator();
80 virtual void setValidator( const QValidator* );
81 virtual void setContentsPos( int, int );
84 void onContentsMoving( int, int );
87 virtual void keyPressEvent( QKeyEvent* );
88 virtual void viewportResizeEvent( QResizeEvent* );
89 virtual void mouseDoubleClickEvent( QMouseEvent* );
92 QLineEdit* editor() const;
105 #pragma warning( default:4251 )