Пример #1
0
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));
}
Пример #2
0
TimeSliderReverseStepActionUI::TimeSliderReverseStepActionUI(ViewerActionLogic *L) :
    ViewerActionUISingle(L)
{
    SetAllText(tr("Reverse step"));
    SetToolTip(tr("Step back one frame"));
    if (!GetViewerProperties()->GetNowin())
        SetIcon(QIcon(QPixmap(animationreversestep_xpm)));
}
Пример #3
0
TimeSliderForwardStepActionUI::TimeSliderForwardStepActionUI(ViewerActionLogic *L) :
    ViewerActionUISingle(L)
{
    SetAllText(tr("Forward step"));
    SetToolTip(tr("Step forward one frame"));
    if (!GetViewerProperties()->GetNowin())
        SetIcon(QIcon(QPixmap(animationforwardstep_xpm)));
}
Пример #4
0
AnimationStopActionUI::AnimationStopActionUI(ViewerActionLogic *L) :
    ViewerActionUIToggle(L)
{
    SetAllText(tr("Stop"));
    SetToolTip(tr("Stop animation"));
    if (!GetViewerProperties()->GetNowin())
        SetIcons(QPixmap(animationstopon_xpm), QPixmap(animationstopoff_xpm));
}
Пример #5
0
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());
}
Пример #6
0
   /// <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;
      }
   }
Пример #7
0
SetToolbarIconSizeActionUI::SetToolbarIconSizeActionUI(ViewerActionLogic *L) : ViewerActionUIToggle(L)
{
    SetAllText(tr("Use large icons (all windows)"));
    bool usesLargeIcons = ViewerWindowManager::Instance()->GetWindowAtts()->GetLargeIcons();
    toggled = !usesLargeIcons;
}
Пример #8
0
ShowToolbarsForAllWindowsActionUI::ShowToolbarsForAllWindowsActionUI(ViewerActionLogic *L) : ViewerActionUISingle(L)
{
    SetAllText(tr("Show toolbars (all windows)"));
}
Пример #9
0
ShowToolbarsActionUI::ShowToolbarsActionUI(ViewerActionLogic *L) : ViewerActionUISingle(L)
{
    SetAllText(tr("Show toolbars"));
}
Пример #10
0
HideToolbarsActionUI::HideToolbarsActionUI(ViewerActionLogic *L) : ViewerActionUISingle(L)
{
    SetAllText(tr("Hide toolbars"));
}