|
|
|
// This is the SIP interface definition for TQComboBox.
|
|
|
|
//
|
|
|
|
// Copyright (c) 2007
|
|
|
|
// Riverbank Computing Limited <info@riverbankcomputing.co.uk>
|
|
|
|
//
|
|
|
|
// This file is part of PyTQt.
|
|
|
|
//
|
|
|
|
// This copy of PyTQt is free software; you can redistribute it and/or modify it
|
|
|
|
// under the terms of the GNU General Public License as published by the Free
|
|
|
|
// Software Foundation; either version 2, or (at your option) any later
|
|
|
|
// version.
|
|
|
|
//
|
|
|
|
// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
|
|
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
|
|
// details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License along with
|
|
|
|
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
|
|
|
|
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
|
|
|
|
|
|
|
%ExportedDoc
|
|
|
|
<Sect2><Title>TQComboBox</Title>
|
|
|
|
<Para>
|
|
|
|
<Literal>TQComboBox</Literal> is fully implemented.
|
|
|
|
</Para>
|
|
|
|
</Sect2>
|
|
|
|
%End
|
|
|
|
|
|
|
|
|
|
|
|
class TQComboBox : TQWidget
|
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include <tqcombobox.h>
|
|
|
|
%End
|
|
|
|
|
|
|
|
public:
|
|
|
|
TQComboBox(TQWidget * /TransferThis/ = 0,char * = 0);
|
|
|
|
TQComboBox(bool,TQWidget * /TransferThis/ = 0,char * = 0);
|
|
|
|
|
|
|
|
int count() const;
|
|
|
|
|
|
|
|
%If (TQt_2_00 -)
|
|
|
|
void insertStringList(TQStringList &,int = -1);
|
|
|
|
%End
|
|
|
|
void insertStrList(const TQStrList *,int = -1);
|
|
|
|
// void insertStrList(const TQStrList &,int = -1);
|
|
|
|
// void insertStrList(const char **,int = -1,int = -1);
|
|
|
|
|
|
|
|
%If (- TQt_2_00)
|
|
|
|
void insertItem(const char *,int = -1);
|
|
|
|
%End
|
|
|
|
%If (TQt_2_00 -)
|
|
|
|
void insertItem(const TQString &,int = -1);
|
|
|
|
%End
|
|
|
|
void insertItem(const TQPixmap &,int = -1);
|
|
|
|
%If (TQt_2_1_0 -)
|
|
|
|
void insertItem(const TQPixmap &,const TQString &,int = -1);
|
|
|
|
%End
|
|
|
|
|
|
|
|
void removeItem(int);
|
|
|
|
|
|
|
|
%If (- TQt_3_0_0)
|
|
|
|
void clear();
|
|
|
|
%End
|
|
|
|
|
|
|
|
int currentItem() const;
|
|
|
|
%If (- TQt_2_00)
|
|
|
|
void setCurrentItem(int);
|
|
|
|
%End
|
|
|
|
%If (TQt_2_00 -)
|
|
|
|
virtual void setCurrentItem(int);
|
|
|
|
%End
|
|
|
|
|
|
|
|
%If (- TQt_2_00)
|
|
|
|
const char *currentText() const;
|
|
|
|
%End
|
|
|
|
%If (TQt_2_00 -)
|
|
|
|
TQString currentText() const;
|
|
|
|
%End
|
|
|
|
%If (TQt_3_0_0 -)
|
|
|
|
virtual void setCurrentText(const TQString &);
|
|
|
|
%End
|
|
|
|
|
|
|
|
%If (- TQt_2_00)
|
|
|
|
const char *text(int) const;
|
|
|
|
%End
|
|
|
|
%If (TQt_2_00 -)
|
|
|
|
TQString text(int) const;
|
|
|
|
%End
|
|
|
|
const TQPixmap *pixmap(int) const;
|
|
|
|
|
|
|
|
%If (- TQt_2_00)
|
|
|
|
void changeItem(const char *,int);
|
|
|
|
%End
|
|
|
|
%If (TQt_2_00 -)
|
|
|
|
void changeItem(const TQString &,int);
|
|
|
|
%End
|
|
|
|
void changeItem(const TQPixmap &,int);
|
|
|
|
%If (TQt_2_1_0 -)
|
|
|
|
void changeItem(const TQPixmap &,const TQString &,int);
|
|
|
|
%End
|
|
|
|
|
|
|
|
bool autoResize() const;
|
|
|
|
%If (- TQt_2_00)
|
|
|
|
void setAutoResize(bool);
|
|
|
|
%End
|
|
|
|
%If (TQt_2_00 -)
|
|
|
|
virtual void setAutoResize(bool);
|
|
|
|
%End
|
|
|
|
TQSize sizeHint() const;
|
|
|
|
%If (TQt_2_00 - TQt_3_0_0)
|
|
|
|
virtual TQSizePolicy sizePolicy() const;
|
|
|
|
%End
|
|
|
|
|
|
|
|
%If (- TQt_2_00)
|
|
|
|
void setBackgroundColor(const TQColor &);
|
|
|
|
void setStyle(GUIStyle);
|
|
|
|
%End
|
|
|
|
%If (TQt_2_00 - TQt_3_0_0)
|
|
|
|
virtual void setBackgroundColor(const TQColor &);
|
|
|
|
%End
|
|
|
|
%If (- TQt_2_00)
|
|
|
|
void setPalette(const TQPalette &);
|
|
|
|
void setFont(const TQFont &);
|
|
|
|
void setEnabled(bool);
|
|
|
|
%End
|
|
|
|
%If (TQt_2_00 - TQt_3_0_0)
|
|
|
|
virtual void setPalette(const TQPalette &);
|
|
|
|
virtual void setFont(const TQFont &);
|
|
|
|
virtual void setEnabled(bool);
|
|
|
|
%End
|
|
|
|
%If (TQt_3_0_0 -)
|
|
|
|
void setPalette(const TQPalette &);
|
|
|
|
void setFont(const TQFont &);
|
|
|
|
void setEnabled(bool);
|
|
|
|
%End
|
|
|
|
|
|
|
|
%If (- TQt_2_00)
|
|
|
|
void setSizeLimit(int);
|
|
|
|
%End
|
|
|
|
%If (TQt_2_00 -)
|
|
|
|
virtual void setSizeLimit(int);
|
|
|
|
%End
|
|
|
|
int sizeLimit() const;
|
|
|
|
|
|
|
|
%If (- TQt_2_00)
|
|
|
|
void setMaxCount(int);
|
|
|
|
%End
|
|
|
|
%If (TQt_2_00 -)
|
|
|
|
virtual void setMaxCount(int);
|
|
|
|
%End
|
|
|
|
int maxCount() const;
|
|
|
|
|
|
|
|
enum Policy {
|
|
|
|
NoInsertion,
|
|
|
|
AtTop,
|
|
|
|
AtCurrent,
|
|
|
|
AtBottom,
|
|
|
|
AfterCurrent,
|
|
|
|
BeforeCurrent
|
|
|
|
};
|
|
|
|
|
|
|
|
%If (- TQt_2_00)
|
|
|
|
void setInsertionPolicy(Policy);
|
|
|
|
%End
|
|
|
|
%If (TQt_2_00 -)
|
|
|
|
virtual void setInsertionPolicy(Policy);
|
|
|
|
%End
|
|
|
|
Policy insertionPolicy() const;
|
|
|
|
|
|
|
|
%If (- TQt_2_00)
|
|
|
|
void setValidator(TQValidator *);
|
|
|
|
TQValidator *validator() const;
|
|
|
|
%End
|
|
|
|
%If (TQt_2_00 -)
|
|
|
|
virtual void setValidator(const TQValidator *);
|
|
|
|
const TQValidator *validator() const;
|
|
|
|
%End
|
|
|
|
|
|
|
|
%If (- TQt_2_00)
|
|
|
|
void setListBox(TQListBox *);
|
|
|
|
%End
|
|
|
|
%If (TQt_2_00 -)
|
|
|
|
virtual void setListBox(TQListBox *);
|
|
|
|
%End
|
|
|
|
TQListBox *listBox() const;
|
|
|
|
|
|
|
|
%If (TQt_3_0_0 -)
|
|
|
|
virtual void setLineEdit(TQLineEdit *);
|
|
|
|
%End
|
|
|
|
%If (TQt_2_1_0 -)
|
|
|
|
TQLineEdit *lineEdit() const;
|
|
|
|
%End
|
|
|
|
|
|
|
|
%If (- TQt_2_00)
|
|
|
|
void setAutoCompletion(bool);
|
|
|
|
%End
|
|
|
|
%If (TQt_2_00 -)
|
|
|
|
virtual void setAutoCompletion(bool);
|
|
|
|
%End
|
|
|
|
bool autoCompletion() const;
|
|
|
|
|
|
|
|
bool eventFilter(TQObject *,TQEvent *);
|
|
|
|
|
|
|
|
%If (TQt_2_1_0 -)
|
|
|
|
void setDuplicatesEnabled(bool);
|
|
|
|
bool duplicatesEnabled() const;
|
|
|
|
%End
|
|
|
|
|
|
|
|
%If (TQt_2_2_0 -)
|
|
|
|
bool editable() const;
|
|
|
|
void setEditable(bool);
|
|
|
|
%End
|
|
|
|
|
|
|
|
%If (TQt_3_0_0 -)
|
|
|
|
virtual void popup();
|
|
|
|
%End
|
|
|
|
|
|
|
|
%If (TQt_3_3_0 -)
|
|
|
|
void hide();
|
|
|
|
%End
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
%If (TQt_3_0_0 -)
|
|
|
|
void clear();
|
|
|
|
%End
|
|
|
|
void clearValidator();
|
|
|
|
void clearEdit();
|
|
|
|
%If (- TQt_2_00)
|
|
|
|
void setEditText(const char *);
|
|
|
|
%End
|
|
|
|
%If (TQt_2_00 -)
|
|
|
|
virtual void setEditText(const TQString &);
|
|
|
|
%End
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void activated(int);
|
|
|
|
void highlighted(int);
|
|
|
|
%If (- TQt_2_00)
|
|
|
|
void activated(const char *);
|
|
|
|
void highlighted(const char *);
|
|
|
|
%End
|
|
|
|
%If (TQt_2_00 -)
|
|
|
|
void activated(const TQString &);
|
|
|
|
void highlighted(const TQString &);
|
|
|
|
void textChanged(const TQString &);
|
|
|
|
%End
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void paintEvent(TQPaintEvent *);
|
|
|
|
void resizeEvent(TQResizeEvent *);
|
|
|
|
void mousePressEvent(TQMouseEvent *);
|
|
|
|
void mouseMoveEvent(TQMouseEvent *);
|
|
|
|
void mouseReleaseEvent(TQMouseEvent *);
|
|
|
|
void mouseDoubleClickEvent(TQMouseEvent *);
|
|
|
|
void keyPressEvent(TQKeyEvent *);
|
|
|
|
void focusInEvent(TQFocusEvent *);
|
|
|
|
%If (TQt_3_1_1 -)
|
|
|
|
void focusOutEvent(TQFocusEvent *);
|
|
|
|
%End
|
|
|
|
%If (TQt_3_1_0 -)
|
|
|
|
void wheelEvent(TQWheelEvent *);
|
|
|
|
%End
|
|
|
|
%If (- TQt_3_0_0)
|
|
|
|
void popup();
|
|
|
|
%End
|
|
|
|
%If (TQt_2_00 -)
|
|
|
|
void styleChange(TQStyle &);
|
|
|
|
|
|
|
|
void updateMask();
|
|
|
|
%End
|
|
|
|
|
|
|
|
private:
|
|
|
|
TQComboBox(const TQComboBox &);
|
|
|
|
};
|