// set the reference chart
void
QTACFunctions::setReferenceChart (void *chart)
{
  referencechart = chart;
  parentchart = (QTAChart *) chart; 
  createButtons ();
}
void	PhysicsClientExample::initPhysics()
{
	if (m_guiHelper && m_guiHelper->getParameterInterface())
	{
		int upAxis = 2;
		m_guiHelper->setUpAxis(upAxis);

		createButtons();		
		
	} else
	{
        MyCallback(CMD_LOAD_URDF, true, this);
        MyCallback(CMD_STEP_FORWARD_SIMULATION,true,this);
        MyCallback(CMD_STEP_FORWARD_SIMULATION,true,this);
        MyCallback(CMD_RESET_SIMULATION,true,this);
	}

	m_selectedBody = -1;
	m_prevSelectedBody = -1;

    m_physicsClientHandle  = b3ConnectSharedMemory(m_sharedMemoryKey);
	//m_physicsClientHandle  = b3ConnectPhysicsLoopback(SHARED_MEMORY_KEY);
	//m_physicsClientHandle = b3ConnectPhysicsDirect();

    if (!b3CanSubmitCommand(m_physicsClientHandle))
    {
		b3Warning("Cannot connect to physics client");
	}

}
Beispiel #3
0
int Lobby::runScene(){
	RenderManager::getRenderManager()->setBackground("Lobby_bg.png");

	// number of players in lobby
	createPlayerCount();

	// creating buttons
	createButtons();
	createClassButts();
	createSlots();

	
	while (true){
		updateLobby();
		checkButtons();
		changePlayerSelectionImage();
		// try to start the game if everyone is ready
		if (numPlayers == numPlayersReady) {
			NetworkManager::sInstance->TryReadyGame();
		}
		// start the game
		if (NetworkManager::sInstance->GetState() >= NetworkManager::NMS_Starting){
			removeAllButtons();
			SceneManager::GetSceneManager()->AssembleScene();
			return SCENE_GAME;
		}
	}
}
Beispiel #4
0
void Sis3350UI::createUI()
{
    QGridLayout* l = new QGridLayout;
    QGridLayout* boxL = new QGridLayout;

    QGroupBox* box = new QGroupBox;
    box->setTitle(name + " Settings");

    // Module specific code here

    QWidget* buttons = createButtons();
    QWidget* tabs = createTabs();

    boxL->addWidget(buttons,0,0,1,1);
    boxL->addWidget(tabs,1,0,1,1);

    viewport = new Viewport(0,module->rblt_data,4,module->conf.sample_length);
    viewport->setWindowTitle(tr("sis3350 Preview"));

    // End

    l->addWidget(box,0,0,1,1);
    box->setLayout(boxL);
    this->setLayout(l);
}
Beispiel #5
0
	ParticleEditor::ParticleEditor () :
		_widget(gtk_window_new(GTK_WINDOW_TOPLEVEL))
	{
		// Window properties
		gtk_window_set_transient_for(GTK_WINDOW(_widget), GlobalRadiant().getMainWindow());
		gtk_window_set_modal(GTK_WINDOW(_widget), TRUE);
		gtk_window_set_title(GTK_WINDOW(_widget), PARTICLEEDITOR_TITLE);
		gtk_window_set_position(GTK_WINDOW(_widget), GTK_WIN_POS_CENTER_ON_PARENT);

		// Set the default size of the window
		GdkScreen* scr = gtk_window_get_screen(GTK_WINDOW(_widget));
		gint w = gdk_screen_get_width(scr);
		gint h = gdk_screen_get_height(scr);

		gtk_window_set_default_size(GTK_WINDOW(_widget), gint(w * 0.75), gint(h * 0.8));

		// Create the model preview widget
		gint glSize = gint(h * 0.4);
		_particlePreview.setSize(glSize);

		// Signals
		//g_signal_connect(G_OBJECT(_widget), "delete_event", G_CALLBACK(callbackHide), this);

		// Main window contains a VBox
		GtkWidget* vbx = gtk_vbox_new(FALSE, 3);
		gtk_box_pack_start(GTK_BOX(vbx), createPreviewPanel(), FALSE, FALSE, 0);
		gtk_box_pack_end(GTK_BOX(vbx), createButtons(), FALSE, FALSE, 0);
		gtk_container_add(GTK_CONTAINER(_widget), vbx);
	}
