Esempio n. 1
0
void MainWindow::on_actionSettings_triggered()
{
    SettingsDialog *dia = new SettingsDialog(m_hostName, m_port, m_font, m_Pallette, this);
    if(dia->exec()){
        loadSettingFromIni();
    }
}
Esempio n. 2
0
void MainWindow::showSettings()
{
    SettingsDialog dialog;
    dialog.setFilterModel(m_proxyModel);

    dialog.exec();
}
Esempio n. 3
0
void FirstWindow::on_settingsButton_clicked()
{
    SettingsDialog dialog;
    connect( &dialog, SIGNAL( signalSetSettings( Settings ) ),
             this, SLOT( slotSetSettings( Settings ) ) );
    dialog.exec();
}
Esempio n. 4
0
MainDialogImpl::MainDialogImpl( QWidget * parent, Qt::WFlags f)
        : QDialog(parent, f)
{
	tray = new TrayMenu(this);
	connect(tray,SIGNAL(exitClicked(bool)),
		this,SLOT(exitClicked(bool)));


	QSettings settings;

	if(settings.value("first_launch",true).toBool())
	{
		SettingsDialog form;
		form.setModal(true);
		form.exec();

	}
	
	io = new RTorrentIO(0,
		settings.value("host","localhost").toString(),
		settings.value("port",80).toInt(),
		settings.value("path","/RPC2").toString());

	if(io)
	{
		connect(io,SIGNAL(started()),
			this,SLOT(init_client()));
		io->start();
	}else
		tray->disconnected();

}
void MainWindow::on_actionSettings_triggered()
{
    SettingsDialog dialog;
    dialog.setModal( true );
    connect( &dialog, SIGNAL( signalSetSettings( QString, QString) ),
             this, SLOT( slotSetSettings(QString, QString ) ) );
    dialog.exec();
}
Esempio n. 6
0
void MainWindow::showPreferences()
{
    SettingsDialog dialog;
    if(dialog.exec() == QDialog::Accepted) {
        scrollbackSize=Settings::getScrollbackSize();
        onValueChanged();
    }
}
Esempio n. 7
0
void MainWindow::onGeneralSettings()
{
    SettingsDialog *sDlg = new SettingsDialog(configHelper, this);
    connect(sDlg, &SettingsDialog::finished,
            sDlg, &SettingsDialog::deleteLater);
    if (sDlg->exec()) {
        configHelper->save(*model);
    }
}
Esempio n. 8
0
void MainWindow::openSettingsDialog()
{
    // Show preferences dialog
    SettingsDialog *settingsDlg = new SettingsDialog(this);
    connect(settingsDlg, &SettingsDialog::accepted,
            this, &MainWindow::settingsAccepted);
    connect(settingsDlg, &SettingsDialog::accepted,
            this, &MainWindow::settingsDialogAccepted);
    settingsDlg->exec();
}
Esempio n. 9
0
void TagEditor::showSettings(){

    SettingsDialog s;
    if( s.exec()==QDialog::Accepted ){
        //obtain newly saved data from settingsdialog
        extensions = guiSettings->value("extensions","").toStringList();
        //api_key = guiSettings->value("api_key","").toString();
        subfolders = guiSettings->value("subfolders",true).toBool();
    }

}
Esempio n. 10
0
void HaveClip::showSettings()
{
	SettingsDialog *dlg = new SettingsDialog(manager->connectionManager());

	if(dlg->exec() == QDialog::Accepted)
	{
		dlg->apply();

		Settings::get()->save();
	}

	dlg->deleteLater();
}
Esempio n. 11
0
void MainDialog::showOptions()
{
	LOG_5("MWIN: Showing settings dialog");
	SettingsDialog * settings = new SettingsDialog(this);
	// Exec for a modal dialog
	int result = settings->exec();
	
	if( result == QDialog::Accepted ){
		LOG_5("MWIN: Applying new settings");
		settings->applyChanges();	// Apply the changes to 'config'
		readConfig();				// Read the values from 'config'
	}
	delete settings;
}
Esempio n. 12
0
void MainWindow::on_actionSettings_triggered()
{
	if (state == STATE_RUNNING) mode_switch();
	SettingsDialog* dialog = new SettingsDialog(this);
	dialog->dropPreview = dropPreview;
	dialog->interval = interval;
	dialog->init_settings();
	dialog->setModal(true);
	dialog->exec();
	dropPreview = dialog->dropPreview;
	interval = dialog->interval;
	qDebug() << "dropPreview:" << dropPreview;
	qDebug() << "interval:" << interval;
	refreshSettings(true);
}
Esempio n. 13
0
void MainWindowImpl::OnSettings(void)
{
	SettingsDialog settings;
	settings.Set(m_Settings);
	if( settings.exec() == QDialog::Accepted )
	{
		//update our settings from the dialog.
		settings.Get(m_Settings);
		
		//We may have changed the screensaver supression
		ScreensaverPoke( m_Settings.PokeScreensaver);
		
		//We may have changed visualization
		m_AudioInterface.SetVisualization(m_Settings.VisualizationName,
											Visualization->winId(),true,
											m_Settings.UseXvimagesink );
	}
}
Esempio n. 14
0
void MainWindow::on_actionSettings_triggered()
{
    SettingsDialog* settingsDlg = new SettingsDialog(this);

    if(settingsDlg)
    {
        settingsDlg->setUseCustomJavaPath(m_useCustomJavaPath);
        settingsDlg->setCustomJavaPath(m_customJavaPath);
        settingsDlg->setMinecraftServerPath(m_mcServerPath);
        settingsDlg->setXms(m_xms);
        settingsDlg->setXmx(m_xmx);
        settingsDlg->setAdditionalParameters(m_additionalParameters);

        settingsDlg->initialize();

        if(settingsDlg->exec() == QDialog::Accepted)
        {
            updateWatchedFileSystemPath( getMinecraftServerPropertiesPath(m_mcServerPath),
                                         getMinecraftServerPropertiesPath(settingsDlg->getMinecraftServerPath()));

            updateWatchedDirSystemPath( getMinecraftServerWorkingDirectoryPath(m_mcServerPath),
                                        getMinecraftServerWorkingDirectoryPath(settingsDlg->getMinecraftServerPath()));

            m_mcServerPath = settingsDlg->getMinecraftServerPath();
            m_customJavaPath = settingsDlg->getCustomJavaPath();
            m_useCustomJavaPath = settingsDlg->useCustomJavaPath();
            m_xms = settingsDlg->getXms();
            m_xmx = settingsDlg->getXmx();
            m_additionalParameters = settingsDlg->getAdditionalParameters();

            loadServerProperties();
        }

        delete settingsDlg;
        settingsDlg = 0;
    }
}
Esempio n. 15
0
void showSettings() {
    SettingsDialog diag;
    diag.exec();
}
Esempio n. 16
0
void TrayMenu::openSettings(bool){
	SettingsDialog * form = new SettingsDialog();
	if(form->exec() == QDialog::Accepted)
		QApplication::exit();
	delete form;
}
Esempio n. 17
0
void MainWindow::on_actionPreferences_triggered()
{
    SettingsDialog sd;
    sd.exec();
}
Esempio n. 18
0
void MainWindow::on_toolButton_clicked()
{
    SettingsDialog settings;
    settings.exec();
}
Esempio n. 19
0
void MainWindow::openSettingsForm()
{
    SettingsDialog *diag = new SettingsDialog();
    connect(diag,SIGNAL(settingsChanged()),monitor,SLOT(onReloadSettings()));
    diag->exec();
}
Esempio n. 20
0
void MainWindow::on_actionSettings_triggered()
{
	SettingsDialog dialog ( this );
	dialog.exec();
}
void mepp_component_Canonical_plugin::ValenceDrivenSimplification()
{
	// active viewer
	if (mw->activeMdiChild() != 0)
	{
		Viewer* viewer = (Viewer *)mw->activeMdiChild();
		PolyhedronPtr polyhedron_ptr = viewer->getScenePtr()->get_polyhedron();

		Canonical_ComponentPtr component_ptr = findOrCreateComponentForViewer<Canonical_ComponentPtr, Canonical_Component>(viewer, polyhedron_ptr);

		polyhedron_ptr->normalize_border();
		if(polyhedron_ptr->size_of_border_edges() != 0)
		{
			/*(void)wxMessageBox(_T("Simplification not possible\n\n")
				_T("The mesh owns border edges")

				   );*/
			QMessageBox::information(mw, APPLICATION, tr("Simplification not possible: the mesh owns border edges."));
			return;
		}
		
		if(polyhedron_ptr->is_pure_triangle() == false)
		{
			/*(void)wxMessageBox(_T("Simplification not possible\n\n")
				_T("The mesh is not triangular")

				   );*/
			QMessageBox::information(mw, APPLICATION, tr("Simplification not possible: the mesh is not triangular."));
			return;
		}

		//MyDialog3 dial(m_frame);

		bool Normal_Flipping = false;
		bool Use_Metric = false;
		bool Use_forget_metric = false;

		unsigned int Number_Vertices = 0;
		int Forget_Value = 0;
		float Metric_threshold = 0.0;

		/*char NVerticesChar[256];
		char MValue[256];
		char FValue[256];*/

		SettingsDialog dial;
		if (dial.exec() == QDialog::Accepted)
		{
			QApplication::setOverrideCursor(Qt::WaitCursor);

			Normal_Flipping = dial.normal_flipping->isChecked();//dial.m_normal_flipping->GetValue();

			Use_Metric = dial.useMetric->isChecked();//dial.m_use_metric->GetValue();

			//strcpy(NVerticesChar,dial.m_number_vertices->GetValue().ToAscii());
			Number_Vertices = dial.number_vertices->value();//atoi(NVerticesChar);

			if (Use_Metric == true)
			{
				//strcpy(MValue,dial.m_metric_value->GetValue().ToAscii());
				Metric_threshold = dial.metric_value->value();//atof(MValue);

				Use_forget_metric = dial.forgetMetric->isChecked();//dial.m_forget_metric->GetValue();
				if (Use_forget_metric == true)
				{
					//strcpy(FValue,dial.m_forget_metric_value->GetValue().ToAscii());
					Forget_Value = dial.forget_metric_value->value();//atoi(FValue);
				}
			}
			int Number_Of_Vertices1 = polyhedron_ptr->size_of_vertices();
			int Number_Of_Vertices2 = polyhedron_ptr->size_of_vertices();

			while(polyhedron_ptr->size_of_vertices() > Number_Vertices)
			{
				Number_Of_Vertices1 = polyhedron_ptr->size_of_vertices();

				component_ptr->Decimation_Conquest(polyhedron_ptr,Normal_Flipping,Use_Metric,Metric_threshold,
					Use_forget_metric,Forget_Value);
				component_ptr->Regulation(polyhedron_ptr,Normal_Flipping,Use_Metric,Metric_threshold,
					Use_forget_metric,Forget_Value);

				Number_Of_Vertices2 = polyhedron_ptr->size_of_vertices();
				if (Number_Of_Vertices1 == Number_Of_Vertices2)
					break;
			}

			/*m_frame->update_mesh_properties();
			m_frame->Refresh();
			m_frame->set_status_message(_T("Simplification is done"));*/
			mw->statusBar()->showMessage(tr("Simplification is done"));

			viewer->recreateListsAndUpdateGL();

		}
	}

	QApplication::restoreOverrideCursor();
}
Esempio n. 22
0
void
TomahawkWindow::showSettingsDialog()
{
    SettingsDialog win;
    win.exec();
}