Ejemplo n.º 1
0
StringListEditDialog::StringListEditDialog(QWidget* parent, const char* name)
  : DialogBase(parent, name)
{
  // ############################################################################
  enableButtonApply(false);
  widget=new StringListEditWidget(this);
  CHECK(widget!=0);
  setMainWidget(widget);
  // ----- set up geometry:
  resize(minimumSize());
  // ############################################################################
}
Ejemplo n.º 2
0
void
PodcastSettingsDialog::init()
{
    QString url = m_channel->url().url();
    m_ps->m_urlLineEdit->setText( url );

    m_ps->m_saveLocation->setMode( KFile::Directory | KFile::ExistingOnly );
    m_ps->m_saveLocation->setUrl( m_channel->saveLocation() );

    m_ps->m_autoFetchCheck->setChecked( m_channel->autoScan() );

    if( m_channel->fetchType() == Podcasts::PodcastChannel::StreamOrDownloadOnDemand )
    {
        m_ps->m_streamRadio->setChecked( true );
        m_ps->m_downloadRadio->setChecked( false );
    }
    else if( m_channel->fetchType() == Podcasts::PodcastChannel::DownloadWhenAvailable )
    {
        m_ps->m_streamRadio->setChecked( false );
        m_ps->m_downloadRadio->setChecked( true );
    }

    m_ps->m_purgeCheck->setChecked( m_channel->hasPurge() );
    m_ps->m_purgeCountSpinBox->setValue( m_channel->purgeCount() );
    m_ps->m_purgeCountSpinBox->setSuffix( ki18np( " Item", " Items" ) );

    if( !m_channel->hasPurge() )
    {
        m_ps->m_purgeCountSpinBox->setEnabled( false );
        m_ps->m_purgeCountLabel->setEnabled( false );
    }

    m_ps->m_writeTagsCheck->setChecked( m_channel->writeTags() );

    enableButtonApply( false );

    // Connects for modification check
    connect( m_ps->m_urlLineEdit, SIGNAL(textChanged( const QString& )),
             SLOT(checkModified()) );
    connect( m_ps->m_saveLocation, SIGNAL(textChanged( const QString& )),
             SLOT(checkModified()) );
    connect( m_ps->m_autoFetchCheck, SIGNAL(clicked()), SLOT(checkModified()) );
    connect( m_ps->m_streamRadio, SIGNAL(clicked()), SLOT(checkModified()) );
    connect( m_ps->m_downloadRadio, SIGNAL(clicked()), SLOT(checkModified()) );
    connect( m_ps->m_purgeCheck, SIGNAL(clicked()), SLOT(checkModified()) );
    connect( m_ps->m_purgeCountSpinBox, SIGNAL(valueChanged( int )), SLOT(checkModified()) );
    connect( m_ps->m_writeTagsCheck, SIGNAL(clicked()), SLOT(checkModified()) );
    connect( m_ps->m_filenameLayoutConfigWidgetButton, SIGNAL(clicked()), SLOT(launchFilenameLayoutConfigDialog()) );

    connect( this, SIGNAL(applyClicked()), this ,SLOT(slotApply()) );
    connect( this, SIGNAL(okClicked()), this, SLOT(slotApply()) );
}
Ejemplo n.º 3
0
void PrefDialog::updateDialog() {  
  prefGeneral->setCrashRecovery(configuration().isCrashRecovery());
  prefGeneral->setCrashRecoveryIndex(configuration().crashRecoveryIntervalIndex());
  prefGeneral->setNbUndo(configuration().getNbUndo());
  prefGeneral->setBackgroundColor(configuration().getBackgroundColor());
  prefGeneral->setReclusteringExecutable(configuration().getReclusteringExecutable());
  prefGeneral->setReclusteringArguments(configuration().getReclusteringArguments()); 
  prefclusterView->setTimeInterval(configuration().getTimeInterval());
  prefWaveformView->setGain(configuration().getGain());
  prefGeneral->setUseWhiteColorDuringPrinting(configuration().getUseWhiteColorDuringPrinting());
  enableButtonApply(false);   // disable apply button
  applyEnable = false;
}
Ejemplo n.º 4
0
StringListSelectSetDialog::StringListSelectSetDialog
(QWidget* parent, const char* name)
  : DialogBase(parent, name)
{
  // ############################################################################
  lbStrings=new QListBox(this);
  lbStrings->setMultiSelection(true);
  setMainWidget(lbStrings);
  enableButtonApply(false);
  initializeGeometry();
  resize(minimumSize());
  // ############################################################################
}
Ejemplo n.º 5
0
SearchDialog::SearchDialog(QWidget* parent, const char* name)
  : DialogBase(parent, name),
    widget(0)
{
  // ############################################################################
  const char* Descriptions[]= {
    i18n("The title"),
    i18n("The first name"),
    i18n("The additional name"),
    i18n("The name prefix"),
    i18n("The name"),
    i18n("The formatted name"),
    i18n("The address"),
    i18n("The town"),
    i18n("The organization"),
    i18n("The role"),
    i18n("The org unit"),
    i18n("The org subunit"),
    i18n("The email address"),
    i18n("The second email address"),
    i18n("The third email address"),
    i18n("The telephone number"),
    i18n("The fax number"),
    i18n("The modem number"),
    i18n("The homepage URL"),
    i18n("The comment") };
  const int Size=sizeof(Descriptions)/sizeof(Descriptions[0]);
  int count;
  // ----- create main widget:
  widget=new SearchDialogMainWidget(this);
  CHECK(widget!=0);
  setMainWidget(widget);
  // ----- configure dialog:
  setCaption(i18n("kab: Search entries"));
  enableButtonApply(false);
  // showMainFrameTile(false);
  // -----
  for(count=0; count<Size; count++)
    {
      widget->comboSelector->insertItem(Descriptions[count]);
    }
  connect(widget->comboSelector, SIGNAL(activated(int)), SLOT(keySelected(int)));
  connect(widget->lePattern, SIGNAL(textChanged(const char*)), 
	  SLOT(valueChanged(const char*)));
  connect(widget, SIGNAL(sizeChanged()), SLOT(initializeGeometry()));
  keySelected(0);
  resize(minimumSize());
  widget->lePattern->setFocus();
  // ############################################################################
}
Ejemplo n.º 6
0
void ConfigureDialog::currentPageChanged(KPageWidgetItem *current, KPageWidgetItem *before)
{
    PrinterPage *currentPage = qobject_cast<PrinterPage*>(current->widget());
    PrinterPage *beforePage = qobject_cast<PrinterPage*>(before->widget());

    // Check if the before page has changes
    savePage(beforePage);
    if (beforePage) {
        disconnect(beforePage, SIGNAL(changed(bool)), this, SLOT(enableButtonApply(bool)));
    }

    // connect the changed signal to the new page and check if it has changes
    connect(currentPage, SIGNAL(changed(bool)), this, SLOT(enableButtonApply(bool)));
    enableButtonApply(currentPage->hasChanges());
}
Ejemplo n.º 7
0
void EntryDlg::setModified(bool mod)
{
  comm_page->setModified(mod);
  aux_page->setModified(mod);
  mc_page->setModified(mod);
  tense_page->setModified(mod);
  mc_page->setModified(mod);
  adj_page->setModified(mod);
  if (from_page != 0)
    from_page->setModified(mod);
  if (to_page != 0)
    to_page->setModified(mod);
  enableButtonApply(false);
  enableButton(User1, false);
}
Ejemplo n.º 8
0
void PrefDialog::updateConfiguration(){
  configuration().setCrashRecovery(prefGeneral->isCrashRecovery());
  configuration().setCrashRecoveryIndex(prefGeneral->crashRecoveryIntervalIndex());
  configuration().setNbUndo(prefGeneral->getNbUndo());
  configuration().setBackgroundColor(prefGeneral->getBackgroundColor()); 
  configuration().setReclusteringExecutable(prefGeneral->getReclusteringExecutable());
  configuration().setReclusteringArguments(prefGeneral->getReclusteringArguments());
  configuration().setTimeInterval(prefclusterView->getTimeInterval());
  configuration().setGain(prefWaveformView->getGain());
  configuration().setNbChannels(prefWaveformView->getNbChannels());
  configuration().setChannelPositions(prefWaveformView->getChannelPositions()); 
  configuration().setUseWhiteColorDuringPrinting(prefGeneral->useWhiteColorDuringPrinting());
  enableButtonApply(false);   // disable apply button
  applyEnable = false;
}
Ejemplo n.º 9
0
StringListSAndRSetDialog::StringListSAndRSetDialog
(QWidget* parent, const char* text, bool modal)
  : DialogBase(parent, text, modal),
    sar(new StringListSelectAndReorderSet(this)),
    sizeIsFixed(false)
{
  // ############################################################################
  // ----- manage subwidgets:
  // buttonOK->setText(i18n("OK"));
  // buttonCancel->setText(i18n("Cancel"));
  enableButtonApply(false);
  setMainWidget(sar);
  // ----- set up geometry:
  resize(minimumSize());
  // ############################################################################
}
Ejemplo n.º 10
0
void ConquirereSettingsDialog::setupPages()
{
    setFaceType( List );
    setWindowTitle(i18n("Preferences"));
    setButtons(Reset | Ok | Apply | Cancel);
    setDefaultButton(Ok);
    enableButtonApply(false);
    setModal(true);
    showButtonSeparator(true);

    m_appearanceSettings = new AppearanceSettings();
    connect(this, SIGNAL(applyClicked()), m_appearanceSettings, SLOT(applySettings()));
    connect(this, SIGNAL(resetClicked()), m_appearanceSettings, SLOT(resetSettings()));
    connect(this, SIGNAL(okClicked()), m_appearanceSettings, SLOT(applySettings()));
    connect(m_appearanceSettings, SIGNAL(contentChanged()), this, SLOT(contentChanged()));

    KPageWidgetItem *asitem = addPage( m_appearanceSettings, i18n( "Appearance" ) );
    asitem->setIcon( KIcon( "view-choose" ) );

    m_librarySettings = new LibrarySettings();
    connect(this, SIGNAL(applyClicked()), m_librarySettings, SLOT(applySettings()));
    connect(this, SIGNAL(resetClicked()), m_librarySettings, SLOT(resetSettings()));
    connect(this, SIGNAL(okClicked()), m_librarySettings, SLOT(applySettings()));
    connect(m_librarySettings, SIGNAL(contentChanged()), this, SLOT(contentChanged()));

    KPageWidgetItem *libsitem = addPage( m_librarySettings, i18n( "Library" ) );
    libsitem->setIcon( KIcon( "folder-database" ) );

    m_exportSettings = new ExportSettings();
    connect(this, SIGNAL(applyClicked()), m_exportSettings, SLOT(applySettings()));
    connect(this, SIGNAL(resetClicked()), m_exportSettings, SLOT(resetSettings()));
    connect(this, SIGNAL(okClicked()), m_exportSettings, SLOT(applySettings()));
    connect(m_exportSettings, SIGNAL(contentChanged()), this, SLOT(contentChanged()));

    KPageWidgetItem *esitem = addPage( m_exportSettings, i18n( "Export" ) );
    esitem->setIcon( KIcon( "document-export" ) );

    m_systemSyncSettings = new SystemSyncSettings();
    connect(this, SIGNAL(applyClicked()), m_systemSyncSettings, SLOT(applySettings()));
    connect(this, SIGNAL(resetClicked()), m_systemSyncSettings, SLOT(resetSettings()));
    connect(this, SIGNAL(okClicked()), m_systemSyncSettings, SLOT(applySettings()));
    connect(m_systemSyncSettings, SIGNAL(contentChanged()), this, SLOT(contentChanged()));

    KPageWidgetItem *sssitem = addPage( m_systemSyncSettings, i18n( "Synchronize" ) );
    sssitem->setIcon( KIcon( "view-refresh" ) );

}
Ejemplo n.º 11
0
void KWatchGnuPGConfig::loadConfig()
{
    KConfig *config = kapp->config();
    config->setGroup("WatchGnuPG");
    mExeED->setURL(config->readEntry("Executable", "watchgnupg"));
    mSocketED->setURL(config->readEntry("Socket", QDir::home().canonicalPath()
                                        + "/.gnupg/log-socket"));
    mLogLevelCB->setCurrentItem(log_level_to_int(config->readEntry("LogLevel", "basic")));

    config->setGroup("LogWindow");
    mLoglenSB->setValue(config->readNumEntry("MaxLogLen", 10000));
    mWordWrapCB->setChecked(config->readBoolEntry("WordWrap", false));

    config->setGroup(QString::null);
    enableButtonOK(false);
    enableButtonApply(false);
}
Ejemplo n.º 12
0
void KWatchGnuPGConfig::saveConfig()
{
    KConfig *config = kapp->config();
    config->setGroup("WatchGnuPG");
    config->writeEntry("Executable", mExeED->url());
    config->writeEntry("Socket", mSocketED->url());
    config->writeEntry("LogLevel", log_levels[mLogLevelCB->currentItem()]);

    config->setGroup("LogWindow");
    config->writeEntry("MaxLogLen", mLoglenSB->value());
    config->writeEntry("WordWrap", mWordWrapCB->isChecked());

    config->setGroup(QString::null);
    config->sync();
    enableButtonOK(false);
    enableButtonApply(false);
}
Ejemplo n.º 13
0
void
PodcastSettingsDialog::slotApply()       //slot
{
    m_channel->setUrl( KUrl( m_ps->m_urlLineEdit->text() ) );
    m_channel->setAutoScan( m_ps->m_autoFetchCheck->isChecked() );
    m_channel->setFetchType(
        m_ps->m_downloadRadio->isChecked() ?
        Podcasts::PodcastChannel::DownloadWhenAvailable :
        Podcasts::PodcastChannel::StreamOrDownloadOnDemand
    );
    m_channel->setSaveLocation( m_ps->m_saveLocation->url() );

    m_channel->setPurge( m_ps->m_purgeCheck->isChecked() );
    m_channel->setPurgeCount( m_ps->m_purgeCountSpinBox->value() );
    m_channel->setWriteTags( m_ps->m_writeTagsCheck->isChecked() );

    enableButtonApply( false );
}
SpotifySettingsDialog::SpotifySettingsDialog( QWidget *parent )
    : KDialog( parent )
    , m_settingsWidget(new Ui::SpotifySettingsWidget)
{
    debug() << "Checking Spotify resolver: " << Collections::SpotifyCollection::resolverPath();
    if( !QFile::exists( Collections::SpotifyCollection::resolverPath() ) )
    {
        SpotifyDownloadDialog dialog;
        m_config.reset();
        dialog.exec();
    }

    setCaption( i18n( "Spotify configuration" ) );
    setButtons( KDialog::Ok | KDialog::Cancel | KDialog::Apply | KDialog::Default );
    enableButtonApply( false );

    QWidget *w = new QWidget(this);
    m_settingsWidget->setupUi( w );
    m_settingsWidget->messageWidget->hide();
    setMainWidget( w );

    connect( this, SIGNAL( okClicked() ),
            this, SLOT( slotTryLogin() ) );
    connect( this, SIGNAL( cancelClicked() ),
            this, SLOT( slotCancel() ) );
    connect( this, SIGNAL( applyClicked() ),
            this, SLOT( slotTryLogin() ) );
    connect( this, SIGNAL( defaultClicked() ),
            this, SLOT( defaults() ) );

    connect( m_settingsWidget->lineUsername, SIGNAL( textChanged( const QString& ) ),
            this, SLOT( slotSettingsChanged() ) );
    connect( m_settingsWidget->linePassword, SIGNAL( textChanged( const QString& ) ),
            this, SLOT( slotSettingsChanged() ) );
    connect( m_settingsWidget->checkHighQuality, SIGNAL( clicked() ),
            this, SLOT( slotSettingsChanged() ) );

    connect( this, SIGNAL( changed( bool ) ), this, SLOT( enableButtonApply( bool ) ) );

    // Load config from KConfig or KWallet
    load();
}
void TemplateManagementDialog::slotAddTemplate()
{
  bool ok;
  bool duplicate = false;
  QString m_type_translated = i18n( qPrintable( m_type ) );
  const QString newTemplate = KInputDialog::getText(
    i18n( "Template Name" ),
    i18n( "Please enter a name for the new template:" ),
    i18n( "New %1 Template", m_type_translated ), &ok );
  if ( newTemplate.isEmpty() || !ok ) {
    return;
  }

  if ( m_templates.contains( newTemplate ) ) {
    int rc = KMessageBox::warningContinueCancel(
      this,
      i18n( "A template with that name already exists, do you want to overwrite it?" ),
      i18n( "Duplicate Template Name" ), KGuiItem( i18n( "Overwrite" ) ) );
    if ( rc == KMessageBox::Cancel ) {
      QTimer::singleShot( 0, this, SLOT(slotAddTemplate()) );
      return;
    }
    duplicate = true;
  }

  if ( !duplicate ) {
    int count = m_base.m_listBox->count();
    m_templates.append( newTemplate );
    m_base.m_listBox->addItem( newTemplate );
    QListWidgetItem *item = m_base.m_listBox->item( count );
    m_base.m_listBox->setItemSelected( item, true );
  }
  m_newTemplate = newTemplate;
  m_changed = true;

  // From this point on we need to keep the original event around until the
  // user has closed the dialog, applying a template would make little sense
  enableButtonApply( false );
  // neither does adding it again
  m_base.m_buttonAdd->setEnabled( false );
}
Ejemplo n.º 16
0
void ColumnsDialog::apply()
{
    Playlist::instance()->setColumns( m_list->columnOrder(), m_list->visibleColumns() );
    m_list->resetChanged();
    enableButtonApply( false );
}
Ejemplo n.º 17
0
void KWatchGnuPGConfig::slotChanged()
{
    enableButtonOK(true);
    enableButtonApply(true);
}
Ejemplo n.º 18
0
void PrefDialog::enableApply() {
    enableButtonApply(true);   // enable apply button
    applyEnable = true;
}
Ejemplo n.º 19
0
void TagPropertiesDialog::slotTextChanged(const QString& text)
{
    enableButtonOK(!text.isEmpty());
    enableButtonApply(!text.isEmpty());
}
Ejemplo n.º 20
0
void PreferencesDialog::enableApplyButton()
{
    enableButtonApply(true);
}
Ejemplo n.º 21
0
void PreferencesDialog::disableApplyButton()
{
    enableButtonApply(false);
}
Ejemplo n.º 22
0
void ConquirereSettingsDialog::contentChanged()
{
    enableButtonApply(true);
}
Ejemplo n.º 23
0
EntryDlg::EntryDlg(
  KMainWindow   *main,
  kvoctrainDoc  *doc,
  bool           multi_sel,
  bool           origin,
  grade_t        f_grd,
  grade_t        t_grd,
  count_t        f_qcount,
  count_t        t_qcount,
  count_t        f_bcount,
  count_t        t_bcount,
  time_t         f_qdate,
  time_t         t_qdate,
  QString        f_faux_ami,
  QString        t_faux_ami,
  QString        expr,
  int            lesson,
  QComboBox     *lessonbox,
  QString        lang,
  LangSet       &langset,
  QString        rem,
  QString        type,
  QString        pronunce,
  QString        synonym,
  QString        antonym,
  QString        example,
  QString        usagelabel,
  QString        paraphrase,
  const          Conjugation &con_prefix,
  const          Conjugation &conjugations,
  const          Article &/*article*/,
  const          Comparison &comp,
  const          MultipleChoice &mc,
  QueryManager  &querymanager,
  const QString &title,
  bool           active,
  const QFont&   ipafont,
  QWidget       *parent,
  const char    *name,
  bool           modal)
  :
  KDialogBase(Tabbed, title, User1|User2|User3|Apply|Close, Apply, parent, name, modal, false,
    KGuiItem(i18n("&Reset")),
    KGuiItem(QString::null, "view_left_right"),
    KGuiItem(QString::null, "view_top_bottom"))