DiagnoseBrowser::DiagnoseBrowser(QWidget* parent) : QDialog(parent)
{
	diagnoseModel = new QSqlTableModel(this);
	diagnoseModel->setTable("diagnoses");
	diagnoseModel->setSort(DiagnoseName, Qt::AscendingOrder);
	diagnoseModel->select();

	diagnoseView = new QTableView();
	diagnoseView->setModel(diagnoseModel);
	diagnoseView->setSelectionMode(QAbstractItemView::SingleSelection);
	diagnoseView->setSelectionBehavior(QAbstractItemView::SelectRows);
	diagnoseView->setShowGrid(false);
	diagnoseView->horizontalHeader()->setStretchLastSection(true);


	createButtons();

	QHBoxLayout* buttonLayout = new QHBoxLayout();
	buttonLayout->addWidget(newButton);
	buttonLayout->addWidget(deleteButton);

	QVBoxLayout* layout = new QVBoxLayout();
	layout->addWidget(diagnoseView);
	layout->addLayout(buttonLayout);

	setLayout(layout);
	setFixedHeight(sizeHint().height());
	setWindowTitle(tr("Diagnosen Browser"));

	connect(newButton, SIGNAL(clicked()), this, SLOT(newDiagnose()));
	connect(deleteButton, SIGNAL(clicked()), this, SLOT(deleteDiagnose()));
}
Beispiel #7
0
	LightDialog::LightDialog () :
		_widget(gtk_window_new(GTK_WINDOW_TOPLEVEL)), _aborted(false)
	{
		// Set up the window
		gtk_window_set_transient_for(GTK_WINDOW(_widget), GlobalRadiant().getMainWindow());
		gtk_window_set_modal(GTK_WINDOW(_widget), TRUE);
		gtk_window_set_title(GTK_WINDOW(_widget), _("Create light entity"));
		gtk_window_set_position(GTK_WINDOW(_widget), GTK_WIN_POS_CENTER_ON_PARENT);
		gtk_window_set_type_hint(GTK_WINDOW(_widget), GDK_WINDOW_TYPE_HINT_DIALOG);

		// Set the default size of the window
		gtk_window_set_default_size(GTK_WINDOW(_widget), 300, 300);

		// Delete event
		g_signal_connect(
				G_OBJECT(_widget), "delete-event", G_CALLBACK(_onDelete), this
		);

		// Main vbox
		GtkWidget* vbx = gtk_vbox_new(FALSE, 12);
		gtk_box_pack_start(GTK_BOX(vbx), gtkutil::FramedWidget(createColorSelector(), _("Light Color")), TRUE, TRUE, 0);
		gtk_box_pack_start(GTK_BOX(vbx), gtkutil::FramedWidget(createIntensity(), _("Light Intensity")), FALSE, FALSE, 0);
		gtk_box_pack_start(GTK_BOX(vbx), createButtons(), FALSE, FALSE, 0);

		gtk_container_set_border_width(GTK_CONTAINER(_widget), 12);
		gtk_container_add(GTK_CONTAINER(_widget), vbx);

		_intensityEntry.setValue(_defaultIntensity);
	}
Beispiel #8
0
void Sidebar_Widget::updateButtons()
{
	//PARSE ALL DESKTOP FILES
	m_openViews = m_visibleViews;

	if (m_buttons.count() > 0)
	{
		for (uint i = 0; i < m_buttons.count(); i++)
		{
			ButtonInfo *button = m_buttons.at(i);
			if (button->dock)
			{
				m_noUpdate = true;
				if (button->dock->isVisibleTo(this)) {
					showHidePage(i);
				}

				delete button->module;
				delete button->dock;
			}
			m_buttonBar->removeTab(i);

		}
	}
	m_buttons.clear();

	readConfig();
	doLayout();
	createButtons();
}
void ConversationDialog::populateWindow()
{
	// Create the overall vbox
	_dialogVBox = Gtk::manage(new Gtk::VBox(false, 12));
	add(*_dialogVBox);

	_dialogVBox->pack_start(
		*Gtk::manage(new gtkutil::LeftAlignedLabel(std::string("<b>") + _("Conversation entities") + "</b>")),
		false, false, 0);

	_dialogVBox->pack_start(
		*Gtk::manage(new gtkutil::LeftAlignment(createEntitiesPanel(), 18, 1.0)),
		false, false, 0);

	_dialogVBox->pack_start(
		*Gtk::manage(new gtkutil::LeftAlignedLabel(std::string("<b>") + _("Conversations") + "</b>")),
		false, false, 0);

	_dialogVBox->pack_start(
		*Gtk::manage(new gtkutil::LeftAlignment(createConversationsPanel(), 18, 1.0)),
		true, true, 0);

	// Pack in dialog buttons
	_dialogVBox->pack_start(createButtons(), false, false, 0);
}
	void ActionChoiceWindow::createButtons(
		ActionNode* actions, const CEGUI::Point& center, 
		float radius, float angle, float angleWidth)
	{
		PushButton* button = NULL;

		if (actions->isLeaf())
		{
			button = createButton(actions->getAction()->getName(), center);
		}
		else
		{
			if (actions->getGroup() != NULL)
			{
				button = createButton(actions->getGroup()->getName(), center);
			}
			
            const NodeSet children = actions->getChildren();
			float angleStep = angleWidth / (float)children.size();
			float ang = children.size()>1 ? angle - angleWidth : angle - 180;
			for (NodeSet::const_iterator iter = children.begin(); 
				iter != children.end(); iter++)
			{
				CEGUI::Point centerChild = getPositionOnCircle(center, radius, ang);
				createButtons(*iter, centerChild, radius, ang, 60);
				ang += angleStep;
			}
		}

		actions->setButton(button);
		if (button != NULL)
			mWindow->addChildWindow(button);		
	}
