2 * Copyright 2008 Aaron Seigo <aseigo@kde.org>
3 * Copyright 2008 Marco Martin <notmart@gmail.com>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Library General Public License as
7 * published by the Free Software Foundation; either version 2, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details
15 * You should have received a copy of the GNU Library General Public
16 * License along with this program; if not, write to the
17 * Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 #ifndef PLASMA_HISTORYCOMBOBOX_H
23 #define PLASMA_HISTORYCOMBOBOX_H
25 #include <QtGui/QGraphicsProxyWidget>
28 class KHistoryComboBox
;
35 class HistoryComboBox
: public QGraphicsProxyWidget
39 Q_PROPERTY(QGraphicsWidget
* parentWidget READ parentWidget
)
40 Q_PROPERTY(QString stylesheet READ stylesheet WRITE setStylesheet
)
41 Q_PROPERTY(KHistoryComboBox
* nativeWidget READ nativeWidget
)
44 explicit HistoryComboBox(QGraphicsWidget
*parent
= 0);
48 * Sets the style sheet used to control the visual display of this TextEdit
50 * @arg stylehseet a CSS string
52 void setStylesheet(const QString
&stylesheet
);
55 * @return the stylesheet currently used with this widget
60 * @return the native widget wrapped by this TextEdit
62 KHistoryComboBox
* nativeWidget() const;
64 QStringList
historyItems() const;
65 bool removeFromHistory(const QString
&item
);
67 void setHistoryItems(const QStringList
&items
);
68 QString
currentText() const;
69 void insertUrl(int index
, const KUrl
&url
);
70 void setDuplicatesEnabled(bool enabled
);
73 void addToHistory(const QString
&item
);
77 void activated(int index
);
78 void returnPressed(const QString
&);
79 void textChanged(const QString
&);
83 void resizeEvent(QGraphicsSceneResizeEvent
*event
);
92 #endif // multiple inclusion guard