{
  mainwin = main;
  docked = false;
  edit_row = -1;
  edit_col = -1;
  from_page = 0;
  to_page = 0;

  QString s;
  if (langset.findLongId(lang).isEmpty() )
    s = lang;
  else
    s = langset.findLongId(lang);

  QFrame *page;
  QVBoxLayout *topLayout;

  if (origin)
  {
    page = addPage( i18n("Co&mmon") );
    topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
    comm_page = new CommonEntryPage (this, doc, multi_sel, expr, lesson, lessonbox,
                                      lang, type, pronunce, usagelabel,
                                      i18n("Original &expression in %1:").arg(s), querymanager, active,
                                      ipafont, page, name);
    topLayout->addWidget(comm_page);

    page = addPage( i18n("A&dditional") );
    topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
    aux_page = new AuxInfoEntryPage (this, multi_sel, synonym, antonym, example, rem, paraphrase, page, name);
    topLayout->addWidget(aux_page);

    page = addPage( i18n("&Multiple Choice") );
    topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
    mc_page = new MCEntryPage (this, multi_sel, mc, page, "MultipleChoice");
    topLayout->addWidget(mc_page);

    page = addPage( i18n("Con&jugation") );
    topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
    tense_page = new TenseEntryPage (this, multi_sel, con_prefix, conjugations, page, "Conjugation");
    topLayout->addWidget(tense_page);

    page = addPage( i18n("Compar&ison") );
    topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
    adj_page = new AdjEntryPage (this, multi_sel, comp, page, "Comparison");
    topLayout->addWidget(adj_page);
  }
  else
  {
    page = addPage( i18n("Co&mmon") );
    topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
    comm_page = new CommonEntryPage (this, doc, multi_sel, expr, lesson, lessonbox,
                                      lang, type, pronunce, usagelabel,
                                      i18n("Translated &expression in %1:").arg(s), querymanager, active,
                                      ipafont, page, name);
    topLayout->addWidget(comm_page);

    page = addPage( i18n("A&dditional") );
    topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
    aux_page = new AuxInfoEntryPage (this, multi_sel, synonym, antonym, example, rem, paraphrase, page, name);
    topLayout->addWidget(aux_page);

    page = addPage( i18n("&Multiple Choice") );
    topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
    mc_page = new MCEntryPage (this, multi_sel, mc, page, "MultipleChoice");
    topLayout->addWidget(mc_page);

    page = addPage( i18n("Con&jugation") );
    topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
    tense_page = new TenseEntryPage (this, multi_sel, con_prefix, conjugations, page, "Conjugation");
    topLayout->addWidget(tense_page);

    page = addPage( i18n("Compar&ison") );
    topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
    adj_page = new AdjEntryPage (this, multi_sel, comp, page, "Comparison");
    topLayout->addWidget(adj_page);
  }

  page = addPage( i18n("&From Original") );
  topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
  from_page = new FromToEntryPage (this, multi_sel, f_grd, f_qdate, f_qcount, f_bcount,
                                    f_faux_ami,
                                    i18n("Properties From Original"), page, name);
  topLayout->addWidget(from_page);

  page = addPage( i18n("&To Original") );
  topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
  to_page   = new FromToEntryPage (this, multi_sel, t_grd, t_qdate, t_qcount, t_bcount,
                                    t_faux_ami,
                                    i18n("Properties to Original"), page, name);
  topLayout->addWidget(to_page);

  updatePages (type);

  connect(comm_page, SIGNAL(typeSelected(const QString&)), SLOT(updatePages(const QString&)) );

  connect( this, SIGNAL(user1Clicked()), this, SLOT(slotUndo()) );
  connect( this, SIGNAL(applyClicked()), this, SLOT(slotApply()) );
  connect( this, SIGNAL(user2Clicked()), this, SLOT(slotDockVertical()) );
  connect( this, SIGNAL(user3Clicked()), this, SLOT(slotDockHorizontal()) );

  connect (comm_page, SIGNAL(sigModified()), this, SLOT(slotDisplayModified() ));
  connect (aux_page, SIGNAL(sigModified()), this, SLOT(slotDisplayModified() ));
  connect (adj_page, SIGNAL(sigModified()), this, SLOT(slotDisplayModified() ));
  connect (mc_page, SIGNAL(sigModified()), this, SLOT(slotDisplayModified() ));
  connect (tense_page, SIGNAL(sigModified()), this, SLOT(slotDisplayModified() ));

  if (from_page != 0)
    connect (from_page, SIGNAL(sigModified()), this, SLOT(slotDisplayModified() ));
  if (to_page != 0)
    connect (to_page, SIGNAL(sigModified()), this, SLOT(slotDisplayModified() ));

  enableButtonApply(false);
  enableButton(User1, false);
  comm_page->expr_line->setFocus();
}
Ejemplo n.º 24
0
void EntryDlg::slotDisplayModified()
{
  enableButtonApply(true);
  enableButton(User1, true);
}
Ejemplo n.º 25
0
void ConquirereSettingsDialog::applyChanges()
{
    enableButtonApply(false);
}
Ejemplo n.º 26
0
void GroupWisePrivacyDialog::updateButtonState()
{
	enableButtonApply( m_dirty );
}
Ejemplo n.º 27
0
/**
 * Enables the "Apply" button.
 */
