Feathercoin  0.5.0
P2P Digital Currency
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
coincontroltreewidget.cpp
Go to the documentation of this file.
2 #include "coincontroldialog.h"
3 
5  QTreeWidget(parent)
6 {
7 
8 }
9 
11 {
12  if (event->key() == Qt::Key_Space) // press spacebar -> select checkbox
13  {
14  event->ignore();
15  int COLUMN_CHECKBOX = 0;
16  this->currentItem()->setCheckState(COLUMN_CHECKBOX, ((this->currentItem()->checkState(COLUMN_CHECKBOX) == Qt::Checked) ? Qt::Unchecked : Qt::Checked));
17  }
18  else if (event->key() == Qt::Key_Escape) // press esc -> close dialog
19  {
20  event->ignore();
21  CoinControlDialog *coinControlDialog = (CoinControlDialog*)this->parentWidget();
22  coinControlDialog->done(QDialog::Accepted);
23  }
24  else
25  {
26  this->QTreeWidget::keyPressEvent(event);
27  }
28 }
virtual void keyPressEvent(QKeyEvent *event)
CoinControlTreeWidget(QWidget *parent=0)