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
|
//
// Copyright 2008 Jim Bublitz <jbublitz@nwinternet.com>
// Earlier copyrights 1998 - 2007 Jim Bublitz also apply
// Generated by twine
// This file is part of PyKDE4.
// PyKDE4 is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of
// the License, or (at your option) any later version.
// PyKDE4 is distributed 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 this program. If not, see <http://www.gnu.org/licenses/>.
class KEditListBox : QGroupBox
{
%TypeHeaderCode
#include <keditlistbox.h>
%End
public:
class CustomEditor
{
public:
CustomEditor ();
CustomEditor (QWidget* repWidget, KLineEdit* edit);
CustomEditor (KComboBox* combo);
void setRepresentationWidget (QWidget* repWidget);
void setLineEdit (KLineEdit* edit);
virtual QWidget* representationWidget () const;
virtual KLineEdit* lineEdit () const;
private:
//force
CustomEditor (const KEditListBox::CustomEditor&);
//end
public:
~CustomEditor ();
};
// CustomEditor
enum Button
{
Add,
Remove,
UpDown,
All
};
typedef QFlags<KEditListBox::Button> Buttons;
explicit KEditListBox (QWidget* parent /TransferThis/ = 0);
explicit KEditListBox (const QString& title, QWidget* parent /TransferThis/ = 0);
explicit KEditListBox (QWidget* parent /TransferThis/, const char* name, bool checkAtEntering = 0, KEditListBox::Buttons buttons = KEditListBox::All);
explicit KEditListBox (const QString& title, QWidget* parent /TransferThis/, const char* name, bool checkAtEntering = 0, KEditListBox::Buttons buttons = KEditListBox::All);
KEditListBox (const QString& title, const KEditListBox::CustomEditor& customEditor, QWidget* parent /TransferThis/ = 0, const char* name = 0, bool checkAtEntering = 0, KEditListBox::Buttons buttons = KEditListBox::All);
QListView* listView () const;
KLineEdit* lineEdit () const;
QPushButton* addButton () const;
QPushButton* removeButton () const;
QPushButton* upButton () const;
QPushButton* downButton () const;
int count () const;
void insertStringList (const QStringList& list, int index = -1);
void insertItem (const QString& text, int index = -1);
void clear ();
QString text (int index) const;
int currentItem () const;
QString currentText () const;
QStringList items () const;
void setItems (const QStringList& items);
KEditListBox::Buttons buttons () const;
void setButtons (KEditListBox::Buttons buttons);
void setCheckAtEntering (bool check);
bool checkAtEntering ();
void setCustomEditor (const KEditListBox::CustomEditor& editor);
bool eventFilter (QObject* o, QEvent* e);
signals:
void changed ();
void added (const QString& text);
void removed (const QString& text);
protected:
void moveItemUp ();
void moveItemDown ();
void addItem ();
void removeItem ();
void enableMoveButtons (const QModelIndex&, const QModelIndex&);
void typedSomething (const QString& text);
private:
//force
KEditListBox (const KEditListBox&);
//end
public:
~KEditListBox ();
};
// KEditListBox
|