AnimationReversePlayActionUI::AnimationReversePlayActionUI(ViewerActionLogic *L) : ViewerActionUIToggle(L) { SetAllText(tr("Reverse play")); SetToolTip(tr("Play animation in reverse")); if (!GetViewerProperties()->GetNowin()) SetIcons(QPixmap(animationreverseplayon_xpm), QPixmap(animationreverseplayoff_xpm)); }
TimeSliderReverseStepActionUI::TimeSliderReverseStepActionUI(ViewerActionLogic *L) : ViewerActionUISingle(L) { SetAllText(tr("Reverse step")); SetToolTip(tr("Step back one frame")); if (!GetViewerProperties()->GetNowin()) SetIcon(QIcon(QPixmap(animationreversestep_xpm))); }
TimeSliderForwardStepActionUI::TimeSliderForwardStepActionUI(ViewerActionLogic *L) : ViewerActionUISingle(L) { SetAllText(tr("Forward step")); SetToolTip(tr("Step forward one frame")); if (!GetViewerProperties()->GetNowin()) SetIcon(QIcon(QPixmap(animationforwardstep_xpm))); }
AnimationStopActionUI::AnimationStopActionUI(ViewerActionLogic *L) : ViewerActionUIToggle(L) { SetAllText(tr("Stop")); SetToolTip(tr("Stop animation")); if (!GetViewerProperties()->GetNowin()) SetIcons(QPixmap(animationstopon_xpm), QPixmap(animationstopoff_xpm)); }
EnableToolbarActionUI::EnableToolbarActionUI(ViewerActionLogic *L) : ViewerActionUIMultiple(L) { SetAllText(tr("Toolbars")); SetToolTip(tr("Enable toolbars")); SetExclusive(false); // Add all of the action groups as choices. ViewerActionManager *actionMgr = GetLogic()->GetWindow()->GetActionManager(); stringVector names(actionMgr->GetActionGroupNames(false)); for(size_t i = 0; i < names.size(); ++i) AddChoice(names[i].c_str()); }
/// <summary>Called to revert document to a previous version.</summary> /// <param name="r">Revision.</param> /// <returns>TRUE if successfully reverted, otherwise FALSE</returns> BOOL ScriptDocument::OnRevertDocument(const ScriptRevision& r) { try { // Feedback Console << Cons::UserAction << "Reverting document " << FullPath << ENDL; // Modify SetModifiedFlag(TRUE); // Set Properties Script.Version = r.Version; Script.Name = r.ScriptName; Script.Description = r.Description; Script.Game = r.Game; Script.CommandID = r.CommandID; // Set text SetAllText(r.Content); // Revert path if (FullPath != r.FullPath) { /*auto proj = ProjectDocument::GetActive(); if (proj && proj->Contains(*this))*/ FullPath = r.FullPath; } // Refresh properties CPropertiesWnd::Connect(this, true); // Success: Feedback Console << Cons::UserAction << "Document reverted successfully" << ENDL; return TRUE; } catch (ExceptionBase& e) { theApp.ShowError(HERE, e); return FALSE; } }
SetToolbarIconSizeActionUI::SetToolbarIconSizeActionUI(ViewerActionLogic *L) : ViewerActionUIToggle(L) { SetAllText(tr("Use large icons (all windows)")); bool usesLargeIcons = ViewerWindowManager::Instance()->GetWindowAtts()->GetLargeIcons(); toggled = !usesLargeIcons; }
ShowToolbarsForAllWindowsActionUI::ShowToolbarsForAllWindowsActionUI(ViewerActionLogic *L) : ViewerActionUISingle(L) { SetAllText(tr("Show toolbars (all windows)")); }
ShowToolbarsActionUI::ShowToolbarsActionUI(ViewerActionLogic *L) : ViewerActionUISingle(L) { SetAllText(tr("Show toolbars")); }
HideToolbarsActionUI::HideToolbarsActionUI(ViewerActionLogic *L) : ViewerActionUISingle(L) { SetAllText(tr("Hide toolbars")); }