示例#1
0
//*******************************************************************
// full_desc                                            PRIVATE slot
//*******************************************************************
void QBtConfigButtons::full_desc( const bool in_state )
{
   if( in_state ) {
      mode_ = QBtButtonSpace::FULL_DESC;
      update_example();
   }
}
示例#2
0
//*******************************************************************
// two_line                                             PRIVATE slot
//*******************************************************************
void QBtConfigButtons::two_lines( const bool in_state )
{
   if( in_state ) {
      mode_ = QBtButtonSpace::TWO_LINES;
      update_example();
   }
}
示例#3
0
//*******************************************************************
// only_text                                            PRIVATE slot
//*******************************************************************
void QBtConfigButtons::only_text( const bool in_state )
{
   if( in_state ) {
      mode_ = QBtButtonSpace::ONLY_TEXT;
      update_example();
   }
}
示例#4
0
//*******************************************************************
// default_font                                         PRIVATE slot
//*******************************************************************
void QBtConfigButtons::default_font( const bool in_state )
{
   if( in_state ) {
      select_font_->setEnabled( false );
      font_ = QBtConfig::instance()->btn_font();
      update_example();
   }
}
示例#5
0
//*******************************************************************
// select_font                                          PRIVATE slot
//*******************************************************************
void QBtConfigButtons::select_font()
{
   bool ok;
   const QFont new_font = QFontDialog::getFont( &ok, font_, this, tr( CAPTION_FONTS ) );
   if( ok ) {
      font_ = new_font;
      update_example();
   }
}
示例#6
0
CommandWizardDialog::CommandWizardDialog(const QString& command, QWidget *parent) : QDialog(parent) {

  Q_UNUSED(parent);

  setWindowTitle(i18n("Command Pattern Wizard"));

  QVBoxLayout *mainLayout = new QVBoxLayout;
  setLayout(mainLayout);

  QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel|QDialogButtonBox::Apply);
  okButton = buttonBox->button(QDialogButtonBox::Ok);
  applyButton = buttonBox->button(QDialogButtonBox::Apply);
  okButton->setDefault(true);
  okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
  connect(buttonBox, &QDialogButtonBox::accepted, this, &CommandWizardDialog::slotAccepted);
  connect(buttonBox, &QDialogButtonBox::rejected, this, &CommandWizardDialog::reject);
  connect(applyButton, &QPushButton::clicked, this, &CommandWizardDialog::slotApplied);

  QWidget *widget = new QWidget(this);
  mainLayout->addWidget(widget);
  mainLayout->addWidget(buttonBox);
  ui.setupUi(widget);

  ui.qlineedit_command->setText(command);
  connect(ui.qlineedit_command, SIGNAL(textEdited(const QString&)), this, SLOT(trigger_changed()));
  connect(ui.qlineedit_command, SIGNAL(textChanged(const QString&)), this, SLOT(update_example()));
  ui.qlineedit_command->setCursorPosition(0);

  connect(ui.kurllabel_aboutcommandlineschemes, SIGNAL(leftClickedUrl()), this, SLOT(about_commandline_schemes()));
  connect(ui.kurllabel_aboutparameters, SIGNAL(leftClickedUrl()), this, SLOT(about_parameters()));

  connect(ui.kpushbutton_albumartist, SIGNAL(clicked()), this, SLOT(insAlbumArtist()));
  connect(ui.kpushbutton_albumtitle, SIGNAL(clicked()), this, SLOT(insAlbumTitle()));
  connect(ui.kpushbutton_trackartist, SIGNAL(clicked()), this, SLOT(insTrackArtist()));
  connect(ui.kpushbutton_tracktitle, SIGNAL(clicked()), this, SLOT(insTrackTitle()));
  connect(ui.kpushbutton_trackno, SIGNAL(clicked()), this, SLOT(insTrackNo()));
  connect(ui.kpushbutton_cdno, SIGNAL(clicked()), this, SLOT(insCDNo()));
  connect(ui.kpushbutton_date, SIGNAL(clicked()), this, SLOT(insDate()));
  connect(ui.kpushbutton_genre, SIGNAL(clicked()), this, SLOT(insGenre()));
  connect(ui.kpushbutton_cover_file, SIGNAL(clicked()), this, SLOT(insCoverFile()));
  connect(ui.kpushbutton_nooftracks, SIGNAL(clicked()), this, SLOT(insNoOfTracks()));
  connect(ui.kpushbutton_input_file, SIGNAL(clicked()), this, SLOT(insInFile()));
  connect(ui.kpushbutton_output_file, SIGNAL(clicked()), this, SLOT(insOutFile()));

  this->command = command;

  applyButton->setEnabled(false);

  update_example();

}
示例#7
0
void SimplePatternWizardDialog::insNoOfTracks() {
  QString text = ui.qlineedit_pattern->text();
  text.insert(ui.qlineedit_pattern->cursorPosition(), QString("$" VAR_NO_OF_TRACKS));
  ui.qlineedit_pattern->setText(text);
  update_example();
}
示例#8
0
void SimplePatternWizardDialog::insSuffix() {
  QString text = ui.qlineedit_pattern->text();
  text.insert(ui.qlineedit_pattern->cursorPosition(), QString("$" VAR_SUFFIX));
  ui.qlineedit_pattern->setText(text);
  update_example();
}
示例#9
0
void SimplePatternWizardDialog::insAlbumTitle() {
  QString text = ui.qlineedit_pattern->text();
  text.insert(ui.qlineedit_pattern->cursorPosition(), QString("$" VAR_ALBUM_TITLE));
  ui.qlineedit_pattern->setText(text);
  update_example();
}
示例#10
0
void CommandWizardDialog::insOutFile() {
  QString text = ui.qlineedit_command->text();
  text.insert(ui.qlineedit_command->cursorPosition(), "$"+QString(VAR_OUTPUT_FILE));
  ui.qlineedit_command->setText(text);
  update_example();
}
示例#11
0
void CommandWizardDialog::insCDNo() {
  QString text = ui.qlineedit_command->text();
  text.insert(ui.qlineedit_command->cursorPosition(), "$"+QString(VAR_CD_NO));
  ui.qlineedit_command->setText(text);
  update_example();
}
示例#12
0
void CommandWizardDialog::insTrackTitle() {
  QString text = ui.qlineedit_command->text();
  text.insert(ui.qlineedit_command->cursorPosition(), "$"+QString(VAR_TRACK_TITLE));
  ui.qlineedit_command->setText(text);
  update_example();
}
示例#13
0
void CommandWizardDialog::insAlbumArtist() {
  QString text = ui.qlineedit_command->text();
  text.insert(ui.qlineedit_command->cursorPosition(), "$"+QString(VAR_ALBUM_ARTIST));
  ui.qlineedit_command->setText(text);
  update_example();
}