Esempio n. 1
0
		ShortcutDialog::ShortcutDialog(QWidget* parent, const char* name, Qt::WFlags)
			: QWidget(parent),
				Ui_ShortcutDialogData(),
				ModularWidget(name),
				PreferencesEntry()
		{
			// apply the dialogs layout
			setupUi(this);

			// define the dialogs section name in the INIFile
			setINIFileSectionName("BALLVIEWSHORTCUTS");

			setObjectName(name);

			// defines the dialogs Entry name
			setWidgetStackName(String(tr("Shortcuts")));

			registerWidgets_();

			//The shortcut registry has should be saved along with the other options for shortcuts
			registerObject_(ShortcutRegistry::getInstance(0));

			//The search should not be stored from session to session
			unregisterObject_(searchEdit);

			//TODO
			//registerWidgetForHelpSystem_(widget_stack->widget(0), "shortcuts.html#shortcuts");
			hide();

			connect(browse_export_button, SIGNAL(clicked()), this, SLOT(browseExportFile_()));
			connect(browse_import_button, SIGNAL(clicked()), this, SLOT(browseImportFile_()));
			connect(tableView, SIGNAL(shortcutChanged()), this, SLOT(shortcutChanged_()));
		}
Esempio n. 2
0
		BALLaxyInterfacePreferences::BALLaxyInterfacePreferences(QWidget* parent, const char* name, Qt::WindowFlags fl)
			: ConfigDialog(parent, fl),
			  Ui_BALLaxyInterfacePreferencesData()
				
		{
			setupUi(this);
			setObjectName(name);
			setINIFileSectionName("BALLAXYPlugin");
			setWidgetStackName((String)tr("BALLaxyInterface"));

			registerWidgets_();
		}
Esempio n. 3
0
		PresentaBALLSettings::PresentaBALLSettings(HTMLBasedInterface* parent, const char* name, Qt::WFlags fl)
			: ConfigDialog(parent, fl),
			  Ui_PresentaBALLSettingsData(),
				html_interface_(parent)
		{
			setupUi(this);
			setObjectName(name);
			setWidgetStackName((String)tr("PresentaBALL"));
			setINIFileSectionName("PresentaBALL_PLUGIN");
			registerWidgets_();

			connect(browse_button, SIGNAL(clicked()), this, SLOT(selectIndexHTMLLocation()));
		}
Esempio n. 4
0
		/*
		 * Implementation of PluginDialog
		 */
		PluginDialog::PluginDialog(Preferences* preferences, QWidget* parent, const char* name)
			: QWidget(parent),
			  ModularWidget(name),
			  preferences_(preferences)
		{
			ui_ = new Ui::PluginDialogData;
			ui_->setupUi(this);

			// define the dialogs section name in the INIFile
			setINIFileSectionName("PLUGINS");
			stack_pages_.push_back(std::make_pair(this, tr("Plugins").toStdString()));

			preferences_->insertEntry(this);

			setObjectName(name);

			IconLoader& icon_loader = IconLoader::instance();

			ui_->plugin_dir_button_add->setIcon(icon_loader.getIcon("actions/list-add"));
			ui_->plugin_dir_button_remove->setIcon(icon_loader.getIcon("actions/edit-delete"));

			// register all visible childs
			registerWidgets_();

			//TODO
			//registerWidgetForHelpSystem_(widget_stack->widget(0), "plugins.html#plugins");

			ui_->plugin_view->setModel(&plugin_model_);
			ui_->plugin_directories_view->setModel(&plugin_dir_model_);

//			QString plugin_path(BALL_PATH);
//			plugin_path += "/plugins";
			QString plugin_path(QLibraryInfo::location(QLibraryInfo::PluginsPath));

			plugin_dir_model_.addDirectory(plugin_path);
			plugin_model_.pluginsLoaded();

			setObjectName(name);
			ModularWidget::registerWidget(this);

			connect(ui_->plugin_dir_button_add, SIGNAL(clicked()), this, SLOT(addPluginDirectory()));
			connect(ui_->plugin_dir_button_remove, SIGNAL(clicked()), this, SLOT(removePluginDirectory()));
			connect(ui_->plugin_directories_view, SIGNAL(activated(const QModelIndex&)), this, SLOT(directorySelectionChanged(const QModelIndex& )));
		}
Esempio n. 5
0
		ServerPreferences::ServerPreferences(QWidget* parent, const char* name)
			: QWidget(parent),
				PreferencesEntry()
		{
			setObjectName(name);
			QLabel* port_label = new QLabel(this);
			port_label->setGeometry(30, 20, 100, 27);
			port_label->setFocusPolicy(Qt::NoFocus);
			port_label->setFrameStyle(0);
			port_label->setLineWidth(1);
			port_label->setMidLineWidth(0);
			port_label->setText(tr("server port"));
			port_label->setMargin(0);
			
			port_ = new QLineEdit(this);
			port_->setObjectName("port");
			port_->setGeometry(180, 20, 90, 30);
			port_->setFocusPolicy(Qt::StrongFocus);
			port_->setMaxLength(5);
			port_->setFrame(QLineEdit::Normal);
			port_->setFrame(true);
			port_->setAlignment(Qt::AlignRight);
			
			server_status_ = new QCheckBox(this);
			server_status_->setObjectName("server_status");
			server_status_->setGeometry(40, 80, 180, 21);
			server_status_->setFocusPolicy(Qt::TabFocus);
			server_status_->setText(tr("accept clients"));
			server_status_->setAutoRepeat(false);
			
			resize(380,210);
			setMinimumSize(0, 0);
			setMaximumSize(32767, 32767);

			port_->setText(String(VIEW_DEFAULT_PORT).c_str());
			server_status_->setChecked(false);
			
			setINIFileSectionName("NETWORK");
			setWidgetStackName((String)tr("Client/Server"));
			registerWidgets_();
		}
Esempio n. 6
0
// =============================================================
PythonSettings::PythonSettings(QWidget* parent, const char* name)
 : QWidget(parent),
	 Ui_PythonSettingsData(),
	 PreferencesEntry()
{
	setINIFileSectionName("PYTHON");
	setupUi(this);
	setObjectName(name);
	
	// signals and slots connections
	connect( choose_button, SIGNAL( clicked() ), this, SLOT( fileSelected() ) );
	connect( clear_button, SIGNAL( clicked() ), this, SLOT( clearStartupScript() ) );
	connect( font_button, SIGNAL( clicked() ), this, SLOT( selectFont() ) );

	connect(new_button, SIGNAL(pressed()), table, SLOT(addEmptyRow()));
	connect(remove_button, SIGNAL(pressed()), table, SLOT(removeSelection()));

	registerWidgetForHelpSystem_(widget_stack->widget(0), "pythonInterpreter.html#startup_script");
	registerWidgetForHelpSystem_(widget_stack->widget(1), "pythonInterpreter.html#create_hotkeys");

	setWidgetStackName("Python");
	setWidgetStack(widget_stack);
	registerWidgets_();
}