Beispiel #11
0
void EClassTree::populateWindow() {
	// Create the overall vbox
	_dialogVBox = gtk_vbox_new(FALSE, 12);
	gtk_container_add(GTK_CONTAINER(getWindow()), _dialogVBox);
	
	GtkWidget* paned = gtk_hpaned_new();
	gtk_box_pack_start(GTK_BOX(_dialogVBox), paned, TRUE, TRUE, 0);
	
	// Pack tree view
	gtk_paned_add1(GTK_PANED(paned), createEClassTreeView());
	
	// Pack spawnarg treeview
	gtk_paned_add2(GTK_PANED(paned), GTK_WIDGET(createPropertyTreeView()));
	
	// Pack in dialog buttons
	gtk_box_pack_start(GTK_BOX(_dialogVBox), createButtons(), FALSE, FALSE, 0);
	
	// Set the default size of the window
	GtkWindow* mainWindow = GlobalMainFrame().getTopLevelWindow();
	GdkRectangle rect = gtkutil::MultiMonitor::getMonitorForWindow(mainWindow);
	gtk_window_set_default_size(
		GTK_WINDOW(getWindow()), gint(rect.width * 0.8f), gint(rect.height * 0.8f)
	);

	gtk_paned_set_position(GTK_PANED(paned), static_cast<gint>(rect.width * 0.25f));
}
// Construct the dialog
ShaderChooser::ShaderChooser(wxWindow* parent, wxTextCtrl* targetEntry) :
	wxutil::DialogBase(_(LABEL_TITLE), parent),
	_targetEntry(targetEntry),
	_selector(NULL)
{
	// Create a default panel to this dialog
	wxPanel* mainPanel = new wxPanel(this, wxID_ANY);
	mainPanel->SetSizer(new wxBoxSizer(wxVERTICAL));

	wxBoxSizer* dialogVBox = new wxBoxSizer(wxVERTICAL);
	mainPanel->GetSizer()->Add(dialogVBox, 1, wxEXPAND | wxALL, 12);

	_selector = new ShaderSelector(mainPanel, this, SHADER_PREFIXES);

	if (_targetEntry != NULL)
	{
		_initialShader = targetEntry->GetValue();

		// Set the cursor of the tree view to the currently selected shader
		_selector->setSelection(_initialShader);
	}

	// Pack in the ShaderSelector and buttons panel
	dialogVBox->Add(_selector, 1, wxEXPAND);

	createButtons(mainPanel, dialogVBox);

	// Connect the window position tracker
	_windowPosition.loadFromPath(RKEY_WINDOW_STATE);

	_windowPosition.connect(this);
	_windowPosition.applyPosition();
}
void	PhysicsClientExample::initPhysics()
{
	if (m_guiHelper && m_guiHelper->getParameterInterface())
	{
		int upAxis = 2;
		m_guiHelper->setUpAxis(upAxis);

		createButtons();		
		
	} else
	{
		/*
		m_userCommandRequests.push_back(CMD_LOAD_URDF);
		m_userCommandRequests.push_back(CMD_REQUEST_ACTUAL_STATE);
		m_userCommandRequests.push_back(CMD_SEND_DESIRED_STATE);
		m_userCommandRequests.push_back(CMD_REQUEST_ACTUAL_STATE);
		//m_userCommandRequests.push_back(CMD_SET_JOINT_FEEDBACK);
		m_userCommandRequests.push_back(CMD_CREATE_BOX_COLLISION_SHAPE);
		//m_userCommandRequests.push_back(CMD_CREATE_RIGID_BODY);
		m_userCommandRequests.push_back(CMD_STEP_FORWARD_SIMULATION);
		m_userCommandRequests.push_back(CMD_REQUEST_ACTUAL_STATE);
		m_userCommandRequests.push_back(CMD_SHUTDOWN);
		*/

	}

	if (!m_physicsClient.connect())
	{
		b3Warning("Cannot connect to physics client");
	}

}
Beispiel #14
0
	ModelSelector::ModelSelector () :
		_widget(gtk_window_new(GTK_WINDOW_TOPLEVEL)), _treeStore(gtk_tree_store_new(N_COLUMNS, G_TYPE_STRING,
				G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT, GDK_TYPE_PIXBUF)), _infoStore(gtk_list_store_new(2,
				G_TYPE_STRING, G_TYPE_STRING)), _lastModel(""), _lastSkin(-1)
	{
		// Window properties
		gtk_window_set_transient_for(GTK_WINDOW(_widget), GlobalRadiant().getMainWindow());
		gtk_window_set_modal(GTK_WINDOW(_widget), TRUE);
		gtk_window_set_title(GTK_WINDOW(_widget), MODELSELECTOR_TITLE);
		gtk_window_set_position(GTK_WINDOW(_widget), GTK_WIN_POS_CENTER_ON_PARENT);

		// Set the default size of the window
		GtkWindow* mainWindow = GlobalRadiant().getMainWindow();
		gint w;
		gint h;
		gtk_window_get_size(mainWindow,&w,&h);

		gtk_window_set_default_size(GTK_WINDOW(_widget), gint(w * 0.75), gint(h * 0.8));

		// Create the model preview widget
		float previewHeightFactor = GlobalRegistry().getFloat("user/ui/ModelSelector/previewSizeFactor");
		gint glSize = gint(h * previewHeightFactor);
		_modelPreview.setSize(glSize);

		// Signals
		g_signal_connect(G_OBJECT(_widget), "delete_event", G_CALLBACK(callbackHide), this);

		// Main window contains a VBox
		GtkWidget* vbx = gtk_vbox_new(FALSE, 3);
		gtk_box_pack_start(GTK_BOX(vbx), createTreeView(), TRUE, TRUE, 0);
		gtk_box_pack_start(GTK_BOX(vbx), createPreviewAndInfoPanel(), FALSE, FALSE, 0);
		gtk_box_pack_end(GTK_BOX(vbx), createButtons(), FALSE, FALSE, 0);
		gtk_container_add(GTK_CONTAINER(_widget), vbx);
	}
