StreamDialog::StreamDialog(QWidget *parent, QStringList directory, QStringList currentStreams) : QDialog(parent, Qt::WindowCloseButtonHint | Qt::WindowTitleHint) { m_currentStreams = currentStreams; parseAvailableServices(directory); layoutWindow(); connect(m_addButton, SIGNAL(clicked()), this, SLOT(onAddStreams())); connect(m_removeButton, SIGNAL(clicked()), this, SLOT(onRemoveStreams())); connect(m_okButton, SIGNAL(clicked()), this, SLOT(accept())); connect(m_cancelButton, SIGNAL(clicked()), this, SLOT(reject())); connect(m_upButton, SIGNAL(clicked()), this, SLOT(onMoveUp())); connect(m_downButton, SIGNAL(clicked()), this, SLOT(onMoveDown())); connect(m_currentList, SIGNAL(itemSelectionChanged()), this, SLOT(onCurrentStreamsSelectionChanged())); m_upButton->setEnabled(false); m_downButton->setEnabled(false); setWindowTitle("Video Stream Selection"); }
medDatabasePreview::medDatabasePreview(QWidget *parent) : QFrame(parent), d(new medDatabasePreviewPrivate) { d->animationDuration = 500; d->level = 0; d->scene = new medDatabasePreviewScene(this); d->view = new medDatabasePreviewView(this); d->view->setScene(d->scene); d->selector = new medDatabasePreviewSelector; d->selector->setRect(QRectF(5, 5, 138, 138)); d->scene->addItem(d->selector); d->seriesGroup = new medDatabasePreviewItemGroup; d->imageGroup = new medDatabasePreviewItemGroup; d->scene->addGroup(d->imageGroup); d->scene->addGroup(d->seriesGroup); d->seriesAnimation = NULL; d->imageAnimation = NULL; d->animation = NULL; d->imageGroupStartPos = d->imageGroup->pos(); d->seriesGroupStartPos = d->seriesGroup->pos(); d->selectorPositionAnimation = NULL; d->selectorRectAnimation = NULL; d->selectorAnimation = NULL; connect(d->view, SIGNAL(moveUp()), this, SLOT(onMoveUp())); connect(d->view, SIGNAL(moveDw()), this, SLOT(onMoveDw())); connect(d->view, SIGNAL(moveLt()), this, SLOT(onMoveLt())); connect(d->view, SIGNAL(moveRt()), this, SLOT(onMoveRt())); connect(d->view, SIGNAL(hovered(medDatabasePreviewItem*)), this, SLOT(onHovered(medDatabasePreviewItem*))); QVBoxLayout *layout = new QVBoxLayout(this); layout->setContentsMargins(10, 0, 10, 10); layout->setSpacing(0); layout->addWidget(d->view); medDatabasePreviewController::instance()->orientation() == Qt::Horizontal ? this->setFixedHeight(medDatabasePreviewController::instance()->groupHeight() + medDatabasePreviewController::instance()->itemSpacing() + 36) // 26 pixels for the scroller : this->setFixedWidth(medDatabasePreviewController::instance()->groupWidth() + medDatabasePreviewController::instance()->itemSpacing() + 36); // 26 pixels for the scroller this->init(); }
/** * \brief Emet le signal que le bouton move up à été clické */ void DocumentEditorRow::moveUp() { emit onMoveUp(this); }