コード例 #1
0
ファイル: inspector.cpp プロジェクト: hanabokuro/MuseScore
InspectorElement::InspectorElement(QWidget* parent)
   : InspectorElementBase(parent)
      {
      ie = new InspectorElementElement(this);
      layout->addWidget(ie);
      connect(ie, SIGNAL(enableApply()), inspector, SLOT(enableApply()));
      }
コード例 #2
0
ファイル: inspector.cpp プロジェクト: hanabokuro/MuseScore
InspectorClef::InspectorClef(QWidget* parent)
   : InspectorElementBase(parent)
      {
      iElement = new InspectorElementElement(this);
      iSegment = new InspectorSegment(this);

      layout->addWidget(iElement);
      layout->addWidget(iSegment);
      connect(iElement, SIGNAL(enableApply()), inspector, SLOT(enableApply()));
      connect(iSegment, SIGNAL(enableApply()), inspector, SLOT(enableApply()));
      }
コード例 #3
0
ファイル: inspector.cpp プロジェクト: hanabokuro/MuseScore
InspectorNote::InspectorNote(QWidget* parent)
   : InspectorElementBase(parent)
      {
      iElement = new InspectorElementElement(this);
      iNote    = new InspectorNoteBase(this);
      iSegment = new InspectorSegment(this);

      layout->addWidget(iElement);
      layout->addWidget(iNote);
      layout->addWidget(iSegment);

      connect(iElement, SIGNAL(enableApply()), SLOT(checkDirty()));
      connect(iNote,    SIGNAL(enableApply()), SLOT(checkDirty()));
      connect(iSegment, SIGNAL(enableApply()), SLOT(checkDirty()));
      }
コード例 #4
0
ファイル: inspector.cpp プロジェクト: hanabokuro/MuseScore
void InspectorElementElement::resetYClicked()
      {
      qreal _spatium = e->score()->spatium();
      offsetY->setValue(e->ipos().y() / _spatium);
      resetY->setEnabled(false);
      emit enableApply();
      }
コード例 #5
0
ファイル: inspector.cpp プロジェクト: hanabokuro/MuseScore
InspectorRest::InspectorRest(QWidget* parent)
   : InspectorElementBase(parent)
      {
      iElement = new InspectorElementElement(this);
      iSegment = new InspectorSegment(this);

      layout->addWidget(iElement);
      QHBoxLayout* l = new QHBoxLayout;
      small          = new QCheckBox;
      small->setText(tr("Small"));
      l->addWidget(small);
      layout->addLayout(l);
      layout->addWidget(iSegment);
      connect(iElement, SIGNAL(enableApply()), inspector, SLOT(enableApply()));
      connect(iSegment, SIGNAL(enableApply()), inspector, SLOT(enableApply()));
      connect(small,    SIGNAL(stateChanged(int)), inspector, SLOT(enableApply()));
      }