Beispiel #15
0
void
XFE_TaskBar::createFloatingWidgets(Widget parent)
{
	XP_ASSERT( XfeIsAlive(parent) );

	unsigned char	orientation = 
		fe_globalPrefs.task_bar_horizontal ? XmHORIZONTAL : XmVERTICAL;
	
	// Create the floating task bar
	m_widget = XtVaCreateWidget(FLOATING_TASK_BAR_NAME,
								xfeTaskBarWidgetClass,
								parent,
								XmNorientation,			orientation,
								XmNusePreferredWidth,	True,
								XmNusePreferredHeight,	True,
								NULL);

	// Create floating buttons
	createButtons(m_floatingSpec);

	// Show both label and pixmap for floating tools
	XtVaSetValues(m_widget,XmNbuttonLayout,XmBUTTON_LABEL_ON_BOTTOM,NULL);

	// Update the floating appearance for the first time
	updateFloatingAppearance();
 
	// Update the icons layout when needed
    XFE_MozillaApp::theApp()->registerInterest(
		XFE_MozillaApp::updateToolbarAppearance,
		this,
		(XFE_FunctionNotification)updateIconAppearance_cb);
}
Beispiel #16
0
void MapInfoDialog::populateWindow() {
	// Create the vbox containing the notebook and the buttons
	GtkWidget* dialogVBox = gtk_vbox_new(FALSE, 6);

	// Create the tabs
	_notebook = GTK_NOTEBOOK(gtk_notebook_new());

	// Entity Info
	gtk_notebook_append_page(
		_notebook, 
		_entityInfo.getWidget(), 
		createTabLabel(_entityInfo.getLabel(), _entityInfo.getIconName())
	);

	// Shader Info
	gtk_notebook_append_page(
		_notebook, 
		_shaderInfo.getWidget(), 
		createTabLabel(_shaderInfo.getLabel(), _shaderInfo.getIconName())
	);

	// Model Info
	gtk_notebook_append_page(
		_notebook, 
		_modelInfo.getWidget(), 
		createTabLabel(_modelInfo.getLabel(), _modelInfo.getIconName())
	);
	
	// Add notebook plus buttons to vbox
	gtk_box_pack_start(GTK_BOX(dialogVBox), GTK_WIDGET(_notebook), TRUE, TRUE, 0);
	gtk_box_pack_start(GTK_BOX(dialogVBox), createButtons(), FALSE, FALSE, 0);

	// Add vbox to dialog window
	gtk_container_add(GTK_CONTAINER(getWindow()), dialogVBox);
}
Beispiel #17
0
// Construct the dialog
ShaderChooser::ShaderChooser(const Glib::RefPtr<Gtk::Window>& parent,
							 Gtk::Entry* targetEntry) :
	gtkutil::BlockingTransientWindow(_(LABEL_TITLE), parent),
	_targetEntry(targetEntry),
	_selector(Gtk::manage(new ShaderSelector(this, SHADER_PREFIXES)))
{
	set_border_width(12);

	if (_targetEntry != NULL)
	{
		_initialShader = targetEntry->get_text();

		// Set the cursor of the tree view to the currently selected shader
		_selector->setSelection(_initialShader);
	}

	// Set the default size and position of the window
	set_default_size(DEFAULT_SIZE_X, DEFAULT_SIZE_Y);

	// Connect the key handler to catch the ESC event
	signal_key_press_event().connect(sigc::mem_fun(*this, &ShaderChooser::onKeyPress), false);

	// Construct main VBox, and pack in the ShaderSelector and buttons panel
	Gtk::VBox* vbx = Gtk::manage(new Gtk::VBox(false, 3));
	vbx->pack_start(*_selector, true, true, 0);
	vbx->pack_start(createButtons(), false, false, 0);

	add(*vbx);

	// Connect the window position tracker
	_windowPosition.loadFromPath(RKEY_WINDOW_STATE);

	_windowPosition.connect(this);
	_windowPosition.applyPosition();
}
// Construct the dialog
LightTextureChooser::LightTextureChooser()
:	gtkutil::BlockingTransientWindow(_("Choose texture"), GlobalMainFrame().getTopLevelWindow()),
	_selector(Gtk::manage(new ShaderSelector(this, getPrefixList(), true))) // true >> render a light texture
{
	// Set the default size of the window
	Gdk::Rectangle rect;

	if (GlobalGroupDialog().getDialogWindow()->is_visible())
	{
		rect = gtkutil::MultiMonitor::getMonitorForWindow(GlobalGroupDialog().getDialogWindow());
	}
	else
	{
		rect = gtkutil::MultiMonitor::getMonitorForWindow(GlobalMainFrame().getTopLevelWindow());
	}

	set_default_size(static_cast<int>(rect.get_width()*0.6f), static_cast<int>(rect.get_height()*0.6f));

	// Construct main VBox, and pack in ShaderSelector and buttons panel
	Gtk::VBox* vbx = Gtk::manage(new Gtk::VBox(false, 6));

	vbx->pack_start(*_selector, true, true, 0);
	vbx->pack_start(createButtons(), false, false, 0);

	add(*vbx);
}
Beispiel #19
0
// Create GTK widgets
ParticlesChooser::ParticlesChooser()
: _widget(gtk_window_new(GTK_WINDOW_TOPLEVEL)),
  _particlesList(gtk_list_store_new(1, G_TYPE_STRING)),
  _selectedParticle("")
{
	// Set up main window
	gtk_window_set_transient_for(GTK_WINDOW(_widget), GlobalMainFrame().getTopLevelWindow());
	gtk_window_set_modal(GTK_WINDOW(_widget), TRUE);
	gtk_window_set_title(GTK_WINDOW(_widget), _("Choose particles"));
    gtk_window_set_position(GTK_WINDOW(_widget), GTK_WIN_POS_CENTER_ON_PARENT);
	g_signal_connect(G_OBJECT(_widget), "delete-event", 
					 G_CALLBACK(_onDestroy), this);
	
	// Set the default size of the window
	GdkScreen* scr = gtk_window_get_screen(GTK_WINDOW(_widget));
	gint w = gdk_screen_get_width(scr);
	gint h = gdk_screen_get_height(scr);
	
	gtk_window_set_default_size(GTK_WINDOW(_widget), w / 3, h / 2);
	
	// Main dialog vbox
	GtkWidget* vbx = gtk_vbox_new(FALSE, 12);
	gtk_box_pack_start(GTK_BOX(vbx), createTreeView(), TRUE, TRUE, 0);
	gtk_box_pack_end(GTK_BOX(vbx), createButtons(), FALSE, FALSE, 0);
	
	// Add main vbox to dialog
	gtk_container_set_border_width(GTK_CONTAINER(_widget), 12);
	gtk_container_add(GTK_CONTAINER(_widget), vbx);	
}
ItemToolBarControl::ItemToolBarControl(wxWindow* parent) : BaseToolBarControl(parent)
{
	m_butExpand = new gcImageButton(this, BUTTON_EXPAND, wxDefaultPosition, wxSize( 19,19 ), 0 );
	m_butExpand->setDefaultImage(("#items_expand"));
	m_butExpand->setHoverImage(("#items_expand_hover"));
	m_butExpand->SetToolTip(Managers::GetString(L"#DM_EXPAND"));

	m_butContract = new gcImageButton(this, BUTTON_CONTRACT, wxDefaultPosition, wxSize( 19,19 ), 0 );
	m_butContract->setDefaultImage(("#items_contract"));
	m_butContract->setHoverImage(("#items_contract_hover"));
	m_butContract->SetToolTip(Managers::GetString(L"#DM_CONTRACT"));

#ifdef ENABLE_SEARCH
	m_pSearch = new SearchControl(this);
	m_pSearch->onSearchEvent += delegate(&onSearchEvent);
	m_pSearch->onFullSearchEvent += delegate(&onSearchEvent);
#else
	m_pSearch = nullptr;
#endif

	m_pFGContentSizer = new wxFlexGridSizer( 1, 10, 0, 0 );
	m_pFGContentSizer->AddGrowableRow( 0 );
	m_pFGContentSizer->SetFlexibleDirection( wxBOTH );
	m_pFGContentSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );

	createButtons();

	wxFlexGridSizer* fgSizer1;
	fgSizer1 = new wxFlexGridSizer( 1, 6, 0, 0 );
	fgSizer1->AddGrowableCol( 1 );
	fgSizer1->AddGrowableRow( 0 );
	fgSizer1->SetFlexibleDirection( wxBOTH );
	fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );

	fgSizer1->Add( m_pFGContentSizer, 0, 0, 4 );
	fgSizer1->Add( 3, 0, 1, 0, 4 );
	fgSizer1->Add( m_butExpand, 0, wxTOP|wxBOTTOM, 4 );
	

