ALT Linux Bugzilla
– Attachment 1420 Details for
Bug 9204
problems with selectionchange signal
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
patch from Myltcev Alexey
alterator-browser-qt-2.6-avm-selection.patch (text/plain), 1.84 KB, created by
Kachalov Anton
on 2006-03-08 20:05:42 MSK
(
hide
)
Description:
patch from Myltcev Alexey
Filename:
MIME Type:
Creator:
Kachalov Anton
Created:
2006-03-08 20:05:42 MSK
Size:
1.84 KB
patch
obsolete
>diff -aur alterator-browser-qt-2.6/widgets.cc alterator-browser-qt-2.6.avm/widgets.cc >--- alterator-browser-qt-2.6/widgets.cc 2006-02-22 18:49:23 +0300 >+++ alterator-browser-qt-2.6.avm/widgets.cc 2006-03-08 19:17:54 +0300 >@@ -293,12 +293,20 @@ > void alListBox::registerEvent(const QString& name) > { > if ("on-select" == name) >- connect(wnd_,SIGNAL( itemSelectionChanged() ),SLOT(onSelect())); >+ connect(wnd_,SIGNAL( currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*) ), >+ SLOT( onSelection(QTreeWidgetItem*,QTreeWidgetItem*) )); >+} >+ >+void alListBox::onSelection(QTreeWidgetItem* current, QTreeWidgetItem*) >+{ >+ int newIndex = wnd_->indexOfTopLevelItem(current); >+ currentIndex = newIndex; >+ emitEvent(id_,"on-select"); > } > > QString alListBox::postData() const > { >- return QString(" (current . ") + QString::number(wnd_->indexOfTopLevelItem(wnd_->currentItem())) +" )"; >+ return QString(" (current . ") + QString::number(currentIndex) +" )"; > } > > void alComboBox::setAttr(const QString& name,const QString& value) >diff -aur alterator-browser-qt-2.6/widgets.hh alterator-browser-qt-2.6.avm/widgets.hh >--- alterator-browser-qt-2.6/widgets.hh 2006-02-22 18:34:11 +0300 >+++ alterator-browser-qt-2.6.avm/widgets.hh 2006-03-08 19:13:50 +0300 >@@ -211,9 +211,11 @@ > > class alListBox: public alWidgetPre<QTreeWidget2> > { >+ Q_OBJECT >+ int currentIndex; > public: > alListBox(const QString& id,const QString& parent): >- alWidgetPre<QTreeWidget2>(id,parent) >+ alWidgetPre<QTreeWidget2>(id,parent), currentIndex(0) > { > wnd_->setAlternatingRowColors(true); > //setings to be compatible with QListView >@@ -225,6 +227,8 @@ > void setAttr(const QString& name,const QString& value); > void registerEvent(const QString&); > QString postData() const ; >+public slots: >+ void onSelection(QTreeWidgetItem* current, QTreeWidgetItem*); > }; > > class alComboBox: public alWidgetPre<QComboBox>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 9204
: 1420