[Kst] branches/work/kst/kst1kde4/kst/src/widgets
Andrew Walker
arwalker at sumusltd.com
Thu Mar 11 21:36:51 CET 2010
SVN commit 1102102 by arwalker:
continue kst1kde4
M +2 -0 CMakeLists.txt
M +10 -7 editmultiplewidget.cpp
M +2 -5 editmultiplewidget.ui
A stringeditor.cpp [License: GPL (v2+)]
A stringeditor.h [License: GPL (v2+)]
A stringselector.cpp [License: GPL (v2+)]
A stringselector.h [License: GPL (v2+)]
D stringselector.ui.h
--- branches/work/kst/kst1kde4/kst/src/widgets/CMakeLists.txt #1102101:1102102
@@ -11,6 +11,8 @@
plotlistbox.cpp
scalareditor.cpp
scalarselector.cpp
+ stringeditor.cpp
+ stringselector.cpp
vectorlistview.cpp
kstcombobox.cpp)
--- branches/work/kst/kst1kde4/kst/src/widgets/editmultiplewidget.cpp #1102101:1102102
@@ -10,10 +10,12 @@
***************************************************************************/
#include <QRegExp>
+
#include "editmultiplewidget.h"
EditMultipleWidget::EditMultipleWidget(QWidget *parent) : QWidget(parent) {
setupUi(this);
+ _objectList->setSelectionMode(QAbstractItemView::ExtendedSelection);
}
EditMultipleWidget::~EditMultipleWidget( ) {
@@ -21,22 +23,23 @@
void EditMultipleWidget::selectAllObjects()
{
- _objectList->clearSelection();
- _objectList->invertSelection();
+ _objectList->selectAll();
}
void EditMultipleWidget::applyFilter(const QString& filter)
{
+ QListWidgetItem *item;
QRegExp re(filter, Qt::CaseInsensitive, QRegExp::Wildcard);
- uint c;
+ uint count;
uint i;
_objectList->clearSelection();
- c = _objectList->count();
- for (i = 0; i < c; ++i) {
- if (re.exactMatch(_objectList->text(i))) {
- _objectList->setSelected(i, true);
+ count = _objectList->count();
+ for (i = 0; i < count; ++i) {
+ item = _objectList->item(i);
+ if (re.exactMatch(item->text())) {
+ item->setSelected(true);
}
}
}
--- branches/work/kst/kst1kde4/kst/src/widgets/editmultiplewidget.ui #1102101:1102102
@@ -18,16 +18,13 @@
</property>
<layout class="QGridLayout">
<item row="0" column="0">
- <widget class="Q3GroupBox" name="groupBox6">
+ <widget class="QGroupBox" name="groupBox6">
<property name="title">
<string>Select Objects</string>
</property>
<layout class="QGridLayout">
<item row="1" column="0" rowspan="1" colspan="2">
- <widget class="Q3ListBox" name="_objectList">
- <property name="selectionMode">
- <enum>Q3ListBox::Extended</enum>
- </property>
+ <widget class="QListWidget" name="_objectList">
<item>
<property name="text">
<string>New Item</string>
More information about the Kst
mailing list