#ifdef ENABLE_SEARCH
	fgSizer1->Add( m_butContract, 0, wxTOP|wxBOTTOM, 4 );
	fgSizer1->Add( m_pSearch, 0, wxTOP|wxBOTTOM, 4);
	fgSizer1->Add( m_pSearch->getButton(), 0, wxTOP|wxBOTTOM|wxRIGHT, 4);
#else
	fgSizer1->Add( m_butContract, 0, wxTOP|wxBOTTOM|wxRIGHT, 4 );
#endif

	this->SetSizer( fgSizer1 );
	this->Layout();

	auto userCore = GetUserCore();

	if (userCore && GetUploadMng())
	{
		userCore->getItemsAddedEvent() += guiDelegate(this, &ItemToolBarControl::onItemsAdded);
		userCore->getLoginItemsLoadedEvent() += guiDelegate(this, &ItemToolBarControl::onLoginItemsLoaded);
		GetUploadMng()->getUpdateEvent() += guiDelegate(this, &ItemToolBarControl::onUploadItemsAdded);
	}
}
Beispiel #21
0
void ErrorCheckDialog::populateWindow ()
{
	GtkWidget* dialogVBox = gtk_vbox_new(FALSE, 6);
	gtk_container_add(GTK_CONTAINER(getWindow()), dialogVBox);

	gtk_box_pack_start(GTK_BOX(dialogVBox), createTreeView(), TRUE, TRUE, 0);
	gtk_box_pack_end(GTK_BOX(dialogVBox), createButtons(), FALSE, FALSE, 0);
}
Beispiel #22
0
void FlowersGui::newGame()
{
    int rows = QInputDialog::getInt(this, "Rows?", "Rows?", 9, 5, 25);
    int cols = QInputDialog::getInt(this, "Cols?", "Cols?", 9, 5, 25);
    int flowers = QInputDialog::getInt(this, "Flowers?", "Flowers?", 10, 5, 25);
    puzzle->create(rows, cols, flowers);
    createButtons();
}
Beispiel #23
0
void FindAndReplaceShader::populateWindow() {
	GtkWidget* dialogVBox = gtk_vbox_new(FALSE, 6);
	gtk_container_add(GTK_CONTAINER(getWindow()), dialogVBox);

	GtkWidget* findHBox = gtk_hbox_new(FALSE, 0);
	GtkWidget* replaceHBox = gtk_hbox_new(FALSE, 0);

	// Pack these hboxes into an alignment so that they are indented
	GtkWidget* alignment = gtkutil::LeftAlignment(GTK_WIDGET(findHBox), 18, 1.0);
	GtkWidget* alignment2 = gtkutil::LeftAlignment(GTK_WIDGET(replaceHBox), 18, 1.0);

	gtk_box_pack_start(GTK_BOX(dialogVBox), GTK_WIDGET(alignment), TRUE, TRUE, 0);
	gtk_box_pack_start(GTK_BOX(dialogVBox), GTK_WIDGET(alignment2), TRUE, TRUE, 0);

	// Create the labels and pack them in the hbox
	GtkWidget* findLabel = gtkutil::LeftAlignedLabel(_(LABEL_FIND));
	GtkWidget* replaceLabel = gtkutil::LeftAlignedLabel(_(LABEL_REPLACE));
	gtk_widget_set_size_request(findLabel, 60, -1);
	gtk_widget_set_size_request(replaceLabel, 60, -1);

	gtk_box_pack_start(GTK_BOX(findHBox), findLabel, FALSE, FALSE, 0);
	gtk_box_pack_start(GTK_BOX(replaceHBox), replaceLabel, FALSE, FALSE, 0);

	_findEntry = gtk_entry_new();
	_replaceEntry = gtk_entry_new();
	g_signal_connect(G_OBJECT(_findEntry), "changed", G_CALLBACK(onFindChanged), this);
	g_signal_connect(G_OBJECT(_replaceEntry), "changed", G_CALLBACK(onReplaceChanged), this);

	gtk_box_pack_start(GTK_BOX(findHBox), _findEntry, TRUE, TRUE, 6);
	gtk_box_pack_start(GTK_BOX(replaceHBox), _replaceEntry, TRUE, TRUE, 6);

	GlobalTextureEntryCompletion::instance().connect(GTK_ENTRY(_findEntry));
	GlobalTextureEntryCompletion::instance().connect(GTK_ENTRY(_replaceEntry));

	// Create the icon buttons to open the ShaderChooser and override the size request
	_findSelectButton = gtkutil::IconTextButton("", gtkutil::getLocalPixbuf(FOLDER_ICON), false);
	gtk_widget_set_size_request(_findSelectButton, -1, -1);
	g_signal_connect(G_OBJECT(_findSelectButton), "clicked", G_CALLBACK(onChooseFind), this);

	_replaceSelectButton = gtkutil::IconTextButton("", gtkutil::getLocalPixbuf(FOLDER_ICON), false);
	gtk_widget_set_size_request(_replaceSelectButton, -1, -1);
	g_signal_connect(G_OBJECT(_replaceSelectButton), "clicked", G_CALLBACK(onChooseReplace), this);

	gtk_box_pack_start(GTK_BOX(findHBox), _findSelectButton, FALSE, FALSE, 0);
	gtk_box_pack_start(GTK_BOX(replaceHBox), _replaceSelectButton, FALSE, FALSE, 0);

	GtkWidget* spacer = gtk_alignment_new(0,0,0,0);
	gtk_widget_set_usize(spacer, 10, 2);
	gtk_box_pack_start(GTK_BOX(dialogVBox), spacer, FALSE, FALSE, 0);

	// The checkbox for "search selected only"
	_selectedOnly = gtk_check_button_new_with_mnemonic(_(LABEL_SELECTED_ONLY));
	GtkWidget* alignment3 = gtkutil::LeftAlignment(GTK_WIDGET(_selectedOnly), 18, 1.0);
	gtk_box_pack_start(GTK_BOX(dialogVBox), GTK_WIDGET(alignment3), FALSE, FALSE, 0);

	// Finally, add the buttons
	gtk_box_pack_start(GTK_BOX(dialogVBox), createButtons(), FALSE, FALSE, 0);
}
Beispiel #24
0
OutputMenu::OutputMenu(LeftMenu *leftMenu)
{
    setParent(leftMenu);
    setTitle("Discrete heat flow");

    vertSpace = 5;

    createButtons();
    createLayout();
}
Beispiel #25
0
IntroPage::IntroPage(SquadreModel* sm, ArbitriModel *am, QWidget *parent) :
    QWizardPage(parent), squadre(sm), arbitri(am)
{
    helpLabel = new QLabel(tr("Crea un nuovo giocatore, allenatore o arbitro"), this);
    helpLabel->setWordWrap(true);
    createButtons();
    createLayouts();

    setLayout(layout);
}
Beispiel #26
0
Sudoku::Sudoku(QWidget *parent) : QMainWindow(parent) {
	board = new Board;
	connect(board, SIGNAL(modified()), this, SLOT(boardModified()));
	clearWindow();
	createActions();
	createMenus();
	createButtons();
	createLayout();
	readSettings();
}
Beispiel #27
0
// Your initialization code goes here.
void initMyStuff()
{
//    COLOR->push_back(255);
//    COLOR->push_back(0);
//    COLOR->push_back(0)
    createButtons();
    BUTTONS[2]->setActive(true);
    BUTTONS[10]->setActive(true);
    createSliders();
}
GameWindow::GameWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::GameWindow),
    size(3),
    isSmallField(true),
    tictactoe()
{
    ui->setupUi(this);
    createButtons();
    connect(ui->generateButton, &QPushButton::clicked, this, &GameWindow::createButtons);
}
Beispiel #29
0
FlowersGui::FlowersGui(FlowersPuzzle* puzzle)
{
    this->puzzle = puzzle;

    setWindowTitle(tr("Flowers Puzzle"));
    createButtons();

    QMenu* menu = menuBar()->addMenu(tr("Game"));
    QAction* newAction = menu->addAction("New...");
    connect(newAction, SIGNAL(triggered()), this, SLOT(newGame()));
    show();
}
void StimResponseEditor::populateWindow()
{
	// Create the overall vbox
	_dialogVBox = Gtk::manage(new Gtk::VBox(false, 12));
	add(*_dialogVBox);

	// Create the notebook and add it to the vbox
	_notebook = Gtk::manage(new Gtk::Notebook);
	_dialogVBox->pack_start(*_notebook, true, true, 0);

	// The tab label items (icon + label)
	Gtk::HBox* stimLabelHBox = Gtk::manage(new Gtk::HBox(false, 0));
	stimLabelHBox->pack_start(
		*Gtk::manage(new Gtk::Image(
			GlobalUIManager().getLocalPixbufWithMask(ICON_STIM + SUFFIX_EXTENSION))),
    	false, false, 3
    );
	stimLabelHBox->pack_start(*Gtk::manage(new Gtk::Label(_("Stims"))), false, false, 3);

	Gtk::HBox* responseLabelHBox = Gtk::manage(new Gtk::HBox(false, 0));
	responseLabelHBox->pack_start(
		*Gtk::manage(new Gtk::Image(
			GlobalUIManager().getLocalPixbufWithMask(ICON_RESPONSE + SUFFIX_EXTENSION))),
    	false, false, 3
    );
	responseLabelHBox->pack_start(*Gtk::manage(new Gtk::Label(_("Responses"))), false, false, 3);

	Gtk::HBox* customLabelHBox = Gtk::manage(new Gtk::HBox(false, 0));
	customLabelHBox->pack_start(
		*Gtk::manage(new Gtk::Image(
			GlobalUIManager().getLocalPixbufWithMask(ICON_CUSTOM_STIM))),
    	false, false, 3
    );
	customLabelHBox->pack_start(*Gtk::manage(new Gtk::Label(_("Custom Stims"))), false, false, 3);

	// Show the widgets before using them as label, they won't appear otherwise
	stimLabelHBox->show_all();
	responseLabelHBox->show_all();
	customLabelHBox->show_all();

	// Cast the helper class to a widget and add it to the notebook page
	_stimPageNum = _notebook->append_page(*_stimEditor, *stimLabelHBox);
	_responsePageNum = _notebook->append_page(*_responseEditor, *responseLabelHBox);
	_customStimPageNum = _notebook->append_page(*_customStimEditor, *customLabelHBox);

	if (_lastShownPage == -1)
	{
		_lastShownPage = _stimPageNum;
	}

	// Pack in dialog buttons
	_dialogVBox->pack_start(createButtons(), false, false, 0);
}