diff -r 382a444f5b0c -r a6931cd6309a treeeditor.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/treeeditor.cpp Fri May 15 15:22:15 2009 +0000 @@ -0,0 +1,52 @@ +#include "treeeditor.h" + +#include +#include +using namespace std; + +#include "vymmodel.h" + +/////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////// +TreeEditor::TreeEditor(VymModel *m) +{ + //cout << "Constructor TreeEditor "<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() ) ); +} + +TreeEditor::~TreeEditor() +{ + //cout <<"Destructor TreeEditor for "<getMapName().toStdString()<select (indexAbove (model->getSelectedIndex() )); +} + +void TreeEditor::cursorDown() +{ + model->select (indexBelow (model->getSelectedIndex() )); +} +