void GalleryTreeView::slotCheckSelection(const QModelIndex &selected)
{
  clearFocus();
  if (selected.isValid()) {
    emit signalSelected(true);
  } else
    emit signalSelected(false);
}
void GalleryTreeView::slotCheckSelection(const QModelIndex &selected)
{
  clearFocus();
  collapseAll();

  if (selected.isValid()) {
    emit signalSelected(true);

    // Expand the whole tree up
    for (QModelIndex count = selected; count.isValid(); count = count.parent())
      expand(count);
  } else {
    emit signalSelected(false);
  }
}
Ejemplo n.º 3
0
PlotWidget::PlotWidget ()
{
  g_symbol = new Bars;
  
  QVBoxLayout *vbox = new QVBoxLayout;
  vbox->setSpacing(0);
  vbox->setMargin(0);
  setLayout(vbox);
  
  // chart splitter
  _csplitter = new QSplitter(Qt::Vertical, 0);
  _csplitter->setOpaqueResize(FALSE);
  vbox->addWidget(_csplitter);
  
  _cw = new ControlWidget;
  connect(_cw, SIGNAL(signalSelected()), this, SLOT(refresh()));
  connect(_cw, SIGNAL(signalRefresh()), this, SLOT(refresh()));
  connect(_cw, SIGNAL(signalIndicator()), this, SLOT(indicatorDialog()));
  connect(_cw, SIGNAL(signalLength()), this, SLOT(setBarLength()));
  connect(_cw, SIGNAL(signalRange()), this, SLOT(refresh()));
  connect(_cw, SIGNAL(signalScrollBarChanged(int)), this, SLOT(scrollBarChanged(int)));
  connect(_cw, SIGNAL(signalRemovePlot()), this, SLOT(removeIndicator()));
  connect(_cw, SIGNAL(signalEditPlot()), this, SLOT(editIndicator()));
  vbox->addWidget(_cw);
  
  // fix for messed up plot screen if we draw the plot before it has become visible
  // we load settings just after plot is visible with this delay
  QTimer::singleShot(10, this, SLOT(loadSettings()));
}
Ejemplo n.º 4
0
void Canvas::cancelAddItem()
{
    if (d->wrapItem)
    {
        this->scene()->removeItem(d->wrapItem);
        d->wrapItem->deleteLater();
        d->wrapItem = 0;
    }

    emit signalSelected(true);
}
Ejemplo n.º 5
0
void Canvas::reset()
{
    if (d->rubber && d->rubber->isVisible())
    {
        d->rubber->setVisible(false);

        if (d->core->isValid())
        {
            emit signalSelected(false);
        }
    }

    addRubber();
    d->errorMessage.clear();
}
Ejemplo n.º 6
0
void Canvas::slotSelectAll()
{
    if (d->rubber)
    {
        delete d->rubber;
    }

    d->rubber = new RubberItem(d->canvasItem);
    d->rubber->setCanvas(this);
    d->rubber->setRectInSceneCoordinatesAdjusted(d->canvasItem->boundingRect());
    viewport()->setMouseTracking(true);
    viewport()->update();

    if (d->core->isValid())
    {
        emit signalSelected(true);
    }
}
Ejemplo n.º 7
0
void Canvas::slotAutoCrop()
{
    QApplication::setOverrideCursor(Qt::WaitCursor);

    d->canvasItem->clearCache();
    AutoCrop ac(d->core->getImg());
    ac.startFilterDirectly();
    QRect rect = ac.autoInnerCrop();
    d->core->crop(rect);
    QApplication::restoreOverrideCursor();

    if (d->rubber && d->rubber->isVisible())
    {
        d->rubber->setVisible(false);
    }

    emit signalSelected(false);
    addRubber();
}
Ejemplo n.º 8
0
void Canvas::slotCrop()
{
    d->canvasItem->clearCache();
    QRect sel = d->core->getSelectedArea();

    if (sel.size().isNull())   // No current selection.
    {
        return;
    }

    d->core->crop(sel);

    if (d->rubber && d->rubber->isVisible())
    {
        d->rubber->setVisible(false);
    }

    emit signalSelected(false);
    addRubber();
}
Ejemplo n.º 9
0
void Canvas::mousePressEvent(QMouseEvent* event)
{
    GraphicsDImgView::mousePressEvent(event);
    if (event->button() == Qt::LeftButton)
    {
        GraphicsDImgItem* const item = dynamic_cast<GraphicsDImgItem*>(itemAt(event->pos()));

        if (item)
        {
            QString className(item->metaObject()->className());

            if (!(className == "Digikam::RubberItem" || className == "Digikam::ClickDragReleaseItem"))
            {
                if (d->rubber && d->rubber->isVisible())
                {
                    d->rubber->setVisible(false);
                }

                emit signalSelected(false);
                addRubber();
            }
        }
    }
}
void lsStringListWidget::slotSelected()
{
	emit signalSelected( this->selectedText() );
}
Ejemplo n.º 11
0
void AddSignalHandlerDialog::handleAccepted()
{
    m_signal = m_ui->comboBox->currentText();
    emit signalSelected();
}