Exemplo n.º 1
0
void playlistItemText::on_selectColorButton_clicked()
{
  QColor newColor = QColorDialog::getColor(color, NULL, tr("Select font color"), QColorDialog::ShowAlphaChannel);
  color = newColor;

  emit signalItemChanged(true, false);
}
Exemplo n.º 2
0
void playlistItemText::on_selectFontButton_clicked()
{
  bool ok;
  QFont newFont = QFontDialog::getFont(&ok, font, NULL);
  if (ok)
    font = newFont;

  emit signalItemChanged(true, false);
}
Exemplo n.º 3
0
MediaPlayer2Player::MediaPlayer2Player(QObject* parent)
    : QDBusAbstractAdaptor(parent)
    , m_player(JuK::JuKInstance()->playerManager())
{
    connect(m_player, SIGNAL(signalItemChanged(FileHandle)), this, SLOT(currentSourceChanged()));
    connect(m_player, SIGNAL(signalPause()), this, SLOT(stateUpdated()));
    connect(m_player, SIGNAL(signalStop()), this, SLOT(stateUpdated()));
    connect(m_player, SIGNAL(totalTimeChanged(int)), this, SLOT(totalTimeChanged()));
    connect(m_player, SIGNAL(seekableChanged(bool)), this, SLOT(seekableChanged(bool)));
    connect(m_player, SIGNAL(volumeChanged(float)), this, SLOT(volumeChanged(float)));
    connect(m_player, SIGNAL(seeked(int)), this, SLOT(seeked(int)));
}
Exemplo n.º 4
0
void playlistItemIndexed::slotVideoControlChanged()
{
  // Was this the start or end spin box?
  QObject *sender = QObject::sender();
  if (sender == ui.startSpinBox || sender == ui.endSpinBox)
    // The user changed the start end frame
    startEndFrameChanged = true;

  // Get the currently set values from the controls
  startEndFrame.first  = ui.startSpinBox->value();
  startEndFrame.second = ui.endSpinBox->value();
  frameRate = ui.rateSpinBox->value();
  sampling  = ui.samplingSpinBox->value();

  // The current frame in the buffer is not invalid, but emit that something has changed.
  emit signalItemChanged(false, false);
}
Exemplo n.º 5
0
void playlistItemText::on_textEdit_textChanged()
{
  QString t = ui.textEdit->toPlainText();
  text = t;

  // Only show the first 50 characters
  if (t.length() > 50)
  {
    t.truncate(50);
    t.append("...");
  }

  // If there is a newline only show the first line of the text
  int newlinePos = t.indexOf(QRegExp("[\n\t\r]"));
  if (newlinePos != -1)
  {
    t.truncate(newlinePos);
    t.append("...");
  }

  setText(0, QString("Text: \"%1\"").arg(t) );

  emit signalItemChanged(true, false);
}