void LandscapeEditorControlsPlaceholder::UpdatePanels() { RemovePanel(); int32 tools = activeScene->GetEnabledTools(); if (tools & SceneEditor2::LANDSCAPE_TOOL_CUSTOM_COLOR) { SetPanel(customColorsPanel); } else if (tools & SceneEditor2::LANDSCAPE_TOOL_HEIGHTMAP_EDITOR) { SetPanel(heightmapEditorPanel); } else if (tools & SceneEditor2::LANDSCAPE_TOOL_RULER) { SetPanel(rulerToolPanel); } else if (tools & SceneEditor2::LANDSCAPE_TOOL_TILEMAP_EDITOR) { SetPanel(tilemaskEditorPanel); } else if (tools & SceneEditor2::LANDSCAPE_TOOL_VISIBILITY) { SetPanel(visibilityToolPanel); } }
// Sets the specifed tab index's tab panel RML. void ElementTabSet::SetPanel(int tab_index, const Rocket::Core::String& rml) { Core::Element* element = Core::Factory::InstanceElement(NULL, "*", "panel", Rocket::Core::XMLAttributes()); Core::Factory::InstanceElementText(element, rml); SetPanel(tab_index, element); element->RemoveReference(); }
GraphicPrimitiveEditor::GraphicPrimitiveEditor(Ui::EditorClass& ui): IResourceEditor(ui) { QWidget* widget = new QWidget(); Ui::GraphicPrimitiveEditor form; form.setupUi(widget); SetPanel(widget); }
VOID CCardView::set_card_panel_view(SHORT new_panel) { /* // If this is a demo card back, then we don't allow editing. */ if ((new_panel == CARD_PANEL_Back) && !GetConfiguration()->SupportsCardBack()) { return; } #if 1 BeforePageChange(); SetPanel(new_panel); #else /* // Get the document and build the undo/redo command for this. */ CPmwDoc* pDoc = GetDocument(); CCmdCardPanel* pCommand = new CCmdCardPanel(IDCmd_Panel[new_panel+1]); if (pCommand->Snapshot(this, pDoc->get_current_panel(), new_panel)) { pDoc->AddCommand(pCommand); } else { delete pCommand; /* Fall through. */ // SetPanel(new_panel); } #endif }
/** * RegEdit */ RegEdit::RegEdit(Backend *backend, QWidget *parent) :QWidget(parent), m_backend(backend) { QVBoxLayout *m_vert_layout = new QVBoxLayout(); m_file_group = new QGroupBox("File selection", this); QHBoxLayout *m_file_group_layout = new QHBoxLayout(); m_file_edit = new QLineEdit(this); m_file_edit->setReadOnly(true); m_file_open = new QToolButton(this); m_file_open->setText("Open"); m_file_open->setIcon(QIcon::fromTheme("document-open")); m_file_open->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); QMenu *file_open_menu = new QMenu(this); QAction *new_act = file_open_menu->addAction(QIcon::fromTheme("document-new"), "New..."); m_file_open->setMenu(file_open_menu); m_file_save = new QToolButton(this); m_file_save->setText("Save"); m_file_save->setIcon(QIcon::fromTheme("document-save")); m_file_save->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); QMenu *file_save_menu = new QMenu(this); QAction *saveas_act = file_save_menu->addAction(QIcon::fromTheme("document-save-as"), "Save as..."); m_file_save->setMenu(file_save_menu); m_file_group_layout->addWidget(m_file_open); m_file_group_layout->addWidget(m_file_save); m_file_group_layout->addWidget(m_file_edit); m_splitter = new QSplitter(this); m_soc_tree = new QTreeWidget(this); m_soc_tree->setColumnCount(1); m_soc_tree->setHeaderLabel(QString("Name")); m_soc_tree->setContextMenuPolicy(Qt::ActionsContextMenu); QAction *soc_tree_delete_action = new QAction("&Delete", this); soc_tree_delete_action->setIcon(QIcon::fromTheme("list-remove")); connect(soc_tree_delete_action, SIGNAL(triggered()), this, SLOT(OnSocItemDelete())); m_soc_tree->addAction(soc_tree_delete_action); m_splitter->addWidget(m_soc_tree); m_splitter->setStretchFactor(0, 0); m_file_group->setLayout(m_file_group_layout); m_vert_layout->addWidget(m_file_group); m_vert_layout->addWidget(m_splitter, 1); setLayout(m_vert_layout); SetModified(false, false); m_right_panel = 0; SetPanel(new EmptyEditPanel(this)); UpdateTabName(); connect(m_file_open, SIGNAL(clicked()), this, SLOT(OnOpen())); connect(m_file_save, SIGNAL(clicked()), this, SLOT(OnSave())); connect(new_act, SIGNAL(triggered()), this, SLOT(OnNew())); connect(saveas_act, SIGNAL(triggered()), this, SLOT(OnSaveAs())); connect(m_soc_tree, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)), this, SLOT(OnSocItemChanged(QTreeWidgetItem*, QTreeWidgetItem*))); connect(m_soc_tree, SIGNAL(itemActivated(QTreeWidgetItem*, int)), this, SLOT(OnSocItemActivated(QTreeWidgetItem*, int))); }
/****************************************************************************** * CSortPanel::CSortPanel */ CSortPanel::CSortPanel(CCEtoODBDoc &doc, FileStruct *file, int tolerancePercent) { m_bValid = false; m_bSorted = false; m_eSortAlg = panelSortAlgSerpentineLike; m_eStartLocation = panelSortStartLocationBotLt; m_pDoc = &doc; m_pDoc->OnRegen(); SetTolerancePercent(tolerancePercent); SetPanel(file); }
void CLibraryFrame::UpdatePanel(BOOL bForce) { CQuickLock oLock( Library.m_pSection ); if ( ! bForce && ! m_bViewSelection ) return; m_bViewSelection = FALSE; m_pViewSelection = HasView() ? m_pView->GetSelection() : m_pViewEmpty; if ( m_bPanelShow ) { CLibraryTreeItem* pFolders = m_wndTree.GetFirstSelected(); CLibraryListPtr pFiles( GetViewSelection() ); BOOL bMetaPanelAvailable = ( pFolders != NULL ); BOOL bHistoryPanelAvailable = ( LibraryHistory.GetCount() > 0 ); // Do not display any panel for the collection folder if ( pFolders && pFolders->m_pVirtual && pFolders->m_pVirtual->m_oCollSHA1 ) bMetaPanelAvailable = bHistoryPanelAvailable = FALSE; // Prefer history panel if no files selected for meta panel if ( bMetaPanelAvailable && bHistoryPanelAvailable && pFiles && pFiles->GetCount() <= 0 ) bMetaPanelAvailable = FALSE; CPanelCtrl* pBestPanel = bMetaPanelAvailable ? static_cast< CPanelCtrl* >( &m_pMetaPanel ) : ( bHistoryPanelAvailable ? static_cast< CPanelCtrl* >( &m_pHistoryPanel ) : NULL ); if ( ! HasPanel() || m_pPanel != pBestPanel ) SetPanel( pBestPanel ); else SetPanel( m_pPanel ); } }
void CLibraryFrame::OnLibraryPanel() { if ( HasPanel() ) { m_bPanelShow = FALSE; SetDynamicBar( NULL ); if ( HasView() ) m_pView->SendMessage( WM_METADATA ); SetPanel( NULL ); } else { m_bPanelShow = TRUE; Update( TRUE ); } }
void CLibraryFrame::OnSkinChange() { OnSize( 0, 0, 0 ); m_wndTree.SetVirtual( Settings.Library.ShowVirtual ); Skin.CreateToolBar( L"CLibraryTree.Top", &m_wndTreeTop ); if ( Settings.Library.ShowVirtual ) { Skin.CreateToolBar( L"CLibraryHeaderBar.Virtual", &m_wndViewTop ); Skin.CreateToolBar( L"CLibraryTree.Virtual", &m_wndTreeBottom ); } else { Skin.CreateToolBar( L"CLibraryHeaderBar.Physical", &m_wndViewTop ); Skin.CreateToolBar( L"CLibraryTree.Physical", &m_wndTreeBottom ); m_wndTreeTypes.SetEmptyString( IDS_LIBRARY_TYPE_FILTER_ALL ); m_wndTreeTypes.Load( Settings.Library.FilterURI ); } m_wndTreeBottom.ShowWindow( Settings.Library.ShowVirtual ? SW_SHOW : SW_HIDE ); m_wndTreeTypes.ShowWindow( Settings.Library.ShowVirtual ? SW_HIDE : SW_SHOW ); m_wndHeader.OnSkinChange(); m_wndSearch.SetFont( &CoolInterface.m_fntNormal ); CLibraryView* pView = m_pView; CPanelCtrl* pPanel = m_pPanel; SetView( NULL, TRUE, FALSE ); SetView( pView, TRUE, FALSE ); SetPanel( pPanel ); if ( HasView() ) m_pView->OnSkinChange(); }
void RegEdit::DisplayField(SocFieldRef ref) { SetPanel(new FieldEditPanel(ref, this)); }
void RegEdit::DisplayReg(SocRegRef ref) { SetPanel(new RegEditPanel(ref, this)); }
void RegEdit::DisplayDev(SocDevRef ref) { SetPanel(new DevEditPanel(ref, this)); }
void RegEdit::DisplaySoc(SocRef ref) { SetPanel(new SocEditPanel(ref, this)); }
void RegEdit::UpdateSocFile() { m_soc_tree->clear(); FillSocTree(); SetPanel(new EmptyEditPanel(this)); }
void CCFMenu::PanelCallback(KeyValues* pParms) { SetPanel((CFPanel)pParms->GetFirstValue()->GetInt()); }