Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/lib/app/RvCommon/RvBottomViewToolBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,8 @@ namespace Rv
m_actionCategoryMappings = {{
{m_smAction, IPCore::EventCategories::sessionmanagerCategory, m_smAction->toolTip()},
{m_paintAction, IPCore::EventCategories::annotateCategory, m_paintAction->toolTip()},
{m_holdAction, IPCore::EventCategories::annotateCategory, m_holdAction->toolTip()},
{m_ghostAction, IPCore::EventCategories::annotateCategory, m_ghostAction->toolTip()},
{m_holdAction, IPCore::EventCategories::holdAndGhostCategory, m_holdAction->toolTip()},
{m_ghostAction, IPCore::EventCategories::holdAndGhostCategory, m_ghostAction->toolTip()},
{m_backStepAction, IPCore::EventCategories::playcontrolCategory, m_backStepAction->toolTip()},
{m_forwardStepAction, IPCore::EventCategories::playcontrolCategory, m_forwardStepAction->toolTip()},
{m_backwardPlayAction, IPCore::EventCategories::backwardplayCategory, m_backwardPlayAction->toolTip()},
Expand Down Expand Up @@ -467,7 +467,6 @@ namespace Rv
}
else if (name == "event-category-state-changed")
{
// Update action availability when presenter changes or session mode changes
updateActionAvailability();
}
else if (name == "toolbar-set-cannot-use-tooltip")
Expand Down
3 changes: 2 additions & 1 deletion src/lib/app/RvCommon/RvCommon/RvTopViewToolBar.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ namespace Rv

private:
IPCore::Session* m_session;
QString m_customDisabledPrefix;
QAction* m_viewBackAction;
QAction* m_viewForwardAction;
QComboBox* m_viewCombo;
Expand Down Expand Up @@ -208,7 +209,7 @@ namespace Rv
QIconMap m_iconMap;
const VideoDevice* m_device;
const VideoDevice* m_outputDevice;
std::array<ActionCategoryMapping, 6> m_actionCategoryMappings;
std::array<ActionCategoryMapping, 9> m_actionCategoryMappings;
};

} // namespace Rv
Expand Down
2 changes: 0 additions & 2 deletions src/lib/app/RvCommon/RvDocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,6 @@ namespace Rv

//
// Create UI blocking overlay - transparent widget that captures all input
// Used during presenter transitions in Live Review to prevent interaction
// without closing panels
//
m_blockingOverlay = new QWidget(this);
m_blockingOverlay->setObjectName("UIBlockingOverlay");
Expand Down
30 changes: 23 additions & 7 deletions src/lib/app/RvCommon/RvTopViewToolBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,20 +129,20 @@ namespace Rv

m_fullScreenAction = addAction("");
m_fullScreenAction->setIcon(QIcon(":/images/fullscreen.png"));
m_fullScreenAction->setToolTip("Toggle full-screen mode");
b = dynamic_cast<QToolButton*>(widgetForAction(m_fullScreenAction));
b->setProperty("tbstyle", QVariant(QString("view_menu")));
b->setToolButtonStyle(Qt::ToolButtonIconOnly);
b->setPopupMode(QToolButton::InstantPopup);
b->setToolTip("Toggle full-screen mode");

m_frameAction = addAction("");
m_frameAction->setToolTip("Frame image in view");
b = dynamic_cast<QToolButton*>(widgetForAction(m_frameAction));
b->setIcon(QIcon(":/images/frame.png"));
b->setProperty("tbstyle", QVariant(QString("view_menu")));
b->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
b->setPopupMode(QToolButton::DelayedPopup);
b->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
b->setToolTip("Frame image in view");

m = new QMenu(b);
a = m->addAction("Frame");
Expand Down Expand Up @@ -377,9 +377,12 @@ namespace Rv
connect(m_dither10, SIGNAL(triggered()), this, SLOT(dither10()));

// Map toolbar actions to their corresponding event categories
m_actionCategoryMappings = {{{m_viewMenuAction, IPCore::EventCategories::viewmodeCategory, m_viewMenuAction->toolTip()},
{m_viewBackAction, IPCore::EventCategories::viewmodeCategory, m_viewBackAction->toolTip()},
m_actionCategoryMappings = {{{m_viewBackAction, IPCore::EventCategories::viewmodeCategory, m_viewBackAction->toolTip()},
{m_viewForwardAction, IPCore::EventCategories::viewmodeCategory, m_viewForwardAction->toolTip()},
{m_viewMenuAction, IPCore::EventCategories::viewmodeCategory, m_viewMenuAction->toolTip()},
{m_fullScreenAction, IPCore::EventCategories::fullscreenModeCategory, m_fullScreenAction->toolTip()},
{m_frameAction, IPCore::EventCategories::viewmodeCategory, m_frameAction->toolTip()},
{m_bgMenuAction, IPCore::EventCategories::backgroundStyleCategory, m_bgMenuAction->toolTip()},
{m_stereoMenuAction, IPCore::EventCategories::viewmodeCategory, m_stereoMenuAction->toolTip()},
{m_channelMenuAction, IPCore::EventCategories::viewmodeCategory, m_channelMenuAction->toolTip()},
{m_monitorMenuAction, IPCore::EventCategories::viewmodeCategory, m_monitorMenuAction->toolTip()}}};
Expand Down Expand Up @@ -515,7 +518,11 @@ namespace Rv
}
else if (name == "event-category-state-changed")
{
// Update action availability when presenter changes or session mode changes
updateActionAvailability();
}
else if (name == "toolbar-set-disabled-prefix")
{
m_customDisabledPrefix = QString::fromUtf8(contents.c_str());
updateActionAvailability();
}
}
Expand Down Expand Up @@ -1391,8 +1398,17 @@ namespace Rv
bool categoryEnabled = m_session->isEventCategoryEnabled(mapping.category);

mapping.action->setEnabled(categoryEnabled);
mapping.action->setToolTip(categoryEnabled ? mapping.defaultTooltip
: QString("You must be presenter to use ") + mapping.defaultTooltip);
if (categoryEnabled)
{
mapping.action->setToolTip(mapping.defaultTooltip);
}
else
{
QString tooltip = m_customDisabledPrefix.isEmpty()
? mapping.defaultTooltip
: m_customDisabledPrefix + mapping.defaultTooltip;
mapping.action->setToolTip(tooltip);
}
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions src/lib/ip/IPCore/IPCore/Session.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ namespace IPCore
inline constexpr std::string_view annotateSmudgeCategory = "annotate_smudge_category";
inline constexpr std::string_view annotateSofteraseCategory = "annotate_softerase_category";
inline constexpr std::string_view annotateTextCategory = "annotate_text_category";
inline constexpr std::string_view holdAndGhostCategory = "holdAndGhost_category";
inline constexpr std::string_view backwardplayCategory = "backwardplay_category";
inline constexpr std::string_view clearCategory = "clear_category";
inline constexpr std::string_view exportCategory = "export_category";
Expand All @@ -72,6 +73,8 @@ namespace IPCore
inline constexpr std::string_view screeningroomCategory = "screeningroom_category";
inline constexpr std::string_view unclassifiedCategory = "unclassified_category";
inline constexpr std::string_view viewmodeCategory = "viewmode_category";
inline constexpr std::string_view fullscreenModeCategory = "fullscreenMode_category";
inline constexpr std::string_view backgroundStyleCategory = "backgroundStyle_category";
inline constexpr std::string_view wipesCategory = "wipes_category";

constexpr auto all_categories()
Expand Down
Loading