diff -r c6bb4fdcc55f -r 78ba80b54bc4 treeeditor.cpp --- a/treeeditor.cpp Sat Aug 08 21:58:26 2009 +0000 +++ b/treeeditor.cpp Tue Aug 18 12:39:07 2009 +0000 @@ -1,35 +1,47 @@ #include "treeeditor.h" #include +#include +#include + #include using namespace std; #include "vymmodel.h" +#include "mysortfilterproxymodel.h" + /////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// TreeEditor::TreeEditor(VymModel *m) { - //cout << "Constructor TreeEditor "<setSourceModel(model); + + proxyModel->setFilterRegExp(QRegExp("x", Qt::CaseInsensitive)); + proxyModel->setFilterKeyColumn(0); + proxyModel->setDynamicSortFilter (true); +// setModel(proxyModel); +*/ + setModel(model); + QAction *a; // Shortcuts for navigating with cursor: a = new QAction(tr( "Select upper object","Tree Editor" ), this); a->setStatusTip ( tr( "Select upper object" )); a->setShortcut (Qt::Key_Up ); -// a->setShortcutContext (Qt::WindowShortcut); a->setShortcutContext (Qt::WidgetShortcut); -// a->setShortcutContext (Qt::WidgetWithChildrenShortcut); addAction (a); connect( a, SIGNAL( triggered() ), this, SLOT( cursorUp() ) ); a = new QAction( tr( "Select lower object","Tree Editor" ),this); a->setStatusTip (tr( "Select lower object" )); a->setShortcut ( Qt::Key_Down ); -// a->setShortcutContext (Qt::WindowShortcut); -// a->setShortcutContext (Qt::WidgetWithChildrenShortcut); a->setShortcutContext (Qt::WidgetShortcut); addAction (a); connect( a, SIGNAL( triggered() ), this, SLOT( cursorDown() ) );