mirror of
https://bitbucket.org/smil3y/kde-playground.git
synced 2025-02-24 10:52:52 +00:00
79 lines
3.4 KiB
Text
79 lines
3.4 KiB
Text
//
|
|
// 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 KComboBox : QComboBox, KCompletionBase
|
|
{
|
|
%TypeHeaderCode
|
|
#include <kcombobox.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
explicit KComboBox (QWidget* parent /TransferThis/ = 0);
|
|
explicit KComboBox (bool rw, QWidget* parent /TransferThis/ = 0);
|
|
void setEditUrl (const KUrl& url);
|
|
void addUrl (const KUrl& url);
|
|
void addUrl (const QIcon& icon, const KUrl& url);
|
|
void insertUrl (int index, const KUrl& url);
|
|
void insertUrl (int index, const QIcon& icon, const KUrl& url);
|
|
void changeUrl (int index, const KUrl& url);
|
|
void changeUrl (int index, const QIcon& icon, const KUrl& url);
|
|
int cursorPosition () const;
|
|
virtual void setAutoCompletion (bool autocomplete);
|
|
bool autoCompletion () const;
|
|
void setUrlDropsEnabled (bool enable);
|
|
bool urlDropsEnabled () const;
|
|
bool contains (const QString& text) const;
|
|
void setTrapReturnKey (bool trap);
|
|
bool trapReturnKey () const;
|
|
virtual bool eventFilter (QObject*, QEvent*);
|
|
KCompletionBox* completionBox (bool create = 1);
|
|
virtual void setLineEdit (QLineEdit*);
|
|
void setEditable (bool editable);
|
|
|
|
signals:
|
|
void returnPressed ();
|
|
void returnPressed (const QString&);
|
|
void completion (const QString&);
|
|
void substringCompletion (const QString&);
|
|
void textRotation (KCompletionBase::KeyBindingType);
|
|
void completionModeChanged (KGlobalSettings::Completion);
|
|
void aboutToShowContextMenu (QMenu* p);
|
|
|
|
public:
|
|
void rotateText (KCompletionBase::KeyBindingType type);
|
|
virtual void setCompletedText (const QString&);
|
|
void setCompletedItems (const QStringList& items, bool autosubject = 1);
|
|
void setCurrentItem (const QString& item, bool insert = 0, int index = -1);
|
|
|
|
protected:
|
|
virtual void makeCompletion (const QString&);
|
|
virtual void setCompletedText (const QString&, bool);
|
|
virtual void create (WId = 0, bool initializeWindow = 1, bool destroyOldWindow = 1);
|
|
virtual void wheelEvent (QWheelEvent* ev);
|
|
virtual QSize minimumSizeHint () const;
|
|
public:
|
|
~KComboBox ();
|
|
};
|
|
// KComboBox
|
|
|
|
|