void inviwo::EventPropertyWidgetQt::generateWidget() { QHBoxLayout* hLayout = new QHBoxLayout(); setSpacingAndMargins(hLayout); label_ = new EditableLabelQt(this, eventproperty_); button_ = new IvwPushButton(this); connect(button_, SIGNAL(clicked()), this, SLOT(clickedSlot())); hLayout->addWidget(label_); { QWidget* widget = new QWidget(this); QSizePolicy sliderPol = widget->sizePolicy(); sliderPol.setHorizontalStretch(3); widget->setSizePolicy(sliderPol); QGridLayout* vLayout = new QGridLayout(); widget->setLayout(vLayout); vLayout->setContentsMargins(0, 0, 0, 0); vLayout->setSpacing(0); vLayout->addWidget(button_); hLayout->addWidget(widget); } setLayout(hLayout); setButtonText(); }
GAction::GAction(QWidget *parent,VM *pVM) : QAction(parent) { this->pVM = pVM; strcpy(this->cClickEvent,""); QObject::connect(this, SIGNAL(triggered()),this, SLOT(clickedSlot())); }
QToolButtonExt::QToolButtonExt(QWidget *parent, int ms ) : QToolButton( parent ), shortClick( false ), longClick( false ) { setAutoRepeat( true ); /* default to twice the doubleclick delay */ setAutoRepeatDelay( ( ms > 0 )? ms : 2 * QApplication::doubleClickInterval() ); setAutoRepeatInterval( 100 ); connect( this, SIGNAL(released()), this, SLOT(releasedSlot()) ); connect( this, SIGNAL(clicked()), this, SLOT(clickedSlot()) ); }
TdbCustomButton::TdbCustomButton(const QString& txt, int W, int H) : QPushButton(txt) { setWindowFlags(Qt::WindowTitleHint | Qt::WindowMinimizeButtonHint); setFixedSize(W, H); _bPressed = false; // QObject::connect(this, SIGNAL(clicked()), this, SLOT(clickedSlot())); }
GTreeView::GTreeView(QWidget *parent,VM *pVM) : QTreeView(parent) { this->pVM = pVM; this->pParaList = ring_list_new(0); strcpy(this->ccollapsedEvent,""); strcpy(this->cexpandedEvent,""); strcpy(this->cactivatedEvent,""); strcpy(this->cclickedEvent,""); strcpy(this->cdoubleClickedEvent,""); strcpy(this->centeredEvent,""); strcpy(this->cpressedEvent,""); strcpy(this->cviewportEnteredEvent,""); QObject::connect(this, SIGNAL(collapsed(QModelIndex)),this, SLOT(collapsedSlot())); QObject::connect(this, SIGNAL(expanded(QModelIndex)),this, SLOT(expandedSlot())); QObject::connect(this, SIGNAL(activated(QModelIndex)),this, SLOT(activatedSlot())); QObject::connect(this, SIGNAL(clicked(QModelIndex)),this, SLOT(clickedSlot())); QObject::connect(this, SIGNAL(doubleClicked(QModelIndex)),this, SLOT(doubleClickedSlot())); QObject::connect(this, SIGNAL(entered(QModelIndex)),this, SLOT(enteredSlot())); QObject::connect(this, SIGNAL(pressed(QModelIndex)),this, SLOT(pressedSlot())); QObject::connect(this, SIGNAL(viewportEntered()),this, SLOT(viewportEnteredSlot())); }