コード例 #6
0
void CDialogIrcSettings::addAlias()
{
	ui->lineEditAliasesFilter->clear();
	QModelIndex index = addAliasRow( QString(), QString() );
	ui->treeViewAliases->setCurrentIndex( index );
	ui->treeViewAliases->edit( index );
	enableApply();
}
コード例 #7
0
void CDialogIrcSettings::onAliasClicked( const QModelIndex& index )
{
	if ( index.column() == 2 )
	{
		qDeleteAll( sourceModel->takeRow( proxyModel->mapToSource( index ).row() ) );
		enableApply();
	}
}
コード例 #8
0
ファイル: settingsdialog.cpp プロジェクト: AtmashkinMI/LEM
SettingsDialog::SettingsDialog(QWidget *parent)
    : QWidget(parent, Qt::Dialog)
{
    setWindowFlags(windowFlags() ^ Qt::WindowContextHelpButtonHint);

    setWindowTitle(tr("Settings - %1").arg(qApp->applicationName()));

    settings = new QSettings(QString("/etc/%1.ini").arg(qApp->applicationName()), QSettings::IniFormat, this);

    buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok    |
                                     QDialogButtonBox::Apply |
                                     QDialogButtonBox::Reset |
                                     QDialogButtonBox::Cancel, Qt::Horizontal, this);

    okButton = buttonBox->button(QDialogButtonBox::Ok);
    applyButton = buttonBox->button(QDialogButtonBox::Apply);
    resetButton = buttonBox->button(QDialogButtonBox::Reset);
    cancelButton = buttonBox->button(QDialogButtonBox::Cancel);

    tabs = new QTabWidget(this);

    generalTab = new GeneralTab(this);
    tabs->addTab(generalTab, QIcon::fromTheme("preferences-system"), tr("&General"));

    owrTab = new OverwritersTab(this);
    tabs->addTab(owrTab, QIcon::fromTheme("preferences-other"), tr("&Erasing schemes"));

    QVBoxLayout *mainLayout = new QVBoxLayout;
    mainLayout->addWidget(tabs);
    mainLayout->addWidget(buttonBox);

    setLayout(mainLayout);

    setWindowModality(Qt::ApplicationModal);

    connect(cancelButton, SIGNAL(clicked()), this, SLOT(close()));
    connect(okButton, SIGNAL(clicked()), this, SLOT(okClicked()));
    connect(owrTab, SIGNAL(tabChanged()), this, SLOT(enableApply()));
    connect(applyButton, SIGNAL(clicked()), this, SLOT(applyClicked()));
    connect(generalTab, SIGNAL(tabChanged()), this, SLOT(enableApply()));
    connect(resetButton, SIGNAL(clicked()), this, SLOT(resetSettings()));
}
コード例 #9
0
CDialogIrcSettings::CDialogIrcSettings( QWidget* parent ) :
	QDialog( parent ),
	ui( new Ui::CDialogIrcSettings )
{
	ui->setupUi( this );

	setWindowFilePath( tr( "Settings" ) );

//TODO:	ui->treeWidgetColors->setItemDelegate(new ColorItemDelegate(ui->treeWidgetColors));
	ui->treeWidgetShortcuts->setItemDelegate( new ShortcutItemDelegate( ui->treeWidgetShortcuts ) );
//TODO:		ui->treeWidgetColors->header()->setSectionResizeMode(ColorColumns::Message, QHeaderView::ResizeToContents);
	ui->treeWidgetShortcuts->header()->setSectionResizeMode( ShortcutColumns::Description, QHeaderView::ResizeToContents );
	ui->treeWidgetShortcuts->expandItem( ui->treeWidgetShortcuts->topLevelItem( 0 ) );
	ui->treeWidgetShortcuts->expandItem( ui->treeWidgetShortcuts->topLevelItem( 1 ) );
	proxyModel = new SortFilterProxyModel( ui->treeViewAliases );
	sourceModel = new QStandardItemModel( proxyModel );
	proxyModel->setSourceModel( sourceModel );
	ui->treeViewAliases->setModel( proxyModel );
	ui->treeViewAliases->setItemDelegateForColumn( 2, new CloseDelegate( ui->treeViewAliases ) );

	loadSettings();

	connect( ui->checkBoxConnectOnStartup, SIGNAL( toggled( bool ) ), this, SLOT( enableApply() ) );
	connect( ui->fontComboBox, SIGNAL( currentFontChanged( QFont ) ), this, SLOT( enableApply() ) );
	connect( ui->spinBoxFontSize, SIGNAL( valueChanged( int ) ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxStripNicks, SIGNAL( toggled( bool ) ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxHighlightSounds, SIGNAL( toggled( bool ) ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxTimeStamp, SIGNAL( toggled( bool ) ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxDarkTheme, SIGNAL( toggled( bool ) ), this, SLOT( enableApply() ) );
	connect( ui->spinBoxBlockCount, SIGNAL( valueChanged( int ) ), this, SLOT( enableApply() ) );
//TODO:		connect(ui->treeWidgetColors, SIGNAL(clicked(QModelIndex)), this, SLOT(enableApply()));
	connect( ui->treeWidgetShortcuts, SIGNAL( clicked( QModelIndex ) ), this, SLOT( enableApply() ) );
	connect( ui->toolButtonAddAliases, SIGNAL( clicked() ), this, SLOT( addAlias() ) );
	connect( ui->treeViewAliases, SIGNAL( clicked( QModelIndex ) ), this, SLOT( onAliasClicked( QModelIndex ) ) );
	connect( ui->treeViewAliases, SIGNAL( activated( QModelIndex ) ), this, SLOT( enableApply() ) );
	connect( ui->lineEditAliasesFilter, SIGNAL( textEdited( QString ) ), proxyModel, SLOT( setFilterWildcard( QString ) ) );

	connect( ui->pushButtonApply, SIGNAL( clicked() ), this, SLOT( saveSettings() ) );
	ui->pushButtonApply->setEnabled( false );
}
コード例 #10
0
OptionsDialog::OptionsDialog(QWidget *parent):
    QDialog(parent), contents_widget(0), pages_widget(0),
    model(0), main_page(0), display_page(0)
        {
    contents_widget = new QListWidget();
    contents_widget->setMaximumWidth(128);

    pages_widget = new QStackedWidget();
    pages_widget->setMinimumWidth(300);

    QListWidgetItem *item_main = new QListWidgetItem(tr("Main"));
    contents_widget->addItem(item_main);
    main_page = new MainOptionsPage(this);
    pages_widget->addWidget(main_page);

    QListWidgetItem *item_display = new QListWidgetItem(tr("Display"));
    contents_widget->addItem(item_display);
    display_page = new DisplayOptionsPage(this);
    pages_widget->addWidget(display_page);

    contents_widget->setCurrentRow(0);

    QHBoxLayout *main_layout = new QHBoxLayout();
    main_layout->addWidget(contents_widget);
    main_layout->addWidget(pages_widget, 1);

    QVBoxLayout *layout = new QVBoxLayout();
    layout->addLayout(main_layout);

    QDialogButtonBox *buttonbox = new QDialogButtonBox();
    buttonbox->setStandardButtons(QDialogButtonBox::Apply|QDialogButtonBox::Ok|QDialogButtonBox::Cancel);
    apply_button = buttonbox->button(QDialogButtonBox::Apply);
    layout->addWidget(buttonbox);

    setLayout(layout);
    setWindowTitle(tr("Options"));

    /* Widget-to-option mapper */
    mapper = new MonitoredDataMapper(this);
    mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit);
    mapper->setOrientation(Qt::Vertical);
    /* enable apply button when data modified */
    connect(mapper, SIGNAL(viewModified()), this, SLOT(enableApply()));
    /* disable apply button when new data loaded */
    connect(mapper, SIGNAL(currentIndexChanged(int)), this, SLOT(disableApply()));

    /* Event bindings */
    connect(contents_widget, SIGNAL(currentRowChanged(int)), this, SLOT(changePage(int)));
    connect(buttonbox->button(QDialogButtonBox::Ok), SIGNAL(clicked()), this, SLOT(okClicked()));
    connect(buttonbox->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), this, SLOT(cancelClicked()));
    connect(buttonbox->button(QDialogButtonBox::Apply), SIGNAL(clicked()), this, SLOT(applyClicked()));
}
コード例 #11
0
ImageWindow::ImageWindow(QApplication* app, QWidget *parent) : KDialog(parent)
{
	m_app = app;
	m_browser = new BrowseWidget(this);

	setCaption("decKreator");
	setButtons(KDialog::Apply | KDialog::Cancel);
	enableButton(KDialog::Apply, false);
        
	this->setMainWidget(m_browser);
        connect(this, SIGNAL(applyClicked()), this, SLOT(applyButtonPressed()));
        connect(this, SIGNAL(cancelClicked()), this, SLOT(cancelButtonPressed()));
	connect(m_browser, SIGNAL(nameChanged()), this, SLOT(enableApply()));
}
コード例 #12
0
ファイル: prefdialog.cpp プロジェクト: neurosuite/klusters
void PrefDialog::slotDefault() {
  if (QMessageBox::question(this, tr("Set default options?"), tr("This will set the default options "
      "in ALL pages of the preferences dialog! Do you wish to continue?"), QMessageBox::RestoreDefaults|QMessageBox::Cancel
      )==QMessageBox::RestoreDefaults){
        
   prefGeneral->setCrashRecovery(configuration().isCrashRecoveryDefault());
   prefGeneral->setCrashRecoveryIndex(configuration().crashRecoveryIntervalIndexDefault());
   prefGeneral->setNbUndo(configuration().getNbUndoDefault());
   prefGeneral->setBackgroundColor(configuration().getBackgroundColorDefault());
   prefGeneral->setReclusteringExecutable(configuration().getReclusteringExecutableDefault());
   prefGeneral->setReclusteringArguments(configuration().getReclusteringArgumentsDefault()); 
   prefGeneral->setUseWhiteColorDuringPrinting(configuration().getUseWhiteColorDuringPrinting());

   prefclusterView->setTimeInterval(configuration().getTimeIntervalDefault());
   prefWaveformView->setGain(configuration().getGainDefault());
   prefWaveformView->resetChannelList(configuration().getNbChannels());
   
   enableApply();   // enable apply button
  }
}
コード例 #13
0
ファイル: prefdialog.cpp プロジェクト: neurosuite/klusters
PrefDialog::PrefDialog(QWidget *parent,int nbChannels)
 : QPageDialog(parent)
{

    setButtons(Help | Default | Ok | Apply | Cancel);
    setDefaultButton(Ok);
    setFaceType(List);
    setWindowTitle(tr("Preferences"));

    setHelp("settings","klusters");
    
    QWidget * w = new QWidget(this);
    prefGeneral = new PrefGeneral(w);
    QPageWidgetItem *item = new QPageWidgetItem(prefGeneral,tr("General"));
    item->setHeader(tr("Klusters General Configuration"));
    item->setIcon(QIcon(":/shared-icons/folder-open"));


    addPage(item);



    //adding page "Cluster view configuration"
    w = new QWidget(this);
    prefclusterView = new PrefClusterView(w);

    item = new QPageWidgetItem(prefclusterView,tr("Cluster view"));
    item->setHeader(tr("Cluster View configuration"));
    item->setIcon(QIcon(":/icons/clusterview"));
    addPage(item);


    //adding page "Waveform view configuration"
    w = new QWidget(this);
    prefWaveformView = new PrefWaveformView(w,nbChannels);

    item = new QPageWidgetItem(prefWaveformView,tr("Waveform view"));
    item->setHeader(tr("Waveform View configuration"));
    item->setIcon(QIcon(":/icons/waveformview"));
    addPage(item);



    // connect interactive widgets and selfmade signals to the enableApply slotDefault
    connect(prefGeneral->crashRecoveryCheckBox,SIGNAL(clicked()),this,SLOT(enableApply()));
    connect(prefGeneral->crashRecoveryComboBox,SIGNAL(activated(int)),this,SLOT(enableApply()));
    connect(prefGeneral->undoSpinBox,SIGNAL(valueChanged(int)),this,SLOT(enableApply()));
    connect(prefGeneral->backgroundColorButton,SIGNAL(colorChanged(QColor)),this,SLOT(enableApply()));
    connect(prefGeneral->reclusteringExecutableLineEdit,SIGNAL(textChanged(QString)),this,SLOT(enableApply()));
    //connect(prefGeneral,SIGNAL(reclusteringArgsUpdate()),this,SLOT(enableApply()));
    connect(prefGeneral->reclusteringArgsLineEdit,SIGNAL(textChanged(QString)),this,SLOT(enableApply()));
    connect(prefGeneral->useWhiteColorPrinting,SIGNAL(clicked()),this,SLOT(enableApply()));
    
    connect(prefclusterView->intervalSpinBox,SIGNAL(valueChanged(int)),this,SLOT(enableApply()));
    connect(prefWaveformView->gainSpinBox,SIGNAL(valueChanged(int)),this,SLOT(enableApply()));
    connect(prefWaveformView,SIGNAL(positionsChanged()),this,SLOT(enableApply()));


    connect(this, SIGNAL(applyClicked()), SLOT(slotApply()));
    connect(this, SIGNAL(defaultClicked()), SLOT(slotDefault()));
    connect(this,SIGNAL(helpClicked()),SLOT(slotHelp()));

    applyEnable = false;
}
コード例 #14
0
ファイル: logdialog.cpp プロジェクト: jmlee4301/kst
  _script->setText(dialogDefaults().value("log/script", QString()).toString());

  _tab->setCurrentIndex(0);

  _user->setText(dialogDefaults().value("log/user", QString()).toString());

  connect(_message, SIGNAL(textChanged()), this, SLOT(changed()));
  connect(_sizeOption, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
  connect(_formats, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
  connect(_sizeOption, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
  connect(_sizeOption, SIGNAL(currentIndexChanged(int)), this, SLOT(enableWidthHeight()));
  connect(_xSize, SIGNAL(valueChanged(int)), this, SLOT(changed()));
  connect(_ySize, SIGNAL(valueChanged(int)), this, SLOT(changed()));
  connect(_saveLocation, SIGNAL(changed(QString)), this, SLOT(changed()));
  connect(_saveLocation, SIGNAL(changed(QString)), this, SLOT(enableApply()));
  connect(_script, SIGNAL(textChanged(QString)), this, SLOT(enableApply()));

  connect(_close, SIGNAL(clicked()), this, SLOT(close()));
  connect(_apply, SIGNAL(clicked()), this, SLOT(apply()));

  _proc = new QProcess(this);
  connect(_proc, SIGNAL(readyReadStandardError()), this, SLOT(scriptStdErr()));
  connect(_proc, SIGNAL(readyReadStandardOutput()), this, SLOT(scriptStdOut()));
  connect(_proc, SIGNAL(started()), this, SLOT(scriptStarted()));
  connect(_proc, SIGNAL(finished(int)), this, SLOT(scriptFinished(int)));
  connect(_rerunScript, SIGNAL(clicked()), this, SLOT(runScript()));
  connect(_proc, SIGNAL(error(QProcess::ProcessError)), this, SLOT(scriptError(QProcess::ProcessError)));

  _saveLocation->setMode(QFileDialog::Directory);
コード例 #15
0
ファイル: inspector.cpp プロジェクト: hanabokuro/MuseScore
void InspectorNoteBase::offtimeOffsetChanged(int)
      {
      resetOfftimeOffset->setEnabled(note->offTimeUserOffset());
      emit enableApply();
      }
コード例 #16
0
ファイル: inspector.cpp プロジェクト: hanabokuro/MuseScore
void InspectorNoteBase::dotPositionChanged(int)
      {
      resetDotPosition->setEnabled(note->dotPosition() != AUTO);
      emit enableApply();
      }
コード例 #17
0
ファイル: inspector.cpp プロジェクト: hanabokuro/MuseScore
void InspectorElementElement::offsetYChanged(double)
      {
      resetY->setEnabled(offsetY->value() != e->ipos().y());
      emit enableApply();
      }
コード例 #18
0
ファイル: inspector.cpp プロジェクト: hanabokuro/MuseScore
void InspectorNoteBase::smallChanged(int)
      {
      resetSmall->setEnabled(small->isChecked());
      emit enableApply();
      }
コード例 #19
0
ファイル: inspector.cpp プロジェクト: hanabokuro/MuseScore
void InspectorSegment::trailingSpaceChanged(double)
      {
      resetTrailingSpace->setEnabled(segment->extraTrailingSpace().val() != trailingSpace->value());
      emit enableApply();
      }
コード例 #20
0
ファイル: inspector.cpp プロジェクト: hanabokuro/MuseScore
void InspectorSegment::leadingSpaceChanged(double)
      {
      resetLeadingSpace->setEnabled(segment->extraLeadingSpace().val() != leadingSpace->value());
      emit enableApply();
      }
コード例 #21
0
ファイル: inspector.cpp プロジェクト: hanabokuro/MuseScore
void InspectorElementElement::visibleChanged(int)
      {
      resetVisible->setEnabled(!visible->isChecked());
      emit enableApply();
      }
コード例 #22
0
ファイル: inspector.cpp プロジェクト: hanabokuro/MuseScore
void InspectorElementElement::resetVisibleClicked()
      {
      visible->setChecked(true);
      resetVisible->setEnabled(false);
      emit enableApply();
      }
コード例 #23
0
ファイル: inspector.cpp プロジェクト: hanabokuro/MuseScore
void InspectorElementElement::resetColorClicked()
      {
      color->setColor(MScore::defaultColor);
      resetColor->setEnabled(false);
      emit enableApply();
      }
コード例 #24
0
ファイル: inspector.cpp プロジェクト: hanabokuro/MuseScore
void InspectorNoteBase::mirrorHeadChanged(int)
      {
      resetMirrorHead->setEnabled(note->userMirror() != DH_AUTO);
      emit enableApply();
      }
コード例 #25
0
ファイル: dialogsettings.cpp プロジェクト: rusingineer/quazaa
CDialogSettings::CDialogSettings( QWidget* parent, SettingsPage::settingsPage page ) :
	QDialog( parent ),
	ui( new Ui::CDialogSettings )
{
	ui->setupUi( this );
	ui->comboBoxG2Mode->setView( new QListView() );
	ui->comboBoxOnClose->setView( new QListView() );
	ui->comboBoxQueueLength->setView( new QListView() );
	switchSettingsPage( page );

	newSkinSelected = false;

	// Load Basic Settings
	ui->checkBoxStartWithSystem->setChecked( quazaaSettings.System.StartWithSystem );
	ui->checkBoxConnectOnStart->setChecked( quazaaSettings.System.ConnectOnStartup );
	ui->comboBoxOnClose->setCurrentIndex( quazaaSettings.System.CloseMode );
	ui->checkBoxOnMinimize->setChecked( quazaaSettings.System.MinimizeToTray );
	ui->spinBoxDiskWarn->setValue( quazaaSettings.System.DiskSpaceWarning );
	ui->spinBoxDiskStop->setValue( quazaaSettings.System.DiskSpaceStop );

	// Load Parental Settings
	ui->checkBoxParentalChatFilter->setChecked( quazaaSettings.Parental.ChatAdultCensor );
	ui->checkBoxParentalSearchFilter->setChecked( quazaaSettings.Parental.FilterAdultSearchResults );
	ui->listWidgetParentalFilter->addItems( quazaaSettings.Parental.AdultFilter );

	// Load Library Settings
	ui->checkBoxLibraryRememberViews->setChecked( quazaaSettings.Library.RememberViews );
	ui->checkBoxQuickHashing->setChecked( quazaaSettings.Library.HighPriorityHashing );
	ui->checkBoxDisplayHashingProgress->setChecked( quazaaSettings.Library.HashWindow );
	ui->checkBoxLibraryGhostFiles->setChecked( quazaaSettings.Library.GhostFiles );
	ui->checkBoxVideoSeriesDetection->setChecked( quazaaSettings.Library.SmartSeriesDetection );
	ui->spinBoxFileHistoryRemember->setValue( quazaaSettings.Library.HistoryTotal );
	ui->spinBoxFileHistoryDays->setValue( quazaaSettings.Library.HistoryDays );
	ui->listWidgetFileTypesSafeOpen->addItems( quazaaSettings.Library.SafeExecuteTypes );
	ui->listWidgetFileTypesNeverShare->addItems( quazaaSettings.Library.NeverShareTypes );

	// File Types Settings

	// Load Media Player Settings

	// Load Search Settings
	ui->checkBoxSearchExpandMultiSorce->setChecked( quazaaSettings.Search.ExpandSearchMatches );
	ui->checkBoxSearchSwitchOnDownload->setChecked( quazaaSettings.Search.SwitchOnDownload );
	ui->checkBoxSearchHighlightNewMatches->setChecked( quazaaSettings.Search.HighlightNew );

	// Load Private Messages Settings
	ui->checkBoxPrivateMessagesAres->setChecked( quazaaSettings.PrivateMessages.AresEnable );
	ui->checkBoxPrivateMessagesGnutella->setChecked( quazaaSettings.PrivateMessages.Gnutella2Enable );
	ui->checkBoxPrivateMessagesEDonkey->setChecked( quazaaSettings.PrivateMessages.eDonkeyEnable );
	ui->spinBoxPrivateMessagesIdleMessage->setValue( quazaaSettings.PrivateMessages.AwayMessageIdleTime );
	ui->plainTextEditPrivateMessagesIdleMessage->setPlainText( quazaaSettings.PrivateMessages.AwayMessage );

	// Load Connection Settings
	ui->doubleSpinBoxInSpeed->setValue( ( quazaaSettings.Connection.InSpeed / 1024 ) * 8 );
	ui->doubleSpinBoxOutSpeed->setValue( ( quazaaSettings.Connection.OutSpeed / 1024 ) * 8 );
	ui->spinBoxNetworkPort->setValue( quazaaSettings.Connection.Port );
	ui->checkBoxRandomPort->setChecked( quazaaSettings.Connection.RandomPort );
	ui->spinBoxConnectionTimeout->setValue( quazaaSettings.Connection.TimeoutConnect );

	// Load Web Settings
	ui->checkBoxIntegrationMagnetLinks->setChecked( quazaaSettings.Web.Magnet );
	ui->checkBoxIntegrationAresLinks->setChecked( quazaaSettings.Web.Ares );
	ui->checkBoxIntegrationBitTorrentLinks->setChecked( quazaaSettings.Web.Torrent );
	ui->checkBoxIntegrationPioletLinks->setChecked( quazaaSettings.Web.Piolet );
	ui->checkBoxIntegrationEDonkeyLinks->setChecked( quazaaSettings.Web.ED2K );
	ui->checkBoxManageWebDownloads->setChecked( quazaaSettings.Web.BrowserIntegration );
	ui->listWidgetManageDownloadTypes->addItems( quazaaSettings.Web.ManageDownloadTypes );

	// Load Transfer Settings
	ui->checkBoxOnlyDownloadConnectedNetworks->setChecked( quazaaSettings.Transfers.RequireConnectedNetwork );
	ui->checkBoxSimpleProgress->setChecked( quazaaSettings.Transfers.SimpleProgressBar );

	// Load Download Settings
	ui->checkBoxExpandDownloads->setChecked( quazaaSettings.Downloads.ExpandDownloads );
	ui->lineEditSaveFolder->setText( quazaaSettings.Downloads.CompletePath );
	ui->lineEditTempFolder->setText( quazaaSettings.Downloads.IncompletePath );
	ui->comboBoxQueueLength->setCurrentIndex( quazaaSettings.Downloads.QueueLimit );
	ui->spinBoxMaxFiles->setValue( quazaaSettings.Downloads.MaxFiles );
	ui->spinBoxMaxTransfers->setValue( quazaaSettings.Downloads.MaxTransfers );
	ui->spinBoxTransfersPerFile->setValue( quazaaSettings.Downloads.MaxTransfersPerFile );

	// Load Upload Settings
	ui->checkBoxSharePartials->setChecked( quazaaSettings.Uploads.SharePartials );
	ui->checkBoxSharingLimitHub->setChecked( quazaaSettings.Uploads.HubShareLimiting );
	ui->checkBoxSharePreviews->setChecked( quazaaSettings.Uploads.SharePreviews );
	ui->spinBoxUniqueHostLimit->setValue( quazaaSettings.Uploads.MaxPerHost );

	// Load Security Settings
	ui->checkBoxChatFilterSpam->setChecked( quazaaSettings.Security.ChatFilter );
	ui->checkBoxAllowBrowseProfile->setChecked( quazaaSettings.Security.AllowProfileBrowse );
	ui->checkBoxIrcFloodProtection->setChecked( quazaaSettings.Security.IrcFloodProtection );
	ui->spinBoxChatFloodLimit->setValue( quazaaSettings.Security.IrcFloodLimit );
	ui->checkBoxRemoteEnable->setChecked( quazaaSettings.Security.RemoteEnable );
	ui->lineEditRemoteUserName->setText( quazaaSettings.Security.RemoteUsername );
	ui->lineEditRemotePassword->setText( quazaaSettings.Security.RemotePassword );
	ui->checkBoxIgnoreLocalIP->setChecked( quazaaSettings.Security.IgnorePrivateIP );
	ui->checkBoxEnableUPnP->setChecked( quazaaSettings.Security.EnableUPnP );
	ui->checkBoxAllowBrowseShares->setChecked( quazaaSettings.Security.AllowSharesBrowse );
	ui->listWidgetUserAgents->addItems( quazaaSettings.Security.BlockedAgentUploadFilter );

	// Load Gnutella 2 Settings
	ui->checkBoxConnectG2->setChecked( quazaaSettings.Gnutella2.Enable );
	ui->comboBoxG2Mode->setCurrentIndex( quazaaSettings.Gnutella2.ClientMode );
	ui->spinBoxG2LeafToHub->setValue( quazaaSettings.Gnutella2.NumHubs );
	ui->spinBoxG2HubToLeaf->setValue( quazaaSettings.Gnutella2.NumLeafs );
	ui->spinBoxG2HubToHub->setValue( quazaaSettings.Gnutella2.NumPeers );

	// Load Ares Settings
	ui->checkBoxConnectAres->setChecked( quazaaSettings.Ares.Enable );

	// Load eDonkey 2k Settings
	ui->checkBoxConnectEDonkey->setChecked( quazaaSettings.EDonkey.Enable );
	ui->checkBoxConnectKAD->setChecked( quazaaSettings.EDonkey.EnableKad );
	ui->checkBoxED2kSearchCahedServers->setChecked( quazaaSettings.EDonkey.SearchCachedServers );
	ui->spinBoxED2kMaxResults->setValue( quazaaSettings.EDonkey.MaxResults );
	ui->checkBoxED2kUpdateServerList->setChecked( quazaaSettings.EDonkey.LearnNewServers );
	ui->spinBoxED2kMaxClients->setValue( quazaaSettings.EDonkey.MaxClients );
	ui->checkBoxAutoQueryServerList->setChecked( quazaaSettings.EDonkey.MetAutoQuery );
	ui->lineEditEDonkeyServerListUrl->setText( quazaaSettings.EDonkey.ServerListURL );

	// Load BitTorrent Settings
	ui->checkBoxTorrentSaveDialog->setChecked( quazaaSettings.BitTorrent.UseSaveDialog );
	ui->checkBoxTorrentsStartPaused->setChecked( quazaaSettings.BitTorrent.StartPaused );
	ui->checkBoxTorrentsUseTemp->setChecked( quazaaSettings.BitTorrent.UseTemp );
	ui->checkBoxManagedTorrent->setChecked( quazaaSettings.BitTorrent.Managed );
	ui->checkBoxTorrentsEndgame->setChecked( quazaaSettings.BitTorrent.Endgame );
	ui->spinBoxTorrentsSimultaneous->setValue( quazaaSettings.BitTorrent.DownloadTorrents );
	ui->spinBoxTorrentsClientConnections->setValue( quazaaSettings.BitTorrent.DownloadConnections );
	ui->checkBoxTorrentsClearDownloaded->setChecked( quazaaSettings.BitTorrent.AutoClear );
	ui->spinBoxTorrentsRatioClear->setValue( quazaaSettings.BitTorrent.ClearRatio );
	ui->checkBoxTorrentsPreferTorrent->setChecked( quazaaSettings.BitTorrent.PreferBTSources );
	ui->checkBoxTorrentsUseKademlia->setChecked( quazaaSettings.BitTorrent.UseKademlia );
	ui->lineEditTorrentFolder->setText( quazaaSettings.BitTorrent.TorrentPath );

	// Set Generic Control States
	ui->groupBoxParentalFilter->setVisible( false );
	ui->pushButtonApply->setEnabled( false );

	// System Settings
	connect( ui->checkBoxStartWithSystem, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxConnectOnStart, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->comboBoxOnClose, SIGNAL( currentIndexChanged( int ) ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxOnMinimize, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->spinBoxDiskWarn, SIGNAL( valueChanged( int ) ), this, SLOT( enableApply() ) );
	connect( ui->spinBoxDiskStop, SIGNAL( valueChanged( int ) ), this, SLOT( enableApply() ) );

	// Parental Settings
	connect( ui->checkBoxParentalChatFilter, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxParentalSearchFilter, SIGNAL( clicked() ), this, SLOT( enableApply() ) );

	// Library Settings
	connect( ui->checkBoxLibraryRememberViews, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxQuickHashing, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxDisplayHashingProgress, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxLibraryGhostFiles, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxVideoSeriesDetection, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->spinBoxFileHistoryRemember, SIGNAL( valueChanged( int ) ), this, SLOT( enableApply() ) );
	connect( ui->spinBoxFileHistoryDays, SIGNAL( valueChanged( int ) ), this, SLOT( enableApply() ) );

	// File Types Settings

	// Media Player Settings

	// Search Settings
	connect( ui->checkBoxSearchExpandMultiSorce, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxSearchSwitchOnDownload, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxSearchHighlightNewMatches, SIGNAL( clicked() ), this, SLOT( enableApply() ) );

	// Private Messages Settings
	connect( ui->checkBoxPrivateMessagesAres, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->plainTextEditPrivateMessagesIdleMessage, SIGNAL( textChanged() ), this, SLOT( enableApply() ) );
	connect( ui->spinBoxPrivateMessagesIdleMessage, SIGNAL( valueChanged( int ) ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxPrivateMessagesEDonkey, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxPrivateMessagesGnutella, SIGNAL( clicked() ), this, SLOT( enableApply() ) );

	// Chat Settings
	connect( ui->checkBoxPrivateMessagesGnutella, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->spinBoxPrivateMessagesIdleMessage, SIGNAL( valueChanged( int ) ), this, SLOT( enableApply() ) );

	// Connection Settings
	connect( ui->doubleSpinBoxInSpeed, SIGNAL( valueChanged( double ) ), this, SLOT( enableApply() ) );
	connect( ui->doubleSpinBoxOutSpeed, SIGNAL( valueChanged( double ) ), this, SLOT( enableApply() ) );
	connect( ui->spinBoxNetworkPort, SIGNAL( valueChanged( int ) ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxRandomPort, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->spinBoxConnectionTimeout, SIGNAL( valueChanged( int ) ), this, SLOT( enableApply() ) );

	// Web Settings
	connect( ui->checkBoxIntegrationMagnetLinks, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxIntegrationAresLinks, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxIntegrationBitTorrentLinks, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxIntegrationPioletLinks, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxIntegrationEDonkeyLinks, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxManageWebDownloads, SIGNAL( clicked() ), this, SLOT( enableApply() ) );

	// Transfer Settings
	connect( ui->checkBoxOnlyDownloadConnectedNetworks, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxSimpleProgress, SIGNAL( clicked() ), this, SLOT( enableApply() ) );

	// Download Settings
	connect( ui->checkBoxExpandDownloads, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->lineEditSaveFolder, SIGNAL( textEdited( QString ) ), this, SLOT( enableApply() ) );
	connect( ui->lineEditTempFolder, SIGNAL( textEdited( QString ) ), this, SLOT( enableApply() ) );
	connect( ui->comboBoxQueueLength, SIGNAL( currentIndexChanged( int ) ), this, SLOT( enableApply() ) );
	connect( ui->spinBoxMaxFiles, SIGNAL( valueChanged( int ) ), this, SLOT( enableApply() ) );
	connect( ui->spinBoxMaxTransfers, SIGNAL( valueChanged( int ) ), this, SLOT( enableApply() ) );
	connect( ui->spinBoxTransfersPerFile, SIGNAL( valueChanged( int ) ), this, SLOT( enableApply() ) );

	// Upload Settings
	connect( ui->checkBoxSharePartials, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxSharingLimitHub, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxSharePreviews, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->spinBoxUniqueHostLimit, SIGNAL( valueChanged( int ) ), this, SLOT( enableApply() ) );

	// Security Settings
	connect( ui->checkBoxChatFilterSpam, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxAllowBrowseProfile, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxIrcFloodProtection, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->spinBoxChatFloodLimit, SIGNAL( valueChanged( int ) ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxRemoteEnable, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->lineEditRemoteUserName, SIGNAL( textEdited( QString ) ), this, SLOT( enableApply() ) );
	connect( ui->lineEditRemotePassword, SIGNAL( textEdited( QString ) ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxIgnoreLocalIP, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxEnableUPnP, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxAllowBrowseShares, SIGNAL( clicked() ), this, SLOT( enableApply() ) );

	// Gnutella 2 Settings
	connect( ui->checkBoxConnectG2, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->comboBoxG2Mode, SIGNAL( currentIndexChanged( int ) ), this, SLOT( enableApply() ) );
	connect( ui->spinBoxG2LeafToHub, SIGNAL( valueChanged( int ) ), this, SLOT( enableApply() ) );
	connect( ui->spinBoxG2HubToLeaf, SIGNAL( valueChanged( int ) ), this, SLOT( enableApply() ) );
	connect( ui->spinBoxG2HubToHub, SIGNAL( valueChanged( int ) ), this, SLOT( enableApply() ) );

	// Ares Settings
	connect( ui->checkBoxConnectAres, SIGNAL( clicked() ), this, SLOT( enableApply() ) );

	// eDonkey 2k Settings
	connect( ui->checkBoxConnectEDonkey, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxConnectKAD, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxED2kSearchCahedServers, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->spinBoxED2kMaxResults, SIGNAL( valueChanged( int ) ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxED2kUpdateServerList, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->spinBoxED2kMaxClients, SIGNAL( valueChanged( int ) ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxAutoQueryServerList, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->lineEditEDonkeyServerListUrl, SIGNAL( textEdited( QString ) ), this, SLOT( enableApply() ) );

	// BitTorrent Settings
	connect( ui->checkBoxTorrentSaveDialog, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxTorrentsStartPaused, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxTorrentsUseTemp, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxManagedTorrent, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxTorrentsEndgame, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->spinBoxTorrentsSimultaneous, SIGNAL( valueChanged( int ) ), this, SLOT( enableApply() ) );
	connect( ui->spinBoxTorrentsClientConnections, SIGNAL( valueChanged( int ) ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxTorrentsClearDownloaded, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->spinBoxTorrentsRatioClear, SIGNAL( valueChanged( int ) ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxTorrentsPreferTorrent, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->checkBoxTorrentsUseKademlia, SIGNAL( clicked() ), this, SLOT( enableApply() ) );
	connect( ui->lineEditTorrentFolder, SIGNAL( textEdited( QString ) ), this, SLOT( enableApply() ) );
	setSkin();
}
コード例 #26
0
ファイル: inspector.cpp プロジェクト: hanabokuro/MuseScore
void InspectorElementElement::colorChanged(QColor)
      {
      resetColor->setEnabled(color->color() != MScore::defaultColor);
      emit enableApply();
      }