void PreferencesDlg::slotModified()
{
	enableButtonApply(true);
}
Ejemplo n.º 28
0
void ColumnsDialog::slotChanged() //slot
{
    enableButtonApply( true );
}
Ejemplo n.º 29
0
ProfileDataDialog::ProfileDataDialog(ProfileModel *profileModel, const int profileRow, QWidget *parent) : KDialog(parent)
{

  Q_UNUSED(parent);

  profile_model = profileModel;
  if (!profile_model)
  {
    kDebug() << "ProfileModel is NULL!";
    return;
  }
  profile_row = profileRow;

  QWidget *widget = new QWidget(this);
  ui.setupUi(widget);

  setMainWidget(widget);

  if (profile_row >= 0)
  {

    lame_parameters.fromString(profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_ENCODER_LAME_PARAMETERS_INDEX)).toString());
    oggenc_parameters.fromString(profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_ENCODER_OGGENC_PARAMETERS_INDEX)).toString());
    flac_parameters.fromString(profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_ENCODER_FLAC_PARAMETERS_INDEX)).toString());
    faac_parameters.fromString(profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_ENCODER_FAAC_PARAMETERS_INDEX)).toString());
    wave_parameters.fromString(profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_ENCODER_WAVE_PARAMETERS_INDEX)).toString());
    custom_parameters.fromString(profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_ENCODER_CUSTOM_PARAMETERS_INDEX)).toString());

  }

  lame_widget = new lameWidget(&lame_parameters, this);
  connect(lame_widget, SIGNAL(triggerChanged()), this, SLOT(trigger_changed()));
  oggenc_widget = new oggencWidget(&oggenc_parameters, this);
  connect(oggenc_widget, SIGNAL(triggerChanged()), this, SLOT(trigger_changed()));
  flac_widget = new flacWidget(&flac_parameters, this);
  connect(flac_widget, SIGNAL(triggerChanged()), this, SLOT(trigger_changed()));
  faac_widget = new faacWidget(&faac_parameters, this);
  connect(faac_widget, SIGNAL(triggerChanged()), this, SLOT(trigger_changed()));
  wave_widget = new waveWidget(&wave_parameters, this);
  connect(wave_widget, SIGNAL(triggerChanged()), this, SLOT(trigger_changed()));
  custom_widget = new customWidget(&custom_parameters, this);
  connect(custom_widget, SIGNAL(triggerChanged()), this, SLOT(trigger_changed()));

  ui.stackedWidget_encoder->addWidget(lame_widget);
  ui.stackedWidget_encoder->addWidget(oggenc_widget);
  ui.stackedWidget_encoder->addWidget(flac_widget);
  ui.stackedWidget_encoder->addWidget(faac_widget);
  ui.stackedWidget_encoder->addWidget(wave_widget);
  ui.stackedWidget_encoder->addWidget(custom_widget);

  QMap<int,QString> encoders = EncoderAssistant::availableEncoderNameList();
  QMap<int,QString>::const_iterator i = encoders.constBegin();
  while (i != encoders.constEnd())
  {
    ui.kcombobox_encoder->addItem(i.value(), i.key());
    ++i;
  }
  connect(ui.kcombobox_encoder, SIGNAL(activated(int)), this, SLOT(set_encoder_by_combobox(int)));

  connect(ui.kpushbutton_pattern, SIGNAL(clicked()), this, SLOT(pattern_wizard()));
  ui.kpushbutton_pattern->setIcon(KIcon("tools-wizard"));

  connect(ui.kpushbutton_cover, SIGNAL(clicked()), this, SLOT(cover_settings()));
  connect(ui.kpushbutton_playlist, SIGNAL(clicked()), this, SLOT(playlist_settings()));
  connect(ui.kpushbutton_info, SIGNAL(clicked()), this, SLOT(info_settings()));
  connect(ui.kpushbutton_hashlist, SIGNAL(clicked()), this, SLOT(hashlist_settings()));
  connect(ui.kpushbutton_cuesheet, SIGNAL(clicked()), this, SLOT(cuesheet_settings()));
  connect(ui.kpushbutton_singlefile, SIGNAL(clicked()), this, SLOT(singlefile_settings()));

  connect(ui.checkBox_cover, SIGNAL(toggled(bool)), this, SLOT(enable_settings_cover(bool)));
  connect(ui.checkBox_playlist, SIGNAL(toggled(bool)), this, SLOT(enable_settings_playlist(bool)));
  connect(ui.checkBox_info, SIGNAL(toggled(bool)), this, SLOT(enable_settings_info(bool)));
  connect(ui.checkBox_hashlist, SIGNAL(toggled(bool)), this, SLOT(enable_settings_hashlist(bool)));
  connect(ui.checkBox_cuesheet, SIGNAL(toggled(bool)), this, SLOT(enable_settings_cuesheet(bool)));
  connect(ui.checkBox_singlefile, SIGNAL(toggled(bool)), this, SLOT(enable_settings_singlefile(bool)));
  connect(ui.checkBox_singlefile, SIGNAL(toggled(bool)), this, SLOT(disable_filenames(bool)));
  connect(ui.checkBox_singlefile, SIGNAL(toggled(bool)), this, SLOT(disable_playlist(bool)));

  if (profile_row >= 0)
  {

    setCaption(i18n("Modify Profile"));

    setButtons(KDialog::Ok | KDialog::Cancel | KDialog::Apply);

    ui.klineedit_name->setText(profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_NAME_INDEX)).toString());
    connect(ui.klineedit_name, SIGNAL(textEdited(const QString&)), this, SLOT(trigger_changed()));
    ui.klineedit_name->setCursorPosition(0);

    ui.kiconbutton_icon->setIcon(profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_ICON_INDEX)).toString());
    connect(ui.kiconbutton_icon, SIGNAL(iconChanged(const QString&)), this, SLOT(trigger_changed()));

    set_encoder(profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_ENCODER_SELECTED_INDEX)).toInt());
    connect(ui.kcombobox_encoder, SIGNAL(activated(int)), this, SLOT(trigger_changed()));

    ui.klineedit_pattern->setText(profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_PATTERN_INDEX)).toString());
    connect(ui.klineedit_pattern, SIGNAL(textEdited(const QString&)), this, SLOT(trigger_changed()));
    ui.klineedit_pattern->setCursorPosition(0);

    ui.checkBox_fat32compatible->setChecked(profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_FAT32COMPATIBLE_INDEX)).toBool());
    connect(ui.checkBox_fat32compatible, SIGNAL(toggled(bool)), this, SLOT(trigger_changed()));

    ui.checkBox_underscore->setChecked(profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_UNDERSCORE_INDEX)).toBool());
    connect(ui.checkBox_underscore, SIGNAL(toggled(bool)), this, SLOT(trigger_changed()));

    ui.checkBox_2digitstracknum->setChecked(profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_2DIGITSTRACKNUM_INDEX)).toBool());
    connect(ui.checkBox_2digitstracknum, SIGNAL(toggled(bool)), this, SLOT(trigger_changed()));

    ui.checkBox_cover->setChecked(profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_SC_INDEX)).toBool());
    enable_settings_cover(ui.checkBox_cover->isChecked());
    connect(ui.checkBox_cover, SIGNAL(toggled(bool)), this, SLOT(trigger_changed()));

    ui.checkBox_playlist->setChecked(profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_PL_INDEX)).toBool());
    enable_settings_playlist(ui.checkBox_playlist->isChecked());
    connect(ui.checkBox_playlist, SIGNAL(toggled(bool)), this, SLOT(trigger_changed()));

    ui.checkBox_info->setChecked(profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_INF_INDEX)).toBool());
    enable_settings_info(ui.checkBox_info->isChecked());
    connect(ui.checkBox_info, SIGNAL(toggled(bool)), this, SLOT(trigger_changed()));

    ui.checkBox_hashlist->setChecked(profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_HL_INDEX)).toBool());
    enable_settings_hashlist(ui.checkBox_hashlist->isChecked());
    connect(ui.checkBox_hashlist, SIGNAL(toggled(bool)), this, SLOT(trigger_changed()));

    ui.checkBox_cuesheet->setChecked(profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_CUE_INDEX)).toBool());
    enable_settings_cuesheet(ui.checkBox_cuesheet->isChecked());
    connect(ui.checkBox_cuesheet, SIGNAL(toggled(bool)), this, SLOT(trigger_changed()));

    ui.checkBox_singlefile->setChecked(profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_SF_INDEX)).toBool());
    enable_settings_singlefile(ui.checkBox_singlefile->isChecked());
    connect(ui.checkBox_singlefile, SIGNAL(toggled(bool)), this, SLOT(trigger_changed()));

    ui.checkBox_replaygain->setChecked(profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_RG_INDEX)).toBool());
    connect(ui.checkBox_replaygain, SIGNAL(toggled(bool)), this, SLOT(trigger_changed()));

    disable_playlist(ui.checkBox_singlefile->isChecked());

    //profile data cover data
    pdcd_scale = profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_SC_SCALE_INDEX)).toBool();
    pdcd_size = profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_SC_SIZE_INDEX)).toSize();
    pdcd_format = profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_SC_FORMAT_INDEX)).toString();
    pdcd_pattern = profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_SC_NAME_INDEX)).toString();

    //profile data playlist data
    pdpd_format = profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_PL_FORMAT_INDEX)).toString();
    pdpd_pattern = profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_PL_NAME_INDEX)).toString();
    pdpd_abs_file_path = profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_PL_ABS_FILE_PATH_INDEX)).toBool();
    pdpd_utf8 = profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_PL_UTF8_INDEX)).toBool();

    //profile data info data
    pdid_text = profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_INF_TEXT_INDEX)).toStringList();
    pdid_pattern = profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_INF_NAME_INDEX)).toString();
    pdid_suffix = profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_INF_SUFFIX_INDEX)).toString();

    //profile data hashlist data
    pdhd_format = profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_HL_FORMAT_INDEX)).toString();
    pdhd_pattern = profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_HL_NAME_INDEX)).toString();

    //profile data cue sheet data
    pdud_pattern = profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_CUE_NAME_INDEX)).toString();

    //profile data single file data
    pdsd_pattern = profile_model->data(profile_model->index(profile_row, PROFILE_MODEL_COLUMN_SF_NAME_INDEX)).toString();

    enableButtonApply(false);

  }
Ejemplo n.º 30
0
void Amarok2ConfigDialog::updateButtons() //SLOT
{
    DEBUG_BLOCK

    enableButtonApply( hasChanged() );
}