Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

Updated to 1.0.3

Jeremy Bullockca9ce50047c6
diff --cc toonz/sources/toonz/mainwindow.cpp
index d68860189,8147c32c4..d72b648aa
--- a/toonz/sources/toonz/mainwindow.cpp
+++ b/toonz/sources/toonz/mainwindow.cpp
@@@ -371,79 -353,86 +353,88 @@@ void Room::load(const TFilePath &fp)
//-----------------------------------------------------------------------------
#if QT_VERSION >= 0x050500
- MainWindow::MainWindow(const QString &argumentLayoutFileName, QWidget *parent, Qt::WindowFlags flags)
+ MainWindow::MainWindow(const QString &argumentLayoutFileName, QWidget *parent,
+ Qt::WindowFlags flags)
#else
- MainWindow::MainWindow(const QString &argumentLayoutFileName, QWidget *parent, Qt::WFlags flags)
+ MainWindow::MainWindow(const QString &argumentLayoutFileName, QWidget *parent,
+ Qt::WFlags flags)
#endif
- : QMainWindow(parent, flags), m_saveSettingsOnQuit(true), m_oldRoomIndex(0), m_layoutName("")
- {
- m_toolsActionGroup = new QActionGroup(this);
- m_toolsActionGroup->setExclusive(true);
- m_currentRoomsChoice = Preferences::instance()->getCurrentRoomChoice();
- defineActions();
- TApp::instance()->getCurrentScene()->setDirtyFlag(false);
-
- // La menuBar altro non è che una toolbar
- // in cui posso inserire quanti custom widget voglio.
- m_topBar = new TopBar(this);
-
- addToolBar(m_topBar);
- addToolBarBreak(Qt::TopToolBarArea);
-
- m_stackedWidget = new QStackedWidget(this);
-
- // For the style sheet
- m_stackedWidget->setObjectName("MainStackedWidget");
- m_stackedWidget->setFrameStyle(QFrame::StyledPanel);
-
- // To give a border to the stackedWidget.
- /*QFrame *centralWidget = new QFrame(this);
- centralWidget->setFrameStyle(QFrame::StyledPanel);
- centralWidget->setObjectName("centralWidget");
- QHBoxLayout *centralWidgetLayout = new QHBoxLayout;
- centralWidgetLayout->setMargin(3);
- centralWidgetLayout->addWidget(m_stackedWidget);
- centralWidget->setLayout(centralWidgetLayout);*/
-
- setCentralWidget(m_stackedWidget);
-
- //Leggo i settings
- readSettings(argumentLayoutFileName);
-
- //Setto le stanze
- QTabBar *roomTabWidget = m_topBar->getRoomTabWidget();
- connect(m_stackedWidget, SIGNAL(currentChanged(int)), SLOT(onCurrentRoomChanged(int)));
- connect(roomTabWidget, SIGNAL(currentChanged(int)), m_stackedWidget, SLOT(setCurrentIndex(int)));
-
- /*-- タイトルバーにScene名を表示する --*/
- connect(TApp::instance()->getCurrentScene(), SIGNAL(nameSceneChanged()), this, SLOT(changeWindowTitle()));
- changeWindowTitle();
-
- //Connetto i comandi che sono in RoomTabWidget
- connect(roomTabWidget, SIGNAL(indexSwapped(int , int )), SLOT(onIndexSwapped(int ,int )));
- connect(roomTabWidget, SIGNAL(insertNewTabRoom()), SLOT(insertNewRoom()));
- connect(roomTabWidget, SIGNAL(deleteTabRoom(int)), SLOT(deleteRoom(int)));
- connect(roomTabWidget, SIGNAL(renameTabRoom(int, const QString)), SLOT(renameRoom(int, const QString)));
-
- setCommandHandler("MI_Quit", this, &MainWindow::onQuit);
- setCommandHandler("MI_Undo", this, &MainWindow::onUndo);
- setCommandHandler("MI_Redo", this, &MainWindow::onRedo);
- setCommandHandler("MI_NewScene", this, &MainWindow::onNewScene);
- setCommandHandler("MI_LoadScene", this, &MainWindow::onLoadScene);
- setCommandHandler("MI_LoadSubSceneFile", this, &MainWindow::onLoadSubScene);
- setCommandHandler("MI_ResetRoomLayout", this, &MainWindow::resetRoomsLayout);
- setCommandHandler(MI_AutoFillToggle, this, &MainWindow::autofillToggle);
-
- /*-- FillAreas,FillLinesに直接切り替えるコマンド --*/
- setCommandHandler(MI_FillAreas, this, &MainWindow::toggleFillAreas);
- setCommandHandler(MI_FillLines, this, &MainWindow::toggleFillLines);
- /*-- StylepickerAreas,StylepickerLinesに直接切り替えるコマンド --*/
- setCommandHandler(MI_PickStyleAreas, this, &MainWindow::togglePickStyleAreas);
- setCommandHandler(MI_PickStyleLines, this, &MainWindow::togglePickStyleLines);
+ : QMainWindow(parent, flags)
+ , m_saveSettingsOnQuit(true)
+ , m_oldRoomIndex(0)
+ , m_layoutName("") {
+ m_toolsActionGroup = new QActionGroup(this);
+ m_toolsActionGroup->setExclusive(true);
+ m_currentRoomsChoice = Preferences::instance()->getCurrentRoomChoice();
+ defineActions();
+ TApp::instance()->getCurrentScene()->setDirtyFlag(false);
+
+ // La menuBar altro non è che una toolbar
+ // in cui posso inserire quanti custom widget voglio.
+ m_topBar = new TopBar(this);
+
+ addToolBar(m_topBar);
+ addToolBarBreak(Qt::TopToolBarArea);
+
+ m_stackedWidget = new QStackedWidget(this);
+
+ // For the style sheet
+ m_stackedWidget->setObjectName("MainStackedWidget");
+ m_stackedWidget->setFrameStyle(QFrame::StyledPanel);
+
+ // To give a border to the stackedWidget.
+ /*QFrame *centralWidget = new QFrame(this);
+ centralWidget->setFrameStyle(QFrame::StyledPanel);
+ centralWidget->setObjectName("centralWidget");
+ QHBoxLayout *centralWidgetLayout = new QHBoxLayout;
+ centralWidgetLayout->setMargin(3);
+ centralWidgetLayout->addWidget(m_stackedWidget);
+ centralWidget->setLayout(centralWidgetLayout);*/
+
+ setCentralWidget(m_stackedWidget);
+
+ // Leggo i settings
+ readSettings(argumentLayoutFileName);
+
+ // Setto le stanze
+ QTabBar *roomTabWidget = m_topBar->getRoomTabWidget();
+ connect(m_stackedWidget, SIGNAL(currentChanged(int)),
+ SLOT(onCurrentRoomChanged(int)));
+ connect(roomTabWidget, SIGNAL(currentChanged(int)), m_stackedWidget,
+ SLOT(setCurrentIndex(int)));
+
+ /*-- タイトルバーにScene名を表示する --*/
+ connect(TApp::instance()->getCurrentScene(), SIGNAL(nameSceneChanged()), this,
+ SLOT(changeWindowTitle()));
+ changeWindowTitle();
+
+ // Connetto i comandi che sono in RoomTabWidget
+ connect(roomTabWidget, SIGNAL(indexSwapped(int, int)),
+ SLOT(onIndexSwapped(int, int)));
+ connect(roomTabWidget, SIGNAL(insertNewTabRoom()), SLOT(insertNewRoom()));
+ connect(roomTabWidget, SIGNAL(deleteTabRoom(int)), SLOT(deleteRoom(int)));
+ connect(roomTabWidget, SIGNAL(renameTabRoom(int, const QString)),
+ SLOT(renameRoom(int, const QString)));
+
+ setCommandHandler("MI_Quit", this, &MainWindow::onQuit);
+ setCommandHandler("MI_Undo", this, &MainWindow::onUndo);
+ setCommandHandler("MI_Redo", this, &MainWindow::onRedo);
+ setCommandHandler("MI_NewScene", this, &MainWindow::onNewScene);
+ setCommandHandler("MI_LoadScene", this, &MainWindow::onLoadScene);
+ setCommandHandler("MI_LoadSubSceneFile", this, &MainWindow::onLoadSubScene);
+ setCommandHandler("MI_ResetRoomLayout", this, &MainWindow::resetRoomsLayout);
+ setCommandHandler(MI_AutoFillToggle, this, &MainWindow::autofillToggle);
+
+ /*-- FillAreas,FillLinesに直接切り替えるコマンド --*/
+ setCommandHandler(MI_FillAreas, this, &MainWindow::toggleFillAreas);
+ setCommandHandler(MI_FillLines, this, &MainWindow::toggleFillLines);
+ /*-- StylepickerAreas,StylepickerLinesに直接切り替えるコマンド --*/
+ setCommandHandler(MI_PickStyleAreas, this, &MainWindow::togglePickStyleAreas);
+ setCommandHandler(MI_PickStyleLines, this, &MainWindow::togglePickStyleLines);
- setCommandHandler(MI_About, this, &MainWindow::onAbout);
+ setCommandHandler(MI_About, this, &MainWindow::onAbout);
+ setCommandHandler(MI_MaximizePanel, this, &MainWindow::maximizePanel);
+ setCommandHandler(MI_FullScreenWindow, this, &MainWindow::fullScreenWindow);
}
//-----------------------------------------------------------------------------
@@@ -1088,104 -1055,72 +1057,102 @@@ void MainWindow::onAbout()
//-----------------------------------------------------------------------------
- void MainWindow::autofillToggle()
- {
- TPaletteHandle *h = TApp::instance()->getCurrentPalette();
- int index = h->getStyleIndex();
- if (index > 0) {
- TColorStyle *s = h->getPalette()->getStyle(index);
- s->setFlags(s->getFlags() == 0 ? 1 : 0);
- h->notifyColorStyleChanged();
- }
+ void MainWindow::autofillToggle() {
+ TPaletteHandle *h = TApp::instance()->getCurrentPalette();
+ int index = h->getStyleIndex();
+ if (index > 0) {
+ TColorStyle *s = h->getPalette()->getStyle(index);
+ s->setFlags(s->getFlags() == 0 ? 1 : 0);
+ h->notifyColorStyleChanged();
+ }
}
- void MainWindow::resetRoomsLayout()
- {
- if (!m_saveSettingsOnQuit)
- return;
+ void MainWindow::resetRoomsLayout() {
+ if (!m_saveSettingsOnQuit) return;
- m_saveSettingsOnQuit = false;
+ m_saveSettingsOnQuit = false;
- TFilePath layoutDir = ToonzFolder::getMyRoomsDir();
- if (layoutDir != TFilePath()) {
- //TSystem::deleteFile(layoutDir);
- TSystem::rmDirTree(layoutDir);
- }
- /*if (layoutDir != TFilePath()) {
- try {
- TFilePathSet fpset;
- TSystem::readDirectory(fpset, layoutDir, true, false);
- for (auto const& path : fpset) {
- QString fn = toQString(path.withoutParentDir());
- if (fn.startsWith("room") || fn.startsWith("popups")) {
- TSystem::deleteFile(path);
- }
- }
- } catch (...) {
- }
- }*/
-
- DVGui::info(QObject::tr("The rooms will be reset the next time you run Toonz."));
+ TFilePath layoutDir = ToonzFolder::getMyRoomsDir();
+ if (layoutDir != TFilePath()) {
+ // TSystem::deleteFile(layoutDir);
+ TSystem::rmDirTree(layoutDir);
+ }
+ /*if (layoutDir != TFilePath()) {
+ try {
+ TFilePathSet fpset;
+ TSystem::readDirectory(fpset, layoutDir, true, false);
+ for (auto const& path : fpset) {
+ QString fn = toQString(path.withoutParentDir());
+ if (fn.startsWith("room") || fn.startsWith("popups"))
+ {
+ TSystem::deleteFile(path);
+ }
+ }
+ } catch (...) {
+ }
+ }*/
+
+ DVGui::info(
+ QObject::tr("The rooms will be reset the next time you run Toonz."));
}
+void MainWindow::maximizePanel()
+{
+ DockLayout *currDockLayout = getCurrentRoom()->dockLayout();
+ QPoint p;
+ if (!panelMaximized)
+ {
+ p = mapFromGlobal(QCursor::pos());
+ panelMaximized = true;
+ }
+ else {
+ panelMaximized = false;
+ }
+ QWidget* currWidget = currDockLayout->containerOf(p);
+ DockWidget* currW = static_cast<DockWidget*>(currWidget);
+ if (currW)
+ currW->maximizeDock();
+}
+
+void MainWindow::fullScreenWindow()
+{
+ QMainWindow *currWindow = TApp::instance()->getMainWindow();
+ if (currWindow->isFullScreen()) {
+ currWindow->setWindowState(Qt::WindowMaximized);
+ }
+ else {
+ currWindow->setWindowState(Qt::WindowFullScreen);
+ }
+
+}
+
//-----------------------------------------------------------------------------
- void MainWindow::onCurrentRoomChanged(int newRoomIndex)
- {
- Room *oldRoom = getRoom(m_oldRoomIndex);
- Room *newRoom = getRoom(newRoomIndex);
- QList<TPanel *> paneList = oldRoom->findChildren<TPanel *>();
-
- //Change the parent of all the floating dockWidgets
- for (int i = 0; i < paneList.size(); i++) {
- TPanel *pane = paneList.at(i);
- if (pane->isFloating() && !pane->isHidden()) {
- QRect oldGeometry = pane->geometry();
-
- //Just setting the new parent is not enough for the new layout manager.
- //Must be removed from the old and added to the new.
- oldRoom->removeDockWidget(pane);
- newRoom->addDockWidget(pane);
- //pane->setParent(newRoom);
-
- //Some flags are lost when the parent changes.
- pane->setFloating(true);
- pane->setGeometry(oldGeometry);
- pane->show();
- }
- }
- m_oldRoomIndex = newRoomIndex;
- TSelection::setCurrent(0);
+ void MainWindow::onCurrentRoomChanged(int newRoomIndex) {
+ Room *oldRoom = getRoom(m_oldRoomIndex);
+ Room *newRoom = getRoom(newRoomIndex);
+ QList<TPanel *> paneList = oldRoom->findChildren<TPanel *>();
+
+ // Change the parent of all the floating dockWidgets
+ for (int i = 0; i < paneList.size(); i++) {
+ TPanel *pane = paneList.at(i);
+ if (pane->isFloating() && !pane->isHidden()) {
+ QRect oldGeometry = pane->geometry();
+
+ // Just setting the new parent is not enough for the new layout manager.
+ // Must be removed from the old and added to the new.
+ oldRoom->removeDockWidget(pane);
+ newRoom->addDockWidget(pane);
+ // pane->setParent(newRoom);
+
+ // Some flags are lost when the parent changes.
+ pane->setFloating(true);
+ pane->setGeometry(oldGeometry);
+ pane->show();
+ }
+ }
+ m_oldRoomIndex = newRoomIndex;
+ TSelection::setCurrent(0);
}
//-----------------------------------------------------------------------------
@@@ -1562,517 -1499,621 +1531,622 @@@ QAction *MainWindow::createToggle(cons
//-----------------------------------------------------------------------------
QAction *MainWindow::createToolAction(const char *id, const char *iconName,
- const QString &name, const QString &defaultShortcut)
- {
- QString normalResource = QString(":Resources/") + iconName + ".svg";
- QString overResource = QString(":Resources/") + iconName + "_rollover.svg";
- QIcon icon;
- icon.addFile(normalResource, QSize(), QIcon::Normal, QIcon::Off);
- icon.addFile(overResource, QSize(), QIcon::Normal, QIcon::On);
- icon.addFile(overResource, QSize(), QIcon::Active);
- QAction *action = new DVAction(icon, name, this);
- action->setCheckable(true);
- action->setActionGroup(m_toolsActionGroup);
-
- //When the viewer is maximized (not fullscreen) the toolbar is hided and the action are disabled,
- //so the tool shortcuts don't work.
- //Adding tool actions to the main window solve this problem!
- addAction(action);
-
- CommandManager::instance()->define(id, ToolCommandType, defaultShortcut.toStdString(), action);
- return action;
- }
-
- //-----------------------------------------------------------------------------
-
- void MainWindow::defineActions()
- {
- createMenuFileAction(MI_NewScene, tr("&New Scene"), "Ctrl+N");
- createMenuFileAction(MI_LoadScene, tr("&Load Scene..."), "Ctrl+L");
- createMenuFileAction(MI_SaveScene, tr("&Save Scene"), "Ctrl+S");
- createMenuFileAction(MI_SaveSceneAs, tr("&Save Scene As..."), "Ctrl+Shift+S");
- createMenuFileAction(MI_SaveAll, tr("&Save All"), "");
- createMenuFileAction(MI_RevertScene, tr("&Revert Scene"), "");
-
- QAction *act = CommandManager::instance()->getAction(MI_RevertScene);
- if (act)
- act->setEnabled(false);
-
- QList<QString> files;
-
- createMenuFileAction(MI_LoadFolder, tr("&Load Folder..."), "");
- createMenuFileAction(MI_LoadSubSceneFile, tr("&Load As Sub-xsheet..."), "");
- createMenuAction(MI_OpenRecentScene, tr("&Open Recent Scene File"), files);
- createMenuAction(MI_OpenRecentLevel, tr("&Open Recent Level File"), files);
- createMenuFileAction(MI_ClearRecentScene, tr("&Clear Recent Scene File List"), "");
- createMenuFileAction(MI_ClearRecentLevel, tr("&Clear Recent level File List"), "");
- createMenuFileAction(MI_NewLevel, tr("&New Level..."), "");
- createMenuFileAction(MI_LoadLevel, tr("&Load Level..."), "");
- createMenuFileAction(MI_SaveLevel, tr("&Save Level"), "");
- createMenuFileAction(MI_SaveLevelAs, tr("&Save Level As..."), "");
- createMenuFileAction(MI_ExportLevel, tr("&Export Level..."), "");
- createMenuFileAction(MI_ConvertFileWithInput, tr("&Convert File..."), "");
- createRightClickMenuAction(MI_SavePaletteAs, tr("&Save Palette As..."), "");
- createRightClickMenuAction(MI_OverwritePalette, "&Save Palette", "");
- createMenuFileAction(MI_LoadColorModel, tr("&Load Color Model..."), "");
- createMenuFileAction(MI_ImportMagpieFile, tr("&Import Magpie File..."), "");
- createMenuFileAction(MI_NewProject, tr("&New Project..."), "");
- createMenuFileAction(MI_ProjectSettings, tr("&Project Settings..."), "");
- createMenuFileAction(MI_SaveDefaultSettings, tr("&Save Default Settings"), "");
- createMenuFileAction(MI_OutputSettings, tr("&Output Settings..."), "");
- createMenuFileAction(MI_PreviewSettings, tr("&Preview Settings..."), "");
- createMenuFileAction(MI_Render, tr("&Render"), "");
- createMenuFileAction(MI_Preview, tr("&Preview"), "Ctrl+R");
- createRightClickMenuAction(MI_SavePreviewedFrames, tr("&Save Previewed Frames"), "");
- createRightClickMenuAction(MI_RegeneratePreview, tr("&Regenerate Preview"), "");
- createRightClickMenuAction(MI_RegenerateFramePr, tr("&Regenerate Frame Preview"), "");
- createRightClickMenuAction(MI_ClonePreview, tr("&Clone Preview"), "");
- createRightClickMenuAction(MI_FreezePreview, tr("&Freeze//Unfreeze Preview"), "");
- CommandManager::instance()->setToggleTexts(MI_FreezePreview, tr("Freeze Preview"), tr("Unfreeze Preview"));
- //createAction(MI_SavePreview, "&Save Preview", "");
- createRightClickMenuAction(MI_SavePreset, tr("&Save As Preset"), "");
- createMenuFileAction(MI_Preferences, tr("&Preferences..."), "");
- createMenuFileAction(MI_ShortcutPopup, tr("&Configure Shortcuts..."), "");
- createMenuFileAction(MI_PrintXsheet, tr("&Print Xsheet"), "");
- createMenuFileAction("MI_RunScript", tr("Run Script..."), "");
- createMenuFileAction("MI_OpenScriptConsole", tr("Open Script Console..."), "");
- createMenuFileAction(MI_Print, tr("&Print Current Frame..."), "");
- createMenuFileAction(MI_Quit, tr("&Quit"), "Ctrl+Q");
+ const QString &name,
+ const QString &defaultShortcut) {
+ QString normalResource = QString(":Resources/") + iconName + ".svg";
+ QString overResource = QString(":Resources/") + iconName + "_rollover.svg";
+ QIcon icon;
+ icon.addFile(normalResource, QSize(), QIcon::Normal, QIcon::Off);
+ icon.addFile(overResource, QSize(), QIcon::Normal, QIcon::On);
+ icon.addFile(overResource, QSize(), QIcon::Active);
+ QAction *action = new DVAction(icon, name, this);
+ action->setCheckable(true);
+ action->setActionGroup(m_toolsActionGroup);
+
+ // When the viewer is maximized (not fullscreen) the toolbar is hided and the
+ // action are disabled,
+ // so the tool shortcuts don't work.
+ // Adding tool actions to the main window solve this problem!
+ addAction(action);
+
+ CommandManager::instance()->define(id, ToolCommandType,
+ defaultShortcut.toStdString(), action);
+ return action;
+ }
+
+ //-----------------------------------------------------------------------------
+
+ void MainWindow::defineActions() {
+ createMenuFileAction(MI_NewScene, tr("&New Scene"), "Ctrl+N");
+ createMenuFileAction(MI_LoadScene, tr("&Load Scene..."), "Ctrl+L");
+ createMenuFileAction(MI_SaveScene, tr("&Save Scene"), "Ctrl+S");
+ createMenuFileAction(MI_SaveSceneAs, tr("&Save Scene As..."), "Ctrl+Shift+S");
+ createMenuFileAction(MI_SaveAll, tr("&Save All"), "");
+ createMenuFileAction(MI_RevertScene, tr("&Revert Scene"), "");
+
+ QAction *act = CommandManager::instance()->getAction(MI_RevertScene);
+ if (act) act->setEnabled(false);
+
+ QList<QString> files;
+
+ createMenuFileAction(MI_LoadFolder, tr("&Load Folder..."), "");
+ createMenuFileAction(MI_LoadSubSceneFile, tr("&Load As Sub-xsheet..."), "");
+ createMenuAction(MI_OpenRecentScene, tr("&Open Recent Scene File"), files);
+ createMenuAction(MI_OpenRecentLevel, tr("&Open Recent Level File"), files);
+ createMenuFileAction(MI_ClearRecentScene, tr("&Clear Recent Scene File List"),
+ "");
+ createMenuFileAction(MI_ClearRecentLevel, tr("&Clear Recent level File List"),
+ "");
+ createMenuFileAction(MI_NewLevel, tr("&New Level..."), "");
+ createMenuFileAction(MI_LoadLevel, tr("&Load Level..."), "");
+ createMenuFileAction(MI_SaveLevel, tr("&Save Level"), "");
+ createMenuFileAction(MI_SaveLevelAs, tr("&Save Level As..."), "");
+ createMenuFileAction(MI_ExportLevel, tr("&Export Level..."), "");
+ createMenuFileAction(MI_ConvertFileWithInput, tr("&Convert File..."), "");
+ createRightClickMenuAction(MI_SavePaletteAs, tr("&Save Palette As..."), "");
+ createRightClickMenuAction(MI_OverwritePalette, "&Save Palette", "");
+ createMenuFileAction(MI_LoadColorModel, tr("&Load Color Model..."), "");
+ createMenuFileAction(MI_ImportMagpieFile, tr("&Import Magpie File..."), "");
+ createMenuFileAction(MI_NewProject, tr("&New Project..."), "");
+ createMenuFileAction(MI_ProjectSettings, tr("&Project Settings..."), "");
+ createMenuFileAction(MI_SaveDefaultSettings, tr("&Save Default Settings"),
+ "");
+ createMenuFileAction(MI_OutputSettings, tr("&Output Settings..."), "");
+ createMenuFileAction(MI_PreviewSettings, tr("&Preview Settings..."), "");
+ createMenuFileAction(MI_Render, tr("&Render"), "");
+ createMenuFileAction(MI_Preview, tr("&Preview"), "Ctrl+R");
+ createRightClickMenuAction(MI_SavePreviewedFrames,
+ tr("&Save Previewed Frames"), "");
+ createRightClickMenuAction(MI_RegeneratePreview, tr("&Regenerate Preview"),
+ "");
+ createRightClickMenuAction(MI_RegenerateFramePr,
+ tr("&Regenerate Frame Preview"), "");
+ createRightClickMenuAction(MI_ClonePreview, tr("&Clone Preview"), "");
+ createRightClickMenuAction(MI_FreezePreview, tr("&Freeze//Unfreeze Preview"),
+ "");
+ CommandManager::instance()->setToggleTexts(
+ MI_FreezePreview, tr("Freeze Preview"), tr("Unfreeze Preview"));
+ // createAction(MI_SavePreview, "&Save Preview", "");
+ createRightClickMenuAction(MI_SavePreset, tr("&Save As Preset"), "");
+ createMenuFileAction(MI_Preferences, tr("&Preferences..."), "");
+ createMenuFileAction(MI_ShortcutPopup, tr("&Configure Shortcuts..."), "");
+ createMenuFileAction(MI_PrintXsheet, tr("&Print Xsheet"), "");
+ createMenuFileAction("MI_RunScript", tr("Run Script..."), "");
+ createMenuFileAction("MI_OpenScriptConsole", tr("Open Script Console..."),
+ "");
+ createMenuFileAction(MI_Print, tr("&Print Current Frame..."), "");
+ createMenuFileAction(MI_Quit, tr("&Quit"), "Ctrl+Q");
#ifndef NDEBUG
- createMenuFileAction("MI_ReloadStyle", tr("Reload qss"), "");
+ createMenuFileAction("MI_ReloadStyle", tr("Reload qss"), "");
#endif
- createMenuAction(MI_LoadRecentImage, tr("&Load Recent Image Files"), files);
- createMenuFileAction(MI_ClearRecentImage, tr("&Clear Recent Flipbook Image List"), "");
-
- createRightClickMenuAction(MI_PreviewFx, tr("Preview Fx"), "");
-
- createMenuEditAction(MI_SelectAll, tr("&Select All"), "Ctrl+A");
- createMenuEditAction(MI_InvertSelection, tr("&Invert Selection"), "");
- createMenuEditAction(MI_Undo, tr("&Undo"), "Ctrl+Z");
- createMenuEditAction(MI_Redo, tr("&Redo"), "Ctrl+Y");
- createMenuEditAction(MI_Cut, tr("&Cut"), "Ctrl+X");
- createMenuEditAction(MI_Copy, tr("&Copy"), "Ctrl+C");
- createMenuEditAction(MI_Paste, tr("&Insert Paste"), "Ctrl+V");
- //createMenuEditAction(MI_PasteNew, tr("&Paste New"), "");
- createMenuCellsAction(MI_MergeFrames, tr("&Merge"), "");
- createMenuEditAction(MI_PasteInto, tr("&Paste Into"), "");
- createRightClickMenuAction(MI_PasteValues, tr("&Paste Color && Name"), "");
- createRightClickMenuAction(MI_PasteColors, tr("Paste Color"), "");
- createRightClickMenuAction(MI_PasteNames, tr("Paste Name"), "");
- createRightClickMenuAction(MI_GetColorFromStudioPalette, tr("Get Color from Studio Palette"), "");
- createMenuEditAction(MI_Clear, tr("&Delete"), "Delete");
- createMenuEditAction(MI_Insert, tr("&Insert"), "Ins");
- createMenuEditAction(MI_Group, tr("&Group"), "Ctrl+G");
- createMenuEditAction(MI_Ungroup, tr("&Ungroup"), "");
- createMenuEditAction(MI_BringToFront, tr("&Bring to Front"), "Ctrl+]");
- createMenuEditAction(MI_BringForward, tr("&Bring Forward"), "]");
- createMenuEditAction(MI_SendBack, tr("&Send Back"), "Ctrl+[");
- createMenuEditAction(MI_SendBackward, tr("&Send Backward"), "[");
- createMenuEditAction(MI_EnterGroup, tr("&Enter Group"), "");
- createMenuEditAction(MI_ExitGroup, tr("&Exit Group"), "");
- createMenuEditAction(MI_RemoveEndpoints, tr("&Remove Vector Overflow"), "");
-
- createMenuScanCleanupAction(MI_DefineScanner, tr("&Define Scanner..."), "");
- createMenuScanCleanupAction(MI_ScanSettings, tr("&Scan Settings..."), "");
- createMenuScanCleanupAction(MI_Scan, tr("&Scan"), "");
- createMenuScanCleanupAction(MI_Autocenter, tr("&Autocenter..."), "");
-
- QAction *toggle = createToggle(MI_SetScanCropbox, tr("&Set Cropbox"), "", 0, MenuScanCleanupCommandType);
- if (toggle) {
- SetScanCropboxCheck::instance()->setToggle(toggle);
- QString scannerType = QSettings().value("CurrentScannerType").toString();
- if (scannerType == "TWAIN")
- toggle->setDisabled(true);
- toggle = createMenuScanCleanupAction(MI_ResetScanCropbox, tr("&Reset Cropbox"), "");
- if (scannerType == "TWAIN")
- toggle->setDisabled(true);
- }
-
- createMenuScanCleanupAction(MI_CleanupSettings, tr("&Cleanup Settings..."), "");
-
- toggle = createToggle(MI_CleanupPreview, tr("&Preview Cleanup"), "", 0, MenuScanCleanupCommandType);
- CleanupPreviewCheck::instance()->setToggle(toggle);
- toggle = createToggle(MI_CameraTest, tr("&Camera Test"), "", 0, MenuScanCleanupCommandType);
- CameraTestCheck::instance()->setToggle(toggle);
-
- createToggle(MI_OpacityCheck, tr("&Opacity Check"), "1", false, MenuScanCleanupCommandType);
-
- createMenuScanCleanupAction(MI_Cleanup, tr("&Cleanup"), "");
- createMenuLevelAction(MI_AddFrames, tr("&Add Frames..."), "");
- createMenuLevelAction(MI_Renumber, tr("&Renumber..."), "");
- createMenuLevelAction(MI_ReplaceLevel, tr("&Replace Level..."), "");
- createMenuLevelAction(MI_RevertToCleanedUp, tr("&Revert to Cleaned Up"), "");
- createMenuLevelAction(MI_RevertToLastSaved, tr("&Revert to Last Saved Version"), "");
- createMenuLevelAction(MI_ExposeResource, tr("&Expose in Xsheet"), "");
- createMenuLevelAction(MI_EditLevel, tr("&Display in Level Strip"), "");
- createMenuLevelAction(MI_LevelSettings, tr("&Level Settings..."), "");
- createMenuLevelAction(MI_AdjustLevels, tr("Adjust Levels..."), "");
- createMenuLevelAction(MI_AdjustThickness, tr("Adjust Thickness..."), "");
- createMenuLevelAction(MI_Antialias, tr("&Antialias..."), "");
- createMenuLevelAction(MI_Binarize, tr("&Binarize..."), "");
- createMenuLevelAction(MI_BrightnessAndContrast, tr("&Brightness and Contrast..."), "");
- createMenuLevelAction(MI_LinesFade, tr("&Color Fade..."), "");
+ createMenuAction(MI_LoadRecentImage, tr("&Load Recent Image Files"), files);
+ createMenuFileAction(MI_ClearRecentImage,
+ tr("&Clear Recent Flipbook Image List"), "");
+
+ createRightClickMenuAction(MI_PreviewFx, tr("Preview Fx"), "");
+
+ createMenuEditAction(MI_SelectAll, tr("&Select All"), "Ctrl+A");
+ createMenuEditAction(MI_InvertSelection, tr("&Invert Selection"), "");
+ createMenuEditAction(MI_Undo, tr("&Undo"), "Ctrl+Z");
+ createMenuEditAction(MI_Redo, tr("&Redo"), "Ctrl+Y");
+ createMenuEditAction(MI_Cut, tr("&Cut"), "Ctrl+X");
+ createMenuEditAction(MI_Copy, tr("&Copy"), "Ctrl+C");
+ createMenuEditAction(MI_Paste, tr("&Insert Paste"), "Ctrl+V");
+ // createMenuEditAction(MI_PasteNew, tr("&Paste New"), "");
+ createMenuCellsAction(MI_MergeFrames, tr("&Merge"), "");
+ createMenuEditAction(MI_PasteInto, tr("&Paste Into"), "");
+ createRightClickMenuAction(MI_PasteValues, tr("&Paste Color && Name"), "");
+ createRightClickMenuAction(MI_PasteColors, tr("Paste Color"), "");
+ createRightClickMenuAction(MI_PasteNames, tr("Paste Name"), "");
+ createRightClickMenuAction(MI_GetColorFromStudioPalette,
+ tr("Get Color from Studio Palette"), "");
+ createMenuEditAction(MI_Clear, tr("&Delete"), "Delete");
+ createMenuEditAction(MI_Insert, tr("&Insert"), "Ins");
+ createMenuEditAction(MI_Group, tr("&Group"), "Ctrl+G");
+ createMenuEditAction(MI_Ungroup, tr("&Ungroup"), "");
+ createMenuEditAction(MI_BringToFront, tr("&Bring to Front"), "Ctrl+]");
+ createMenuEditAction(MI_BringForward, tr("&Bring Forward"), "]");
+ createMenuEditAction(MI_SendBack, tr("&Send Back"), "Ctrl+[");
+ createMenuEditAction(MI_SendBackward, tr("&Send Backward"), "[");
+ createMenuEditAction(MI_EnterGroup, tr("&Enter Group"), "");
+ createMenuEditAction(MI_ExitGroup, tr("&Exit Group"), "");
+ createMenuEditAction(MI_RemoveEndpoints, tr("&Remove Vector Overflow"), "");
+
+ createMenuScanCleanupAction(MI_DefineScanner, tr("&Define Scanner..."), "");
+ createMenuScanCleanupAction(MI_ScanSettings, tr("&Scan Settings..."), "");
+ createMenuScanCleanupAction(MI_Scan, tr("&Scan"), "");
+ createMenuScanCleanupAction(MI_Autocenter, tr("&Autocenter..."), "");
+
+ QAction *toggle = createToggle(MI_SetScanCropbox, tr("&Set Cropbox"), "", 0,
+ MenuScanCleanupCommandType);
+ if (toggle) {
+ SetScanCropboxCheck::instance()->setToggle(toggle);
+ QString scannerType = QSettings().value("CurrentScannerType").toString();
+ if (scannerType == "TWAIN") toggle->setDisabled(true);
+ toggle = createMenuScanCleanupAction(MI_ResetScanCropbox,
+ tr("&Reset Cropbox"), "");
+ if (scannerType == "TWAIN") toggle->setDisabled(true);
+ }
+
+ createMenuScanCleanupAction(MI_CleanupSettings, tr("&Cleanup Settings..."),
+ "");
+
+ toggle = createToggle(MI_CleanupPreview, tr("&Preview Cleanup"), "", 0,
+ MenuScanCleanupCommandType);
+ CleanupPreviewCheck::instance()->setToggle(toggle);
+ toggle = createToggle(MI_CameraTest, tr("&Camera Test"), "", 0,
+ MenuScanCleanupCommandType);
+ CameraTestCheck::instance()->setToggle(toggle);
+
+ createToggle(MI_OpacityCheck, tr("&Opacity Check"), "1", false,
+ MenuScanCleanupCommandType);
+
+ createMenuScanCleanupAction(MI_Cleanup, tr("&Cleanup"), "");
+ createMenuLevelAction(MI_AddFrames, tr("&Add Frames..."), "");
+ createMenuLevelAction(MI_Renumber, tr("&Renumber..."), "");
+ createMenuLevelAction(MI_ReplaceLevel, tr("&Replace Level..."), "");
+ createMenuLevelAction(MI_RevertToCleanedUp, tr("&Revert to Cleaned Up"), "");
+ createMenuLevelAction(MI_RevertToLastSaved,
+ tr("&Revert to Last Saved Version"), "");
+ createMenuLevelAction(MI_ExposeResource, tr("&Expose in Xsheet"), "");
+ createMenuLevelAction(MI_EditLevel, tr("&Display in Level Strip"), "");
+ createMenuLevelAction(MI_LevelSettings, tr("&Level Settings..."), "");
+ createMenuLevelAction(MI_AdjustLevels, tr("Adjust Levels..."), "");
+ createMenuLevelAction(MI_AdjustThickness, tr("Adjust Thickness..."), "");
+ createMenuLevelAction(MI_Antialias, tr("&Antialias..."), "");
+ createMenuLevelAction(MI_Binarize, tr("&Binarize..."), "");
+ createMenuLevelAction(MI_BrightnessAndContrast,
+ tr("&Brightness and Contrast..."), "");
+ createMenuLevelAction(MI_LinesFade, tr("&Color Fade..."), "");
#ifdef LINETEST
- createMenuLevelAction(MI_Capture, tr("&Capture"), "Space");
+ createMenuLevelAction(MI_Capture, tr("&Capture"), "Space");
#endif
- QAction *action = createMenuLevelAction(MI_CanvasSize, tr("&Canvas Size..."), "");
- if (action)
- action->setDisabled(true);
- createMenuLevelAction(MI_FileInfo, tr("&Info..."), "");
- createRightClickMenuAction(MI_ViewFile, tr("&View..."), "");
- createMenuLevelAction(MI_RemoveUnused, tr("&Remove All Unused Levels"), "");
- createMenuLevelAction(MI_ReplaceParentDirectory, tr("&Replace Parent Directory..."), "");
-
- createMenuXsheetAction(MI_SceneSettings, tr("&Scene Settings..."), "");
- createMenuXsheetAction(MI_CameraSettings, tr("&Camera Settings..."), "");
- createMiscAction(MI_CameraStage, tr("&Camera Settings..."), "");
-
- createMenuXsheetAction(MI_OpenChild, tr("&Open Sub-xsheet"), "");
- createMenuXsheetAction(MI_CloseChild, tr("&Close Sub-xsheet"), "");
- createMenuXsheetAction(MI_ExplodeChild, tr("Explode Sub-xsheet"), "");
- createMenuXsheetAction(MI_Collapse, tr("Collapse"), "");
- createMenuXsheetAction(MI_ToggleEditInPlace, tr("Toggle Edit in Place"), "");
- createMenuXsheetAction(MI_SaveSubxsheetAs, tr("&Save Sub-xsheet As..."), "");
- createMenuXsheetAction(MI_Resequence, tr("Resequence"), "");
- createMenuXsheetAction(MI_CloneChild, tr("Clone Sub-xsheet"), "");
-
- createMenuXsheetAction(MI_ApplyMatchLines, tr("&Apply Match Lines..."), "");
- createMenuXsheetAction(MI_MergeCmapped, tr("&Merge Tlv Levels..."), "");
- createMenuXsheetAction(MI_DeleteMatchLines, tr("&Delete Match Lines"), "");
- createMenuXsheetAction(MI_DeleteInk, tr("&Delete Lines..."), "");
- createMenuXsheetAction(MI_MergeColumns, tr("&Merge Levels"), "");
- createMenuXsheetAction(MI_InsertFx, tr("&New FX..."), "Ctrl+F");
- createMenuXsheetAction(MI_NewOutputFx, tr("&New Output"), "Ctrl+F");
- createRightClickMenuAction(MI_FxParamEditor, tr("&Edit FX..."), "Ctrl+K");
-
- createMenuXsheetAction(MI_InsertSceneFrame, tr("Insert Frame"), "");
- createMenuXsheetAction(MI_RemoveSceneFrame, tr("Remove Frame"), "");
- createMenuXsheetAction(MI_InsertGlobalKeyframe, tr("Insert Multiple Keys"), "");
- createMenuXsheetAction(MI_RemoveGlobalKeyframe, tr("Remove Multiple Keys"), "");
-
- createMenuCellsAction(MI_Reverse, tr("&Reverse"), "");
- createMenuCellsAction(MI_Swing, tr("&Swing"), "");
- createMenuCellsAction(MI_Random, tr("&Random"), "");
- createMenuCellsAction(MI_Increment, tr("&Autoexpose"), "");
- createMenuCellsAction(MI_Dup, tr("&Repeat..."), "");
- createMenuCellsAction(MI_ResetStep, tr("&Reset Step"), "");
- createMenuCellsAction(MI_IncreaseStep, tr("&Increase Step"), "");
- createMenuCellsAction(MI_DecreaseStep, tr("&Decrease Step"), "");
- createMenuCellsAction(MI_Step2, tr("&Step 2"), "");
- createMenuCellsAction(MI_Step3, tr("&Step 3"), "");
- createMenuCellsAction(MI_Step4, tr("&Step 4"), "");
- createMenuCellsAction(MI_Each2, tr("&Each 2"), "");
- createMenuCellsAction(MI_Each3, tr("&Each 3"), "");
- createMenuCellsAction(MI_Each4, tr("&Each 4"), "");
- createMenuCellsAction(MI_Rollup, tr("&Roll Up"), "");
- createMenuCellsAction(MI_Rolldown, tr("&Roll Down"), "");
- createMenuCellsAction(MI_TimeStretch, tr("&Time Stretch..."), "");
- createMenuCellsAction(MI_Duplicate, tr("&Duplicate Drawing "), "D");
- createMenuCellsAction(MI_Autorenumber, tr("&Autorenumber"), "");
- createMenuCellsAction(MI_CloneLevel, tr("&Clone"), "");
-
- createMenuCellsAction(MI_Reframe1, tr("1's"), "");
- createMenuCellsAction(MI_Reframe2, tr("2's"), "");
- createMenuCellsAction(MI_Reframe3, tr("3's"), "");
- createMenuCellsAction(MI_Reframe4, tr("4's"), "");
-
- createRightClickMenuAction(MI_SetKeyframes, tr("&Set Key"), "");
-
- createToggle(MI_ViewCamera, tr("&Camera Box"), "", ViewCameraToggleAction ? 1 : 0, MenuViewCommandType);
- createToggle(MI_ViewTable, tr("&Table"), "", ViewTableToggleAction ? 1 : 0, MenuViewCommandType);
- createToggle(MI_FieldGuide, tr("&Field Guide"), "", FieldGuideToggleAction ? 1 : 0, MenuViewCommandType);
- createToggle(MI_ViewBBox, tr("&Raster Bounding Box"), "", ViewBBoxToggleAction ? 1 : 0, MenuViewCommandType);
+ QAction *action =
+ createMenuLevelAction(MI_CanvasSize, tr("&Canvas Size..."), "");
+ if (action) action->setDisabled(true);
+ createMenuLevelAction(MI_FileInfo, tr("&Info..."), "");
+ createRightClickMenuAction(MI_ViewFile, tr("&View..."), "");
+ createMenuLevelAction(MI_RemoveUnused, tr("&Remove All Unused Levels"), "");
+ createMenuLevelAction(MI_ReplaceParentDirectory,
+ tr("&Replace Parent Directory..."), "");
+
+ createMenuXsheetAction(MI_SceneSettings, tr("&Scene Settings..."), "");
+ createMenuXsheetAction(MI_CameraSettings, tr("&Camera Settings..."), "");
+ createMiscAction(MI_CameraStage, tr("&Camera Settings..."), "");
+
+ createMenuXsheetAction(MI_OpenChild, tr("&Open Sub-xsheet"), "");
+ createMenuXsheetAction(MI_CloseChild, tr("&Close Sub-xsheet"), "");
+ createMenuXsheetAction(MI_ExplodeChild, tr("Explode Sub-xsheet"), "");
+ createMenuXsheetAction(MI_Collapse, tr("Collapse"), "");
+ createMenuXsheetAction(MI_ToggleEditInPlace, tr("Toggle Edit in Place"), "");
+ createMenuXsheetAction(MI_SaveSubxsheetAs, tr("&Save Sub-xsheet As..."), "");
+ createMenuXsheetAction(MI_Resequence, tr("Resequence"), "");
+ createMenuXsheetAction(MI_CloneChild, tr("Clone Sub-xsheet"), "");
+
+ createMenuXsheetAction(MI_ApplyMatchLines, tr("&Apply Match Lines..."), "");
+ createMenuXsheetAction(MI_MergeCmapped, tr("&Merge Tlv Levels..."), "");
+ createMenuXsheetAction(MI_DeleteMatchLines, tr("&Delete Match Lines"), "");
+ createMenuXsheetAction(MI_DeleteInk, tr("&Delete Lines..."), "");
+ createMenuXsheetAction(MI_MergeColumns, tr("&Merge Levels"), "");
+ createMenuXsheetAction(MI_InsertFx, tr("&New FX..."), "Ctrl+F");
+ createMenuXsheetAction(MI_NewOutputFx, tr("&New Output"), "Ctrl+F");
+ createRightClickMenuAction(MI_FxParamEditor, tr("&Edit FX..."), "Ctrl+K");
+
+ createMenuXsheetAction(MI_InsertSceneFrame, tr("Insert Frame"), "");
+ createMenuXsheetAction(MI_RemoveSceneFrame, tr("Remove Frame"), "");
+ createMenuXsheetAction(MI_InsertGlobalKeyframe, tr("Insert Multiple Keys"),
+ "");
+ createMenuXsheetAction(MI_RemoveGlobalKeyframe, tr("Remove Multiple Keys"),
+ "");
+
+ createMenuCellsAction(MI_Reverse, tr("&Reverse"), "");
+ createMenuCellsAction(MI_Swing, tr("&Swing"), "");
+ createMenuCellsAction(MI_Random, tr("&Random"), "");
+ createMenuCellsAction(MI_Increment, tr("&Autoexpose"), "");
+ createMenuCellsAction(MI_Dup, tr("&Repeat..."), "");
+ createMenuCellsAction(MI_ResetStep, tr("&Reset Step"), "");
+ createMenuCellsAction(MI_IncreaseStep, tr("&Increase Step"), "");
+ createMenuCellsAction(MI_DecreaseStep, tr("&Decrease Step"), "");
+ createMenuCellsAction(MI_Step2, tr("&Step 2"), "");
+ createMenuCellsAction(MI_Step3, tr("&Step 3"), "");
+ createMenuCellsAction(MI_Step4, tr("&Step 4"), "");
+ createMenuCellsAction(MI_Each2, tr("&Each 2"), "");
+ createMenuCellsAction(MI_Each3, tr("&Each 3"), "");
+ createMenuCellsAction(MI_Each4, tr("&Each 4"), "");
+ createMenuCellsAction(MI_Rollup, tr("&Roll Up"), "");
+ createMenuCellsAction(MI_Rolldown, tr("&Roll Down"), "");
+ createMenuCellsAction(MI_TimeStretch, tr("&Time Stretch..."), "");
+ createMenuCellsAction(MI_Duplicate, tr("&Duplicate Drawing "), "D");
+ createMenuCellsAction(MI_Autorenumber, tr("&Autorenumber"), "");
+ createMenuCellsAction(MI_CloneLevel, tr("&Clone"), "");
+
+ createMenuCellsAction(MI_Reframe1, tr("1's"), "");
+ createMenuCellsAction(MI_Reframe2, tr("2's"), "");
+ createMenuCellsAction(MI_Reframe3, tr("3's"), "");
+ createMenuCellsAction(MI_Reframe4, tr("4's"), "");
+
+ createRightClickMenuAction(MI_SetKeyframes, tr("&Set Key"), "");
+
+ createToggle(MI_ViewCamera, tr("&Camera Box"), "",
+ ViewCameraToggleAction ? 1 : 0, MenuViewCommandType);
+ createToggle(MI_ViewTable, tr("&Table"), "", ViewTableToggleAction ? 1 : 0,
+ MenuViewCommandType);
+ createToggle(MI_FieldGuide, tr("&Field Guide"), "",
+ FieldGuideToggleAction ? 1 : 0, MenuViewCommandType);
+ createToggle(MI_ViewBBox, tr("&Raster Bounding Box"), "",
+ ViewBBoxToggleAction ? 1 : 0, MenuViewCommandType);
#ifdef LINETEST
- createToggle(MI_CapturePanelFieldGuide, tr("&Field Guide in Capture Window"), "", CapturePanelFieldGuideToggleAction ? 1 : 0, MenuViewCommandType);
+ createToggle(MI_CapturePanelFieldGuide, tr("&Field Guide in Capture Window"),
+ "", CapturePanelFieldGuideToggleAction ? 1 : 0,
+ MenuViewCommandType);
#endif
- createToggle(MI_SafeArea, tr("&Safe Area"), "", SafeAreaToggleAction ? 1 : 0, MenuViewCommandType);
- createToggle(MI_ViewColorcard, tr("&Camera BG Color"), "", ViewColorcardToggleAction ? 1 : 0, MenuViewCommandType);
- createToggle(MI_ViewGuide, tr("&Guide"), "", ViewGuideToggleAction ? 1 : 0, MenuViewCommandType);
- createToggle(MI_ViewRuler, tr("&Ruler"), "", ViewRulerToggleAction ? 1 : 0, MenuViewCommandType);
- createToggle(MI_TCheck, tr("&Transparency Check "), "", TCheckToggleAction ? 1 : 0, MenuViewCommandType);
- QAction *inkCheckAction = createToggle(MI_ICheck, tr("&Ink Check"), "", ICheckToggleAction ? 1 : 0, MenuViewCommandType);
- QAction *ink1CheckAction = createToggle(MI_Ink1Check, tr("&Ink#1 Check"), "", Ink1CheckToggleAction ? 1 : 0, MenuViewCommandType);
- /*-- Ink Check と Ink1Checkを排他的にする --*/
- connect(inkCheckAction, SIGNAL(triggered(bool)), this, SLOT(onInkCheckTriggered(bool)));
- connect(ink1CheckAction, SIGNAL(triggered(bool)), this, SLOT(onInk1CheckTriggered(bool)));
-
- createToggle(MI_PCheck, tr("&Paint Check"), "", PCheckToggleAction ? 1 : 0, MenuViewCommandType);
- createToggle(MI_IOnly, tr("Inks &Only"), "", IOnlyToggleAction ? 1 : 0, MenuViewCommandType);
- createToggle(MI_GCheck, tr("&Fill Check"), "", GCheckToggleAction ? 1 : 0, MenuViewCommandType);
- createToggle(MI_BCheck, tr("&Black BG Check"), "", BCheckToggleAction ? 1 : 0, MenuViewCommandType);
- createToggle(MI_ACheck, tr("&Gap Check"), "", ACheckToggleAction ? 1 : 0, MenuViewCommandType);
- createToggle(MI_ShiftTrace, tr("Shift and Trace"), "", false, MenuViewCommandType);
- createToggle(MI_EditShift, tr("Edit Shift"), "", false, MenuViewCommandType);
- createToggle(MI_NoShift, tr("No Shift"), "", false, MenuViewCommandType);
- createAction(MI_ResetShift, tr("Reset Shift"), "", MenuViewCommandType);
-
- if (QGLPixelBuffer::hasOpenGLPbuffers())
- createToggle(MI_RasterizePli, tr("&Visualize Vector As Raster"), "", RasterizePliToggleAction ? 1 : 0, MenuViewCommandType);
- else
- RasterizePliToggleAction = 0;
-
- createRightClickMenuAction(MI_Histogram, tr("&Histogram"), "");
-
- //createToolOptionsAction("A_ToolOption_Link", tr("Link"), "");
- createToggle(MI_Link, tr("Link Flipbooks"), "", LinkToggleAction ? 1 : 0, MenuViewCommandType);
-
- createPlaybackAction(MI_Play, tr("Play"), "");
- createPlaybackAction(MI_Loop, tr("Loop"), "");
- createPlaybackAction(MI_Pause, tr("Pause"), "");
- createPlaybackAction(MI_FirstFrame, tr("First Frame"), "");
- createPlaybackAction(MI_LastFrame, tr("Last Frame"), "");
- createPlaybackAction(MI_PrevFrame, tr("Previous Frame"), "Shift+A");
- createPlaybackAction(MI_NextFrame, tr("Next Frame"), "Shift+S");
-
- createAction(MI_NextDrawing, tr("Next Drawing"), "Shift+X", PlaybackCommandType);
- createAction(MI_PrevDrawing, tr("Prev Drawing"), "Shift+Z", PlaybackCommandType);
- createAction(MI_NextStep, tr("Next Step"), "", PlaybackCommandType);
- createAction(MI_PrevStep, tr("Prev Step"), "", PlaybackCommandType);
-
- createRGBAAction(MI_RedChannel, tr("Red Channel"), "");
- createRGBAAction(MI_GreenChannel, tr("Green Channel"), "");
- createRGBAAction(MI_BlueChannel, tr("Blue Channel"), "");
- createRGBAAction(MI_MatteChannel, tr("Matte Channel"), "");
- createRGBAAction(MI_RedChannelGreyscale, tr("Red Channel Greyscale"), "");
- createRGBAAction(MI_GreenChannelGreyscale, tr("Green Channel Greyscale"), "");
- createRGBAAction(MI_BlueChannelGreyscale, tr("Blue Channel Greyscale"), "");
- /*-- Viewer下部のCompareToSnapshotボタンのトグル --*/
- createViewerAction(MI_CompareToSnapshot, tr("Compare to Snapshot"), "");
-
- createFillAction(MI_AutoFillToggle, tr("Toggle Autofill on Current Palette Color"), "");
-
- toggle = createToggle(MI_DockingCheck, tr("&Lock Room Panes"), "", DockingCheckToggleAction ? 1 : 0, MenuWindowsCommandType);
- DockingCheck::instance()->setToggle(toggle);
-
- //createRightClickMenuAction(MI_OpenCurrentScene, tr("&Current Scene"), "");
+ createToggle(MI_SafeArea, tr("&Safe Area"), "", SafeAreaToggleAction ? 1 : 0,
+ MenuViewCommandType);
+ createToggle(MI_ViewColorcard, tr("&Camera BG Color"), "",
+ ViewColorcardToggleAction ? 1 : 0, MenuViewCommandType);
+ createToggle(MI_ViewGuide, tr("&Guide"), "", ViewGuideToggleAction ? 1 : 0,
+ MenuViewCommandType);
+ createToggle(MI_ViewRuler, tr("&Ruler"), "", ViewRulerToggleAction ? 1 : 0,
+ MenuViewCommandType);
+ createToggle(MI_TCheck, tr("&Transparency Check "), "",
+ TCheckToggleAction ? 1 : 0, MenuViewCommandType);
+ QAction *inkCheckAction =
+ createToggle(MI_ICheck, tr("&Ink Check"), "", ICheckToggleAction ? 1 : 0,
+ MenuViewCommandType);
+ QAction *ink1CheckAction =
+ createToggle(MI_Ink1Check, tr("&Ink#1 Check"), "",
+ Ink1CheckToggleAction ? 1 : 0, MenuViewCommandType);
+ /*-- Ink Check と Ink1Checkを排他的にする --*/
+ connect(inkCheckAction, SIGNAL(triggered(bool)), this,
+ SLOT(onInkCheckTriggered(bool)));
+ connect(ink1CheckAction, SIGNAL(triggered(bool)), this,
+ SLOT(onInk1CheckTriggered(bool)));
+
+ createToggle(MI_PCheck, tr("&Paint Check"), "", PCheckToggleAction ? 1 : 0,
+ MenuViewCommandType);
+ createToggle(MI_IOnly, tr("Inks &Only"), "", IOnlyToggleAction ? 1 : 0,
+ MenuViewCommandType);
+ createToggle(MI_GCheck, tr("&Fill Check"), "", GCheckToggleAction ? 1 : 0,
+ MenuViewCommandType);
+ createToggle(MI_BCheck, tr("&Black BG Check"), "", BCheckToggleAction ? 1 : 0,
+ MenuViewCommandType);
+ createToggle(MI_ACheck, tr("&Gap Check"), "", ACheckToggleAction ? 1 : 0,
+ MenuViewCommandType);
+ createToggle(MI_ShiftTrace, tr("Shift and Trace"), "", false,
+ MenuViewCommandType);
+ createToggle(MI_EditShift, tr("Edit Shift"), "", false, MenuViewCommandType);
+ createToggle(MI_NoShift, tr("No Shift"), "", false, MenuViewCommandType);
+ createAction(MI_ResetShift, tr("Reset Shift"), "", MenuViewCommandType);
+
+ if (QGLPixelBuffer::hasOpenGLPbuffers())
+ createToggle(MI_RasterizePli, tr("&Visualize Vector As Raster"), "",
+ RasterizePliToggleAction ? 1 : 0, MenuViewCommandType);
+ else
+ RasterizePliToggleAction = 0;
+
+ createRightClickMenuAction(MI_Histogram, tr("&Histogram"), "");
+
+ // createToolOptionsAction("A_ToolOption_Link", tr("Link"), "");
+ createToggle(MI_Link, tr("Link Flipbooks"), "", LinkToggleAction ? 1 : 0,
+ MenuViewCommandType);
+
+ createPlaybackAction(MI_Play, tr("Play"), "");
+ createPlaybackAction(MI_Loop, tr("Loop"), "");
+ createPlaybackAction(MI_Pause, tr("Pause"), "");
+ createPlaybackAction(MI_FirstFrame, tr("First Frame"), "");
+ createPlaybackAction(MI_LastFrame, tr("Last Frame"), "");
+ createPlaybackAction(MI_PrevFrame, tr("Previous Frame"), "Shift+A");
+ createPlaybackAction(MI_NextFrame, tr("Next Frame"), "Shift+S");
+
+ createAction(MI_NextDrawing, tr("Next Drawing"), "Shift+X",
+ PlaybackCommandType);
+ createAction(MI_PrevDrawing, tr("Prev Drawing"), "Shift+Z",
+ PlaybackCommandType);
+ createAction(MI_NextStep, tr("Next Step"), "", PlaybackCommandType);
+ createAction(MI_PrevStep, tr("Prev Step"), "", PlaybackCommandType);
+
+ createRGBAAction(MI_RedChannel, tr("Red Channel"), "");
+ createRGBAAction(MI_GreenChannel, tr("Green Channel"), "");
+ createRGBAAction(MI_BlueChannel, tr("Blue Channel"), "");
+ createRGBAAction(MI_MatteChannel, tr("Matte Channel"), "");
+ createRGBAAction(MI_RedChannelGreyscale, tr("Red Channel Greyscale"), "");
+ createRGBAAction(MI_GreenChannelGreyscale, tr("Green Channel Greyscale"), "");
+ createRGBAAction(MI_BlueChannelGreyscale, tr("Blue Channel Greyscale"), "");
+ /*-- Viewer下部のCompareToSnapshotボタンのトグル --*/
+ createViewerAction(MI_CompareToSnapshot, tr("Compare to Snapshot"), "");
+
+ createFillAction(MI_AutoFillToggle,
+ tr("Toggle Autofill on Current Palette Color"), "");
+
+ toggle =
+ createToggle(MI_DockingCheck, tr("&Lock Room Panes"), "",
+ DockingCheckToggleAction ? 1 : 0, MenuWindowsCommandType);
+ DockingCheck::instance()->setToggle(toggle);
+
+ // createRightClickMenuAction(MI_OpenCurrentScene, tr("&Current Scene"),
+ // "");
#ifdef LINETEST
- createMenuWindowsAction(MI_OpenExport, tr("&Export"), "");
+ createMenuWindowsAction(MI_OpenExport, tr("&Export"), "");
#endif
- createMenuWindowsAction(MI_OpenFileBrowser, tr("&File Browser"), "");
- createMenuWindowsAction(MI_OpenFileViewer, tr("&Flipbook"), "");
- createMenuWindowsAction(MI_OpenFunctionEditor, tr("&Function Editor"), "");
- createMenuWindowsAction(MI_OpenFilmStrip, tr("&Level Strip"), "");
- createMenuWindowsAction(MI_OpenPalette, tr("&Palette"), "");
- createRightClickMenuAction(MI_OpenPltGizmo, tr("&Palette Gizmo"), "");
- createRightClickMenuAction(MI_EraseUnusedStyles, tr("&Delete Unused Styles"), "");
- createMenuWindowsAction(MI_OpenTasks, tr("&Tasks"), "");
- createMenuWindowsAction(MI_OpenBatchServers, tr("&Batch Servers"), "");
- createMenuWindowsAction(MI_OpenTMessage, tr("&Message Center"), "");
- createMenuWindowsAction(MI_OpenColorModel, tr("&Color Model"), "");
- createMenuWindowsAction(MI_OpenStudioPalette, tr("&Studio Palette"), "");
- createMenuWindowsAction(MI_OpenSchematic, tr("&Schematic"), "");
- createMenuWindowsAction(MI_OpenCleanupSettings, tr("&Cleanup Settings"), "");
-
- createMenuWindowsAction(MI_OpenFileBrowser2, tr("&Scene Cast"), "");
- createMenuWindowsAction(MI_OpenStyleControl, tr("&Style Editor"), "");
- createMenuWindowsAction(MI_OpenToolbar, tr("&Toolbar"), "");
- createMenuWindowsAction(MI_OpenToolOptionBar, tr("&Tool Option Bar"), "");
- createMenuWindowsAction(MI_OpenLevelView, tr("&Viewer"), "");
+ createMenuWindowsAction(MI_OpenFileBrowser, tr("&File Browser"), "");
+ createMenuWindowsAction(MI_OpenFileViewer, tr("&Flipbook"), "");
+ createMenuWindowsAction(MI_OpenFunctionEditor, tr("&Function Editor"), "");
+ createMenuWindowsAction(MI_OpenFilmStrip, tr("&Level Strip"), "");
+ createMenuWindowsAction(MI_OpenPalette, tr("&Palette"), "");
+ createRightClickMenuAction(MI_OpenPltGizmo, tr("&Palette Gizmo"), "");
+ createRightClickMenuAction(MI_EraseUnusedStyles, tr("&Delete Unused Styles"),
+ "");
+ createMenuWindowsAction(MI_OpenTasks, tr("&Tasks"), "");
+ createMenuWindowsAction(MI_OpenBatchServers, tr("&Batch Servers"), "");
+ createMenuWindowsAction(MI_OpenTMessage, tr("&Message Center"), "");
+ createMenuWindowsAction(MI_OpenColorModel, tr("&Color Model"), "");
+ createMenuWindowsAction(MI_OpenStudioPalette, tr("&Studio Palette"), "");
+ createMenuWindowsAction(MI_OpenSchematic, tr("&Schematic"), "");
+ createMenuWindowsAction(MI_OpenCleanupSettings, tr("&Cleanup Settings"), "");
+
+ createMenuWindowsAction(MI_OpenFileBrowser2, tr("&Scene Cast"), "");
+ createMenuWindowsAction(MI_OpenStyleControl, tr("&Style Editor"), "");
+ createMenuWindowsAction(MI_OpenToolbar, tr("&Toolbar"), "");
+ createMenuWindowsAction(MI_OpenToolOptionBar, tr("&Tool Option Bar"), "");
+ createMenuWindowsAction(MI_OpenLevelView, tr("&Viewer"), "");
#ifdef LINETEST
- createMenuWindowsAction(MI_OpenLineTestCapture, tr("&LineTest Capture"), "");
- createMenuWindowsAction(MI_OpenLineTestView, tr("&LineTest Viewer"), "");
+ createMenuWindowsAction(MI_OpenLineTestCapture, tr("&LineTest Capture"), "");
+ createMenuWindowsAction(MI_OpenLineTestView, tr("&LineTest Viewer"), "");
#endif
- createMenuWindowsAction(MI_OpenXshView, tr("&Xsheet"), "");
- // createAction(MI_TestAnimation, "Test Animation", "Ctrl+Return");
- // createAction(MI_Export, "Export", "Ctrl+E");
+ createMenuWindowsAction(MI_OpenXshView, tr("&Xsheet"), "");
+ // createAction(MI_TestAnimation, "Test Animation", "Ctrl+Return");
+ // createAction(MI_Export, "Export", "Ctrl+E");
- createMenuWindowsAction(MI_OpenComboViewer, tr("&ComboViewer"), "");
- createMenuWindowsAction(MI_OpenHistoryPanel, tr("&History"), "");
+ createMenuWindowsAction(MI_OpenComboViewer, tr("&ComboViewer"), "");
+ createMenuWindowsAction(MI_OpenHistoryPanel, tr("&History"), "");
- createMenuWindowsAction(MI_ResetRoomLayout, tr("&Reset to Default Rooms"), "");
- createMenuWindowsAction(MI_MaximizePanel, tr("Toggle Maximize Panel"), "`");
+ createMenuWindowsAction(MI_ResetRoomLayout, tr("&Reset to Default Rooms"),
+ "");
-
++ createMenuWindowsAction(MI_MaximizePanel, tr("Toggle Maximize Panel"), "`");
+ createMenuWindowsAction(MI_FullScreenWindow, tr("Toggle Full Screen"), "Ctrl+`");
- createMenuWindowsAction(MI_About, tr("&About OpenToonz..."), "");
-
- createRightClickMenuAction(MI_BlendColors, tr("&Blend colors"), "");
-
- createToggle(MI_OnionSkin, tr("Onion Skin Toggle"), "\\", false, RightClickMenuCommandType);
-
- //createRightClickMenuAction(MI_LoadSubSceneFile, tr("Load As Sub-xsheet"), "");
- //createRightClickMenuAction(MI_LoadResourceFile, tr("Load"), "");
- createRightClickMenuAction(MI_DuplicateFile, tr("Duplicate"), "");
- createRightClickMenuAction(MI_ShowFolderContents, tr("Show Folder Contents"), "");
- createRightClickMenuAction(MI_ConvertFiles, tr("Convert..."), "");
- createRightClickMenuAction(MI_CollectAssets, tr("Collect Assets"), "");
- createRightClickMenuAction(MI_ImportScenes, tr("Import Scene"), "");
- createRightClickMenuAction(MI_ExportScenes, tr("Export Scene..."), "");
-
- //createRightClickMenuAction(MI_PremultiplyFile, tr("Premultiply"), "");
- createMenuLevelAction(MI_ConvertToVectors, tr("Convert to Vectors..."), "");
- createMenuLevelAction(MI_Tracking, tr("Tracking..."), "");
- createRightClickMenuAction(MI_RemoveLevel, tr("Remove Level"), "");
- createRightClickMenuAction(MI_AddToBatchRenderList, tr("Add As Render Task"), "");
- createRightClickMenuAction(MI_AddToBatchCleanupList, tr("Add As Cleanup Task"), "");
-
- createRightClickMenuAction(MI_SelectRowKeyframes, tr("Select All Keys in this Row"), "");
- createRightClickMenuAction(MI_SelectColumnKeyframes, tr("Select All Keys in this Column"), "");
- createRightClickMenuAction(MI_SelectAllKeyframes, tr("Select All Keys"), "");
- createRightClickMenuAction(MI_SelectAllKeyframesNotBefore, tr("Select All Following Keys"), "");
- createRightClickMenuAction(MI_SelectAllKeyframesNotAfter, tr("Select All Previous Keys"), "");
- createRightClickMenuAction(MI_SelectPreviousKeysInColumn, tr("Select Previous Keys in this Column"), "");
- createRightClickMenuAction(MI_SelectFollowingKeysInColumn, tr("Select Following Keys in this Column"), "");
- createRightClickMenuAction(MI_SelectPreviousKeysInRow, tr("Select Previous Keys in this Row"), "");
- createRightClickMenuAction(MI_SelectFollowingKeysInRow, tr("Select Following Keys in this Row"), "");
- createRightClickMenuAction(MI_InvertKeyframeSelection, tr("Invert Key Selection"), "");
-
- createRightClickMenuAction(MI_SetAcceleration, tr("Set Acceleration"), "");
- createRightClickMenuAction(MI_SetDeceleration, tr("Set Deceleration"), "");
- createRightClickMenuAction(MI_SetConstantSpeed, tr("Set Constant Speed"), "");
- createRightClickMenuAction(MI_ResetInterpolation, tr("Reset Interpolation"), "");
-
- createRightClickMenuAction(MI_FoldColumns, tr("Fold Column"), "");
-
- createRightClickMenuAction(MI_ActivateThisColumnOnly, tr("Show This Only"), "");
- createRightClickMenuAction(MI_ActivateSelectedColumns, tr("Show Selected"), "");
- createRightClickMenuAction(MI_ActivateAllColumns, tr("Show All"), "");
- createRightClickMenuAction(MI_DeactivateSelectedColumns, tr("Hide Selected"), "");
- createRightClickMenuAction(MI_DeactivateAllColumns, tr("Hide All"), "");
- createRightClickMenuAction(MI_ToggleColumnsActivation, tr("Toggle Show/Hide"), "");
- createRightClickMenuAction(MI_EnableThisColumnOnly, tr("ON This Only"), "");
- createRightClickMenuAction(MI_EnableSelectedColumns, tr("ON Selected"), "");
- createRightClickMenuAction(MI_EnableAllColumns, tr("ON All"), "");
- createRightClickMenuAction(MI_DisableAllColumns, tr("OFF All"), "");
- createRightClickMenuAction(MI_DisableSelectedColumns, tr("OFF Selected"), "");
- createRightClickMenuAction(MI_SwapEnabledColumns, tr("Swap ON/OFF"), "");
- createRightClickMenuAction(MI_LockThisColumnOnly, tr("Lock This Only"), "");
- createRightClickMenuAction(MI_LockSelectedColumns, tr("Lock Selected"), "");
- createRightClickMenuAction(MI_LockAllColumns, tr("Lock All"), "");
- createRightClickMenuAction(MI_UnlockSelectedColumns, tr("Unlock Selected"), "");
- createRightClickMenuAction(MI_UnlockAllColumns, tr("Unlock All"), "");
- createRightClickMenuAction(MI_ToggleColumnLocks, tr("Swap Lock/Unlock"), "");
- /*-- カレントカラムの右側のカラムを全て非表示にするコマンド --*/
- createRightClickMenuAction(MI_DeactivateUpperColumns, "Hide Upper Columns", "");
-
- createToolAction(T_Edit, "edit", tr("Edit Tool"), "E");
- createToolAction(T_Selection, "selection", tr("Selection Tool"), "S");
- createToolAction(T_Brush, "brush", tr("Brush Tool"), "B");
- createToolAction(T_Geometric, "geometric", tr("Geometric Tool"), "G");
- createToolAction(T_Type, "type", tr("Type Tool"), "Y");
- createToolAction(T_Fill, "fill", tr("Fill Tool"), "F");
- createToolAction(T_PaintBrush, "paintbrush", tr("Paint Brush Tool"), "");
- createToolAction(T_Eraser, "eraser", tr("Eraser Tool"), "A");
- createToolAction(T_Tape, "tape", tr("Tape Tool"), "T");
- createToolAction(T_StylePicker, "stylepicker", tr("Style Picker Tool"), "K");
- createToolAction(T_RGBPicker, "RGBpicker", tr("RGB Picker Tool"), "");
- createToolAction(T_ControlPointEditor, "controlpointeditor", tr("Control Point Editor Tool"), "C");
- createToolAction(T_Pinch, "pinch", tr("Pinch Tool"), "P");
- createToolAction(T_Pump, "pump", tr("Pump Tool"), "");
- createToolAction(T_Magnet, "magnet", tr("Magnet Tool"), "");
- createToolAction(T_Bender, "bender", tr("Bender Tool"), "");
- createToolAction(T_Iron, "iron", tr("Iron Tool"), "");
- createToolAction(T_Cutter, "cutter", tr("Cutter Tool"), "");
- createToolAction(T_Skeleton, "skeleton", tr("Skeleton Tool"), "");
- createToolAction(T_Tracker, "tracker", tr("Tracker Tool"), "");
- createToolAction(T_Hook, "hook", tr("Hook Tool"), "");
- createToolAction(T_Zoom, "zoom", tr("Zoom Tool"), "Shift+Space");
- createToolAction(T_Rotate, "rotate", tr("Rotate Tool"), "Ctrl+Space");
- createToolAction(T_Hand, "hand", tr("Hand Tool"), "Space");
- createToolAction(T_Plastic, "plastic", tr("Plastic Tool"), "");
- createToolAction(T_Ruler, "ruler", tr("Ruler Tool"), "");
- createToolAction(T_Finger, "finger", tr("Finger Tool"), "");
-
- createViewerAction(V_ZoomIn, tr("Zoom In"), "+");
- createViewerAction(V_ZoomOut, tr("Zoom Out"), "-");
- createViewerAction(V_ZoomReset, tr("Reset View"), "0");
- createViewerAction(V_ZoomFit, tr("Fit to Window"), "");
- createViewerAction(V_ActualPixelSize, tr("Actual Pixel Size"), "N");
- createViewerAction(V_ShowHideFullScreen, tr("Show//Hide Full Screen"), "");
- CommandManager::instance()->setToggleTexts(V_ShowHideFullScreen, tr("Full Screen Mode"), tr("Exit Full Screen Mode"));
-
- createMiscAction(MI_RefreshTree, tr("Refresh Folder Tree"), "");
-
- createToolOptionsAction("A_ToolOption_GlobalKey", tr("Global Key"), "");
-
- createToolOptionsAction("A_IncreaseMaxBrushThickness", tr("Brush size - Increase max"), "");
- createToolOptionsAction("A_DecreaseMaxBrushThickness", tr("Brush size - Decrease max"), "");
- createToolOptionsAction("A_IncreaseMinBrushThickness", tr("Brush size - Increase min"), "");
- createToolOptionsAction("A_DecreaseMinBrushThickness", tr("Brush size - Decrease min"), "");
- createToolOptionsAction("A_IncreaseBrushHardness", tr("Brush hardness - Increase"), "");
- createToolOptionsAction("A_DecreaseBrushHardness", tr("Brush hardness - Decrease"), "");
-
- createToolOptionsAction("A_ToolOption_AutoGroup", tr("Auto Group"), "");
- createToolOptionsAction("A_ToolOption_BreakSharpAngles", tr("Break sharp angles"), "");
- createToolOptionsAction("A_ToolOption_FrameRange", tr("Frame range"), "F6");
- createToolOptionsAction("A_ToolOption_IK", tr("Inverse kinematics"), "");
- createToolOptionsAction("A_ToolOption_Invert", tr("Invert"), "");
- createToolOptionsAction("A_ToolOption_Manual", tr("Manual"), "");
- createToolOptionsAction("A_ToolOption_OnionSkin", tr("Onion skin"), "");
- createToolOptionsAction("A_ToolOption_Orientation", tr("Orientation"), "");
- createToolOptionsAction("A_ToolOption_PencilMode", tr("Pencil Mode"), "");
- createToolOptionsAction("A_ToolOption_PreserveThickness", tr("Preserve Thickness"), "");
- createToolOptionsAction("A_ToolOption_PressureSensibility", tr("Pressure sensibility"), "");
- createToolOptionsAction("A_ToolOption_SegmentInk", tr("Segment Ink"), "F8");
- createToolOptionsAction("A_ToolOption_Selective", tr("Selective"), "F7");
- createToolOptionsAction("A_ToolOption_Smooth", tr("Smooth"), "");
- createToolOptionsAction("A_ToolOption_Snap", tr("Snap"), "");
- createToolOptionsAction("A_ToolOption_AutoSelectDrawing", tr("Auto Select Drawing"), "");
- createToolOptionsAction("A_ToolOption_Autofill", tr("Auto Fill"), "");
- createToolOptionsAction("A_ToolOption_JoinVectors", tr("Join Vectors"), "");
- createToolOptionsAction("A_ToolOption_ShowOnlyActiveSkeleton", tr("Show Only Active Skeleton"), "");
-
- //Option Menu
- createToolOptionsAction("A_ToolOption_BrushPreset", tr("Brush Preset"), "");
- createToolOptionsAction("A_ToolOption_GeometricShape", tr("Geometric Shape"), "");
- createToolOptionsAction("A_ToolOption_GeometricEdge", tr("Geometric Edge"), "");
- createToolOptionsAction("A_ToolOption_Mode", tr("Mode"), "");
- createToolOptionsAction("A_ToolOption_Mode:Areas", tr("Mode - Areas"), "");
- createToolOptionsAction("A_ToolOption_Mode:Lines", tr("Mode - Lines"), "");
- createToolOptionsAction("A_ToolOption_Mode:Lines & Areas", tr("Mode - Lines & Areas"), "");
- createToolOptionsAction("A_ToolOption_Type", tr("Type"), "");
- createToolOptionsAction("A_ToolOption_Type:Normal", tr("Type - Normal"), "");
- createToolOptionsAction("A_ToolOption_Type:Rectangular", tr("Type - Rectangular"), "F5");
- createToolOptionsAction("A_ToolOption_Type:Freehand", tr("Type - Freehand"), "");
- createToolOptionsAction("A_ToolOption_Type:Polyline", tr("Type - Polyline"), "");
- createToolOptionsAction("A_ToolOption_TypeFont", tr("TypeTool Font"), "");
- createToolOptionsAction("A_ToolOption_TypeSize", tr("TypeTool Size"), "");
- createToolOptionsAction("A_ToolOption_TypeStyle", tr("TypeTool Style"), "");
-
- createToolOptionsAction("A_ToolOption_EditToolActiveAxis", "Active Axis", "");
- createToolOptionsAction("A_ToolOption_EditToolActiveAxis:Position", "Active Axis - Position", "");
- createToolOptionsAction("A_ToolOption_EditToolActiveAxis:Rotation", "Active Axis - Rotation", "");
- createToolOptionsAction("A_ToolOption_EditToolActiveAxis:Scale", "Active Axis - Scale", "");
- createToolOptionsAction("A_ToolOption_EditToolActiveAxis:Shear", "Active Axis - Shear", "");
- createToolOptionsAction("A_ToolOption_EditToolActiveAxis:Center", "Active Axis - Center", "");
-
- createToolOptionsAction("A_ToolOption_SkeletonMode:Build Skeleton", tr("Build Skeleton Mode"), "");
- createToolOptionsAction("A_ToolOption_SkeletonMode:Animate", tr("Animate Mode"), "");
- createToolOptionsAction("A_ToolOption_SkeletonMode:Inverse Kinematics", tr("Inverse Kinematics Mode"), "");
- createToolOptionsAction("A_ToolOption_AutoSelect:None", tr("None Pick Mode"), "");
- createToolOptionsAction("A_ToolOption_AutoSelect:Column", tr("Column Pick Mode"), "");
- createToolOptionsAction("A_ToolOption_AutoSelect:Pegbar", tr("Pegbar Pick Mode"), "");
- createToolOptionsAction("A_ToolOption_PickScreen", tr("Pick Screen"), "");
- createToolOptionsAction("A_ToolOption_Meshify", tr("Create Mesh"), "");
-
- /*-- FillAreas, FillLinesにキー1つで切り替えるためのコマンド --*/
- createAction(MI_FillAreas, "Fill Tool - Areas", "", ToolCommandType);
- createAction(MI_FillLines, "Fill Tool - Lines", "", ToolCommandType);
- /*-- Style picker Area, Style picker Lineににキー1つで切り替えるためのコマンド --*/
- createAction(MI_PickStyleAreas, "Style Picker Tool - Areas", "", ToolCommandType);
- createAction(MI_PickStyleLines, "Style Picker Tool - Lines", "", ToolCommandType);
-
- createMiscAction("A_FxSchematicToggle", "Toggle FX/Stage schematic", "");
- }
-
- //-----------------------------------------------------------------------------
-
- void MainWindow::onInkCheckTriggered(bool on)
- {
- if (!on)
- return;
- QAction *ink1CheckAction = CommandManager::instance()->getAction(MI_Ink1Check);
- if (ink1CheckAction)
- ink1CheckAction->setChecked(false);
- }
-
- //-----------------------------------------------------------------------------
-
- void MainWindow::onInk1CheckTriggered(bool on)
- {
- if (!on)
- return;
- QAction *inkCheckAction = CommandManager::instance()->getAction(MI_ICheck);
- if (inkCheckAction)
- inkCheckAction->setChecked(false);
+ createMenuWindowsAction(MI_About, tr("&About OpenToonz..."), "");
+
+ createRightClickMenuAction(MI_BlendColors, tr("&Blend colors"), "");
+
- createToggle(MI_OnionSkin, tr("Onion Skin"), "", false,
++ createToggle(MI_OnionSkin, tr("Onion Skin Toggle"), "//", false,
+ RightClickMenuCommandType);
+
+ // createRightClickMenuAction(MI_LoadSubSceneFile, tr("Load As
+ // Sub-xsheet"), "");
+ // createRightClickMenuAction(MI_LoadResourceFile, tr("Load"),
+ // "");
+ createRightClickMenuAction(MI_DuplicateFile, tr("Duplicate"), "");
+ createRightClickMenuAction(MI_ShowFolderContents, tr("Show Folder Contents"),
+ "");
+ createRightClickMenuAction(MI_ConvertFiles, tr("Convert..."), "");
+ createRightClickMenuAction(MI_CollectAssets, tr("Collect Assets"), "");
+ createRightClickMenuAction(MI_ImportScenes, tr("Import Scene"), "");
+ createRightClickMenuAction(MI_ExportScenes, tr("Export Scene..."), "");
+
+ // createRightClickMenuAction(MI_PremultiplyFile, tr("Premultiply"),
+ // "");
+ createMenuLevelAction(MI_ConvertToVectors, tr("Convert to Vectors..."), "");
+ createMenuLevelAction(MI_Tracking, tr("Tracking..."), "");
+ createRightClickMenuAction(MI_RemoveLevel, tr("Remove Level"), "");
+ createRightClickMenuAction(MI_AddToBatchRenderList, tr("Add As Render Task"),
+ "");
+ createRightClickMenuAction(MI_AddToBatchCleanupList,
+ tr("Add As Cleanup Task"), "");
+
+ createRightClickMenuAction(MI_SelectRowKeyframes,
+ tr("Select All Keys in this Row"), "");
+ createRightClickMenuAction(MI_SelectColumnKeyframes,
+ tr("Select All Keys in this Column"), "");
+ createRightClickMenuAction(MI_SelectAllKeyframes, tr("Select All Keys"), "");
+ createRightClickMenuAction(MI_SelectAllKeyframesNotBefore,
+ tr("Select All Following Keys"), "");
+ createRightClickMenuAction(MI_SelectAllKeyframesNotAfter,
+ tr("Select All Previous Keys"), "");
+ createRightClickMenuAction(MI_SelectPreviousKeysInColumn,
+ tr("Select Previous Keys in this Column"), "");
+ createRightClickMenuAction(MI_SelectFollowingKeysInColumn,
+ tr("Select Following Keys in this Column"), "");
+ createRightClickMenuAction(MI_SelectPreviousKeysInRow,
+ tr("Select Previous Keys in this Row"), "");
+ createRightClickMenuAction(MI_SelectFollowingKeysInRow,
+ tr("Select Following Keys in this Row"), "");
+ createRightClickMenuAction(MI_InvertKeyframeSelection,
+ tr("Invert Key Selection"), "");
+
+ createRightClickMenuAction(MI_SetAcceleration, tr("Set Acceleration"), "");
+ createRightClickMenuAction(MI_SetDeceleration, tr("Set Deceleration"), "");
+ createRightClickMenuAction(MI_SetConstantSpeed, tr("Set Constant Speed"), "");
+ createRightClickMenuAction(MI_ResetInterpolation, tr("Reset Interpolation"),
+ "");
+
+ createRightClickMenuAction(MI_FoldColumns, tr("Fold Column"), "");
+
+ createRightClickMenuAction(MI_ActivateThisColumnOnly, tr("Show This Only"),
+ "");
+ createRightClickMenuAction(MI_ActivateSelectedColumns, tr("Show Selected"),
+ "");
+ createRightClickMenuAction(MI_ActivateAllColumns, tr("Show All"), "");
+ createRightClickMenuAction(MI_DeactivateSelectedColumns, tr("Hide Selected"),
+ "");
+ createRightClickMenuAction(MI_DeactivateAllColumns, tr("Hide All"), "");
+ createRightClickMenuAction(MI_ToggleColumnsActivation, tr("Toggle Show/Hide"),
+ "");
+ createRightClickMenuAction(MI_EnableThisColumnOnly, tr("ON This Only"), "");
+ createRightClickMenuAction(MI_EnableSelectedColumns, tr("ON Selected"), "");
+ createRightClickMenuAction(MI_EnableAllColumns, tr("ON All"), "");
+ createRightClickMenuAction(MI_DisableAllColumns, tr("OFF All"), "");
+ createRightClickMenuAction(MI_DisableSelectedColumns, tr("OFF Selected"), "");
+ createRightClickMenuAction(MI_SwapEnabledColumns, tr("Swap ON/OFF"), "");
+ createRightClickMenuAction(MI_LockThisColumnOnly, tr("Lock This Only"), "");
+ createRightClickMenuAction(MI_LockSelectedColumns, tr("Lock Selected"), "");
+ createRightClickMenuAction(MI_LockAllColumns, tr("Lock All"), "");
+ createRightClickMenuAction(MI_UnlockSelectedColumns, tr("Unlock Selected"),
+ "");
+ createRightClickMenuAction(MI_UnlockAllColumns, tr("Unlock All"), "");
+ createRightClickMenuAction(MI_ToggleColumnLocks, tr("Swap Lock/Unlock"), "");
+ /*-- カレントカラムの右側のカラムを全て非表示にするコマンド --*/
+ createRightClickMenuAction(MI_DeactivateUpperColumns, "Hide Upper Columns",
+ "");
+
+ createToolAction(T_Edit, "edit", tr("Edit Tool"), "E");
+ createToolAction(T_Selection, "selection", tr("Selection Tool"), "S");
+ createToolAction(T_Brush, "brush", tr("Brush Tool"), "B");
+ createToolAction(T_Geometric, "geometric", tr("Geometric Tool"), "G");
+ createToolAction(T_Type, "type", tr("Type Tool"), "Y");
+ createToolAction(T_Fill, "fill", tr("Fill Tool"), "F");
+ createToolAction(T_PaintBrush, "paintbrush", tr("Paint Brush Tool"), "");
+ createToolAction(T_Eraser, "eraser", tr("Eraser Tool"), "A");
+ createToolAction(T_Tape, "tape", tr("Tape Tool"), "T");
+ createToolAction(T_StylePicker, "stylepicker", tr("Style Picker Tool"), "K");
+ createToolAction(T_RGBPicker, "RGBpicker", tr("RGB Picker Tool"), "");
+ createToolAction(T_ControlPointEditor, "controlpointeditor",
+ tr("Control Point Editor Tool"), "C");
+ createToolAction(T_Pinch, "pinch", tr("Pinch Tool"), "P");
+ createToolAction(T_Pump, "pump", tr("Pump Tool"), "");
+ createToolAction(T_Magnet, "magnet", tr("Magnet Tool"), "");
+ createToolAction(T_Bender, "bender", tr("Bender Tool"), "");
+ createToolAction(T_Iron, "iron", tr("Iron Tool"), "");
+ createToolAction(T_Cutter, "cutter", tr("Cutter Tool"), "");
+ createToolAction(T_Skeleton, "skeleton", tr("Skeleton Tool"), "");
+ createToolAction(T_Tracker, "tracker", tr("Tracker Tool"), "");
+ createToolAction(T_Hook, "hook", tr("Hook Tool"), "");
+ createToolAction(T_Zoom, "zoom", tr("Zoom Tool"), "Shift+Space");
+ createToolAction(T_Rotate, "rotate", tr("Rotate Tool"), "Ctrl+Space");
+ createToolAction(T_Hand, "hand", tr("Hand Tool"), "Space");
+ createToolAction(T_Plastic, "plastic", tr("Plastic Tool"), "");
+ createToolAction(T_Ruler, "ruler", tr("Ruler Tool"), "");
+ createToolAction(T_Finger, "finger", tr("Finger Tool"), "");
+
+ createViewerAction(V_ZoomIn, tr("Zoom In"), "+");
+ createViewerAction(V_ZoomOut, tr("Zoom Out"), "-");
+ createViewerAction(V_ZoomReset, tr("Reset View"), "0");
+ createViewerAction(V_ZoomFit, tr("Fit to Window"), "");
+ createViewerAction(V_ActualPixelSize, tr("Actual Pixel Size"), "N");
+ createViewerAction(V_ShowHideFullScreen, tr("Show//Hide Full Screen"), "");
+ CommandManager::instance()->setToggleTexts(V_ShowHideFullScreen,
+ tr("Full Screen Mode"),
+ tr("Exit Full Screen Mode"));
+
+ createMiscAction(MI_RefreshTree, tr("Refresh Folder Tree"), "");
+
+ createToolOptionsAction("A_ToolOption_GlobalKey", tr("Global Key"), "");
+
+ createToolOptionsAction("A_IncreaseMaxBrushThickness",
+ tr("Brush size - Increase max"), "");
+ createToolOptionsAction("A_DecreaseMaxBrushThickness",
+ tr("Brush size - Decrease max"), "");
+ createToolOptionsAction("A_IncreaseMinBrushThickness",
+ tr("Brush size - Increase min"), "");
+ createToolOptionsAction("A_DecreaseMinBrushThickness",
+ tr("Brush size - Decrease min"), "");
+ createToolOptionsAction("A_IncreaseBrushHardness",
+ tr("Brush hardness - Increase"), "");
+ createToolOptionsAction("A_DecreaseBrushHardness",
+ tr("Brush hardness - Decrease"), "");
+
+ createToolOptionsAction("A_ToolOption_AutoGroup", tr("Auto Group"), "");
+ createToolOptionsAction("A_ToolOption_BreakSharpAngles",
+ tr("Break sharp angles"), "");
+ createToolOptionsAction("A_ToolOption_FrameRange", tr("Frame range"), "F6");
+ createToolOptionsAction("A_ToolOption_IK", tr("Inverse kinematics"), "");
+ createToolOptionsAction("A_ToolOption_Invert", tr("Invert"), "");
+ createToolOptionsAction("A_ToolOption_Manual", tr("Manual"), "");
+ createToolOptionsAction("A_ToolOption_OnionSkin", tr("Onion skin"), "");
+ createToolOptionsAction("A_ToolOption_Orientation", tr("Orientation"), "");
+ createToolOptionsAction("A_ToolOption_PencilMode", tr("Pencil Mode"), "");
+ createToolOptionsAction("A_ToolOption_PreserveThickness",
+ tr("Preserve Thickness"), "");
+ createToolOptionsAction("A_ToolOption_PressureSensibility",
+ tr("Pressure sensibility"), "");
+ createToolOptionsAction("A_ToolOption_SegmentInk", tr("Segment Ink"), "F8");
+ createToolOptionsAction("A_ToolOption_Selective", tr("Selective"), "F7");
+ createToolOptionsAction("A_ToolOption_Smooth", tr("Smooth"), "");
+ createToolOptionsAction("A_ToolOption_Snap", tr("Snap"), "");
+ createToolOptionsAction("A_ToolOption_AutoSelectDrawing",
+ tr("Auto Select Drawing"), "");
+ createToolOptionsAction("A_ToolOption_Autofill", tr("Auto Fill"), "");
+ createToolOptionsAction("A_ToolOption_JoinVectors", tr("Join Vectors"), "");
+ createToolOptionsAction("A_ToolOption_ShowOnlyActiveSkeleton",
+ tr("Show Only Active Skeleton"), "");
+
+ // Option Menu
+ createToolOptionsAction("A_ToolOption_BrushPreset", tr("Brush Preset"), "");
+ createToolOptionsAction("A_ToolOption_GeometricShape", tr("Geometric Shape"),
+ "");
+ createToolOptionsAction("A_ToolOption_GeometricEdge", tr("Geometric Edge"),
+ "");
+ createToolOptionsAction("A_ToolOption_Mode", tr("Mode"), "");
+ createToolOptionsAction("A_ToolOption_Mode:Areas", tr("Mode - Areas"), "");
+ createToolOptionsAction("A_ToolOption_Mode:Lines", tr("Mode - Lines"), "");
+ createToolOptionsAction("A_ToolOption_Mode:Lines & Areas",
+ tr("Mode - Lines & Areas"), "");
+ createToolOptionsAction("A_ToolOption_Type", tr("Type"), "");
+ createToolOptionsAction("A_ToolOption_Type:Normal", tr("Type - Normal"), "");
+ createToolOptionsAction("A_ToolOption_Type:Rectangular",
+ tr("Type - Rectangular"), "F5");
+ createToolOptionsAction("A_ToolOption_Type:Freehand", tr("Type - Freehand"),
+ "");
+ createToolOptionsAction("A_ToolOption_Type:Polyline", tr("Type - Polyline"),
+ "");
+ createToolOptionsAction("A_ToolOption_TypeFont", tr("TypeTool Font"), "");
+ createToolOptionsAction("A_ToolOption_TypeSize", tr("TypeTool Size"), "");
+ createToolOptionsAction("A_ToolOption_TypeStyle", tr("TypeTool Style"), "");
+
+ createToolOptionsAction("A_ToolOption_EditToolActiveAxis", "Active Axis", "");
+ createToolOptionsAction("A_ToolOption_EditToolActiveAxis:Position",
+ "Active Axis - Position", "");
+ createToolOptionsAction("A_ToolOption_EditToolActiveAxis:Rotation",
+ "Active Axis - Rotation", "");
+ createToolOptionsAction("A_ToolOption_EditToolActiveAxis:Scale",
+ "Active Axis - Scale", "");
+ createToolOptionsAction("A_ToolOption_EditToolActiveAxis:Shear",
+ "Active Axis - Shear", "");
+ createToolOptionsAction("A_ToolOption_EditToolActiveAxis:Center",
+ "Active Axis - Center", "");
+
+ createToolOptionsAction("A_ToolOption_SkeletonMode:Build Skeleton",
+ tr("Build Skeleton Mode"), "");
+ createToolOptionsAction("A_ToolOption_SkeletonMode:Animate",
+ tr("Animate Mode"), "");
+ createToolOptionsAction("A_ToolOption_SkeletonMode:Inverse Kinematics",
+ tr("Inverse Kinematics Mode"), "");
+ createToolOptionsAction("A_ToolOption_AutoSelect:None", tr("None Pick Mode"),
+ "");
+ createToolOptionsAction("A_ToolOption_AutoSelect:Column",
+ tr("Column Pick Mode"), "");
+ createToolOptionsAction("A_ToolOption_AutoSelect:Pegbar",
+ tr("Pegbar Pick Mode"), "");
+ createToolOptionsAction("A_ToolOption_PickScreen", tr("Pick Screen"), "");
+ createToolOptionsAction("A_ToolOption_Meshify", tr("Create Mesh"), "");
+
+ /*-- FillAreas, FillLinesにキー1つで切り替えるためのコマンド --*/
+ createAction(MI_FillAreas, "Fill Tool - Areas", "", ToolCommandType);
+ createAction(MI_FillLines, "Fill Tool - Lines", "", ToolCommandType);
+ /*-- Style picker Area, Style picker Lineににキー1つで切り替えるためのコマンド
+ * --*/
+ createAction(MI_PickStyleAreas, "Style Picker Tool - Areas", "",
+ ToolCommandType);
+ createAction(MI_PickStyleLines, "Style Picker Tool - Lines", "",
+ ToolCommandType);
+
+ createMiscAction("A_FxSchematicToggle", "Toggle FX/Stage schematic", "");
+ }
+
+ //-----------------------------------------------------------------------------
+
+ void MainWindow::onInkCheckTriggered(bool on) {
+ if (!on) return;
+ QAction *ink1CheckAction =
+ CommandManager::instance()->getAction(MI_Ink1Check);
+ if (ink1CheckAction) ink1CheckAction->setChecked(false);
+ }
+
+ //-----------------------------------------------------------------------------
+
+ void MainWindow::onInk1CheckTriggered(bool on) {
+ if (!on) return;
+ QAction *inkCheckAction = CommandManager::instance()->getAction(MI_ICheck);
+ if (inkCheckAction) inkCheckAction->setChecked(false);
}
//---------------------------------------------------------------------------------------
diff --cc toonz/sources/toonz/mainwindow.h
index 727574439,81c4b508b..2705559c5
--- a/toonz/sources/toonz/mainwindow.h
+++ b/toonz/sources/toonz/mainwindow.h
@@@ -65,158 -63,176 +63,178 @@@ public
//-----------------------------------------------------------------------------
- class MainWindow : public QMainWindow
- {
- Q_OBJECT
+ class MainWindow : public QMainWindow {
+ Q_OBJECT
- bool m_saveSettingsOnQuit;
- int m_oldRoomIndex;
- QString m_currentRoomsChoice;
- bool panelMaximized;
- UpdateChecker *m_updateChecker;
+ bool m_saveSettingsOnQuit;
+ int m_oldRoomIndex;
+ QString m_currentRoomsChoice;
-
++ bool panelMaximized;
+ UpdateChecker *m_updateChecker;
- TopBar *m_topBar;
+ TopBar *m_topBar;
- QActionGroup *m_toolsActionGroup;
+ QActionGroup *m_toolsActionGroup;
- QStackedWidget *m_stackedWidget;
+ QStackedWidget *m_stackedWidget;
- /*-- show layout name in the title bar --*/
- QString m_layoutName;
+ /*-- show layout name in the title bar --*/
+ QString m_layoutName;
public:
#if QT_VERSION >= 0x050500
- MainWindow(const QString &argumentLayoutFileName, QWidget *parent = 0, Qt::WindowFlags flags = 0);
+ MainWindow(const QString &argumentLayoutFileName, QWidget *parent = 0,
+ Qt::WindowFlags flags = 0);
#else
- MainWindow(const QString &argumentLayoutFileName, QWidget *parent = 0, Qt::WFlags flags = 0);
+ MainWindow(const QString &argumentLayoutFileName, QWidget *parent = 0,
+ Qt::WFlags flags = 0);
#endif
- ~MainWindow();
-
- void startupFloatingPanels();
-
- void onQuit();
- void onUndo();
- void onRedo();
- void onNewScene();
- void onLoadScene();
- void onLoadSubScene();
- void resetRoomsLayout();
- void maximizePanel();
+ ~MainWindow();
+
+ void startupFloatingPanels();
+
+ void onQuit();
+ void onUndo();
+ void onRedo();
+ void onNewScene();
+ void onLoadScene();
+ void onLoadSubScene();
+ void resetRoomsLayout();
++ void maximizePanel();
+ void fullScreenWindow();
- void autofillToggle();
- void onUpgradeTabPro();
- void onAbout();
- void checkForUpdates();
- int getRoomCount() const;
- Room *getRoom(int index) const;
- Room *getRoomByName(QString &roomName);
-
- Room *getCurrentRoom() const;
- void refreshWriteSettings();
- /*-- FillAreas,FillLinesに直接切り替えるコマンド --*/
- void toggleFillAreas();
- void toggleFillLines();
- /*-- StylepickerAreas,StylepickerLinesに直接切り替えるコマンド --*/
- void togglePickStyleAreas();
- void togglePickStyleLines();
-
- QString getLayoutName() { return m_layoutName; }
+ void autofillToggle();
+ void onUpgradeTabPro();
+ void onAbout();
+ void checkForUpdates();
+ int getRoomCount() const;
+ Room *getRoom(int index) const;
+ Room *getRoomByName(QString &roomName);
+
+ Room *getCurrentRoom() const;
+ void refreshWriteSettings();
+ /*-- FillAreas,FillLinesに直接切り替えるコマンド --*/
+ void toggleFillAreas();
+ void toggleFillLines();
+ /*-- StylepickerAreas,StylepickerLinesに直接切り替えるコマンド --*/
+ void togglePickStyleAreas();
+ void togglePickStyleLines();
+
+ QString getLayoutName() { return m_layoutName; }
+
protected:
- void showEvent(QShowEvent *);
- void closeEvent(QCloseEvent *);
- void readSettings(const QString &layoutFileName);
- void writeSettings();
+ void showEvent(QShowEvent *);
+ void closeEvent(QCloseEvent *);
+ void readSettings(const QString &layoutFileName);
+ void writeSettings();
private:
- /*!Must be call before readSettings().*/
- void defineActions();
- /*
- Room *createPaintRoom();
- Room *createAnimationRoom();
- Room *createBrowserRoom();
- Room *createPltEditRoom();
- Room *createFarmRoom();
- */
- Room *createCleanupRoom();
- Room *createPltEditRoom();
- Room *createInknPaintRoom();
- Room *createXsheetRoom();
- Room *createBatchesRoom();
- Room *createBrowserRoom();
-
- QAction *createAction(const char *id, const QString &name, const QString &defaultShortcut, CommandType type = MenuFileCommandType);
- QAction *createRightClickMenuAction(const char *id, const QString &name, const QString &defaultShortcut);
- QAction *createMenuFileAction(const char *id, const QString &name, const QString &defaultShortcut);
- QAction *createMenuEditAction(const char *id, const QString &name, const QString &defaultShortcut);
- QAction *createMenuScanCleanupAction(const char *id, const QString &name, const QString &defaultShortcut);
- QAction *createMenuLevelAction(const char *id, const QString &name, const QString &defaultShortcut);
- QAction *createMenuXsheetAction(const char *id, const QString &name, const QString &defaultShortcut);
- QAction *createMenuCellsAction(const char *id, const QString &name, const QString &defaultShortcut);
- QAction *createMenuViewAction(const char *id, const QString &name, const QString &defaultShortcut);
- QAction *createMenuWindowsAction(const char *id, const QString &name, const QString &defaultShortcut);
-
- QAction *createPlaybackAction(const char *id, const QString &name, const QString &defaultShortcut);
- QAction *createRGBAAction(const char *id, const QString &name, const QString &defaultShortcut);
- QAction *createFillAction(const char *id, const QString &name, const QString &defaultShortcut);
- QAction *createMenuAction(const char *id, const QString &name, QList<QString> list);
- QAction *createToggle(const char *id, const QString &name, const QString &defaultShortcut, bool startStatus, CommandType type);
- QAction *createToolAction(const char *id, const char *iconName, const QString &name, const QString &defaultShortcut);
- QAction *createViewerAction(const char *id, const QString &name, const QString &defaultShortcut);
- QAction *createMiscAction(const char *id, const QString &name, const char *defaultShortcut);
- QAction *createToolOptionsAction(const char *id, const QString &name, const QString &defaultShortcut);
+ /*!Must be call before readSettings().*/
+ void defineActions();
+ /*
+ Room *createPaintRoom();
+ Room *createAnimationRoom();
+ Room *createBrowserRoom();
+ Room *createPltEditRoom();
+ Room *createFarmRoom();
+ */
+ Room *createCleanupRoom();
+ Room *createPltEditRoom();
+ Room *createInknPaintRoom();
+ Room *createXsheetRoom();
+ Room *createBatchesRoom();
+ Room *createBrowserRoom();
+
+ QAction *createAction(const char *id, const QString &name,
+ const QString &defaultShortcut,
+ CommandType type = MenuFileCommandType);
+ QAction *createRightClickMenuAction(const char *id, const QString &name,
+ const QString &defaultShortcut);
+ QAction *createMenuFileAction(const char *id, const QString &name,
+ const QString &defaultShortcut);
+ QAction *createMenuEditAction(const char *id, const QString &name,
+ const QString &defaultShortcut);
+ QAction *createMenuScanCleanupAction(const char *id, const QString &name,
+ const QString &defaultShortcut);
+ QAction *createMenuLevelAction(const char *id, const QString &name,
+ const QString &defaultShortcut);
+ QAction *createMenuXsheetAction(const char *id, const QString &name,
+ const QString &defaultShortcut);
+ QAction *createMenuCellsAction(const char *id, const QString &name,
+ const QString &defaultShortcut);
+ QAction *createMenuViewAction(const char *id, const QString &name,
+ const QString &defaultShortcut);
+ QAction *createMenuWindowsAction(const char *id, const QString &name,
+ const QString &defaultShortcut);
+
+ QAction *createPlaybackAction(const char *id, const QString &name,
+ const QString &defaultShortcut);
+ QAction *createRGBAAction(const char *id, const QString &name,
+ const QString &defaultShortcut);
+ QAction *createFillAction(const char *id, const QString &name,
+ const QString &defaultShortcut);
+ QAction *createMenuAction(const char *id, const QString &name,
+ QList<QString> list);
+ QAction *createToggle(const char *id, const QString &name,
+ const QString &defaultShortcut, bool startStatus,
+ CommandType type);
+ QAction *createToolAction(const char *id, const char *iconName,
+ const QString &name,
+ const QString &defaultShortcut);
+ QAction *createViewerAction(const char *id, const QString &name,
+ const QString &defaultShortcut);
+ QAction *createMiscAction(const char *id, const QString &name,
+ const char *defaultShortcut);
+ QAction *createToolOptionsAction(const char *id, const QString &name,
+ const QString &defaultShortcut);
protected slots:
- void onCurrentRoomChanged(int newRoomIndex);
- void onIndexSwapped(int firstIndex, int secondIndex);
- void insertNewRoom();
- void deleteRoom(int index);
- void renameRoom(int index, const QString name);
- void onMenuCheckboxChanged();
+ void onCurrentRoomChanged(int newRoomIndex);
+ void onIndexSwapped(int firstIndex, int secondIndex);
+ void insertNewRoom();
+ void deleteRoom(int index);
+ void renameRoom(int index, const QString name);
+ void onMenuCheckboxChanged();
- //make InkCheck and Ink#1Check exclusive.
- void onInkCheckTriggered(bool on);
- void onInk1CheckTriggered(bool on);
+ // make InkCheck and Ink#1Check exclusive.
+ void onInkCheckTriggered(bool on);
+ void onInk1CheckTriggered(bool on);
- void onUpdateCheckerDone(bool);
+ void onUpdateCheckerDone(bool);
public slots:
- /*--- タイトルにシーン名を入れる ---*/
- void changeWindowTitle();
- /*--- FlipモジュールでタイトルバーにロードしたLevel名を表示 ---*/
- /*--- Cleanupモジュールでタイトルバーに進捗を表示 ---*/
- void changeWindowTitle(QString &);
+ /*--- タイトルにシーン名を入れる ---*/
+ void changeWindowTitle();
+ /*--- FlipモジュールでタイトルバーにロードしたLevel名を表示 ---*/
+ /*--- Cleanupモジュールでタイトルバーに進捗を表示 ---*/
+ void changeWindowTitle(QString &);
signals:
- void exit(bool &);
+ void exit(bool &);
};
- class RecentFiles
- {
- QList<QString> m_recentScenes;
- QList<QString> m_recentLevels;
- QList<QString> m_recentFlipbookImages;
+ class RecentFiles {
+ QList<QString> m_recentScenes;
+ QList<QString> m_recentLevels;
+ QList<QString> m_recentFlipbookImages;
- RecentFiles();
+ RecentFiles();
public:
- enum FileType { Scene,
- Level,
- Flip,
- None };
+ enum FileType { Scene, Level, Flip, None };
- static RecentFiles *instance();
- ~RecentFiles();
+ static RecentFiles *instance();
+ ~RecentFiles();
- void addFilePath(QString path, FileType fileType);
- void moveFilePath(int fromIndex, int toIndex, FileType fileType);
- QString getFilePath(int index, FileType fileType) const;
- void clearRecentFilesList(FileType fileType);
- void loadRecentFiles();
- void saveRecentFiles();
+ void addFilePath(QString path, FileType fileType);
+ void moveFilePath(int fromIndex, int toIndex, FileType fileType);
+ QString getFilePath(int index, FileType fileType) const;
+ void clearRecentFilesList(FileType fileType);
+ void loadRecentFiles();
+ void saveRecentFiles();
protected:
- void refreshRecentFilesMenu(FileType fileType);
- QList<QString> getFilesNameList(FileType fileType);
+ void refreshRecentFilesMenu(FileType fileType);
+ QList<QString> getFilesNameList(FileType fileType);
};
- #endif // TESTCUSTOMTAB_H
+ #endif // TESTCUSTOMTAB_H
diff --cc toonz/sources/toonzqt/docklayout.h
index d17c55fcf,e1c8974a2..71a05081e
--- a/toonz/sources/toonzqt/docklayout.h
+++ b/toonz/sources/toonzqt/docklayout.h
@@@ -154,116 -163,124 +163,126 @@@ private
\sa DockLayout and DockPlaceholder classes.
*/
- class DVAPI DockWidget : public QWidget
- {
- friend class DockLayout; //DockLayout is granted access to placeholders' privates
- friend class DockPlaceholder; //As above.
- //friend Region; //Regions need access to m_saveIndex field.
- public:
- void maximizeDock();
+ class DVAPI DockWidget : public QWidget {
+ friend class DockLayout; // DockLayout is granted access to placeholders'
+ // privates
+ friend class DockPlaceholder; // As above.
+ // friend Region; //Regions need access to m_saveIndex field.
++ public:
++ void maximizeDock();
protected:
- //Private attributes for dragging purposes
- bool m_floating; //Whether this window is floating or docked
- bool m_dragging; //Whether this window is being dragged
- bool m_undocking; //Still docked, but after a mouse button press on a title bar.
- //NOTE: m_dragging ==> !m_undocking; m_dragging=>m_floating.
+ // Private attributes for dragging purposes
+ bool m_floating; // Whether this window is floating or docked
+ bool m_dragging; // Whether this window is being dragged
+ bool m_undocking; // Still docked, but after a mouse button press on a title
+ // bar.
+ // NOTE: m_dragging ==> !m_undocking; m_dragging=>m_floating.
- //Private infos for resizing purposes
- bool m_resizing; //Whether this window is being resized
- int m_marginType; //Type of resize to consider
+ // Private infos for resizing purposes
+ bool m_resizing; // Whether this window is being resized
+ int m_marginType; // Type of resize to consider
- //Maximization
- bool m_maximized;
+ // Maximization
+ bool m_maximized;
private:
- QPoint m_dragInitialPos;
- QPoint m_dragMouseInitialPos;
+ QPoint m_dragInitialPos;
+ QPoint m_dragMouseInitialPos;
- //Widget and Layout links
- DockLayout *m_parentLayout;
+ // Widget and Layout links
+ DockLayout *m_parentLayout;
- //Decoration-related allocator (placeholders)
- DockDecoAllocator *m_decoAllocator;
+ // Decoration-related allocator (placeholders)
+ DockDecoAllocator *m_decoAllocator;
- int m_saveIndex;
+ int m_saveIndex;
protected:
- //Protected infos for docking purposes
- std::vector<DockPlaceholder *> m_placeholders;
- DockPlaceholder *m_selectedPlace;
+ // Protected infos for docking purposes
+ std::vector<DockPlaceholder *> m_placeholders;
+ DockPlaceholder *m_selectedPlace;
public:
- DockWidget(QWidget *parent = 0, Qt::WindowFlags flags = Qt::Tool);
- virtual ~DockWidget();
-
- //Returns the DockLayout owning \b this dock widget
- DockLayout *parentLayout() const { return m_parentLayout; }
-
- bool isFloating() const { return m_floating; }
- bool isMaximized() const { return m_maximized; }
-
- //Query functions
- QWidget *hoveredWidget(QMouseEvent *me);
- DockPlaceholder *placeAdjacentTo(DockWidget *dockWidget, int boundary);
- DockPlaceholder *placeOfSeparator(DockSeparator *);
- const std::vector<DockPlaceholder *> &placeholders() const { return m_placeholders; }
-
- //Re-implementable functions for custom dock widgets.
-
- //!Returns the minimum size of the dock widget when docked. This function should be
- //!reimlemented whenever minimum size changes between floating and docked appearance.
- virtual QSize getDockedMinimumSize() { return minimumSize(); }
-
- //!Returns the maximum size of the dock widget when docked. This function should be
- //!reimlemented whenever minimum size changes between floating and docked appearance.
- virtual QSize getDockedMaximumSize() { return maximumSize(); }
-
- //!This function is called in order to show the dock widget in its floating status. No show() or update()
- //!is needed in its body.
- //!It can be reimplemented to build custom-styled dock widgets.
- virtual void setFloatingAppearance() { setWindowFlags(Qt::Tool); }
-
- //!This function is called in order to show the dock widget in its docked status. No show() or update()
- //!is needed in its body.
- //!It can be reimplemented to build custom-styled dock widgets.
- virtual void setDockedAppearance() {}
-
- virtual bool isDragGrip(QPoint p);
- virtual int isResizeGrip(QPoint)
- {
- return 0; //Native deco widgets handle margins and resizes on their own
- }
-
- enum { leftMargin = 0x1,
- rightMargin = 0x2,
- topMargin = 0x4,
- bottomMargin = 0x8 };
-
- //Placeholders-related methods
- virtual void selectDockPlaceholder(QMouseEvent *me);
- void clearDockPlaceholders();
-
- //Decorations allocator
- void setDecoAllocator(DockDecoAllocator *decoAllocator);
-
- //reimpremented in FlipbookPanel
- virtual void onDock(bool docked) {}
+ DockWidget(QWidget *parent = 0, Qt::WindowFlags flags = Qt::Tool);
+ virtual ~DockWidget();
+
+ // Returns the DockLayout owning \b this dock widget
+ DockLayout *parentLayout() const { return m_parentLayout; }
+
+ bool isFloating() const { return m_floating; }
+ bool isMaximized() const { return m_maximized; }
+
+ // Query functions
+ QWidget *hoveredWidget(QMouseEvent *me);
+ DockPlaceholder *placeAdjacentTo(DockWidget *dockWidget, int boundary);
+ DockPlaceholder *placeOfSeparator(DockSeparator *);
+ const std::vector<DockPlaceholder *> &placeholders() const {
+ return m_placeholders;
+ }
+
+ // Re-implementable functions for custom dock widgets.
+
+ //! Returns the minimum size of the dock widget when docked. This function
+ //! should be
+ //! reimlemented whenever minimum size changes between floating and docked
+ //! appearance.
+ virtual QSize getDockedMinimumSize() { return minimumSize(); }
+
+ //! Returns the maximum size of the dock widget when docked. This function
+ //! should be
+ //! reimlemented whenever minimum size changes between floating and docked
+ //! appearance.
+ virtual QSize getDockedMaximumSize() { return maximumSize(); }
+
+ //! This function is called in order to show the dock widget in its floating
+ //! status. No show() or update()
+ //! is needed in its body.
+ //! It can be reimplemented to build custom-styled dock widgets.
+ virtual void setFloatingAppearance() { setWindowFlags(Qt::Tool); }
+
+ //! This function is called in order to show the dock widget in its docked
+ //! status. No show() or update()
+ //! is needed in its body.
+ //! It can be reimplemented to build custom-styled dock widgets.
+ virtual void setDockedAppearance() {}
+
+ virtual bool isDragGrip(QPoint p);
+ virtual int isResizeGrip(QPoint) {
+ return 0; // Native deco widgets handle margins and resizes on their own
+ }
+
+ enum {
+ leftMargin = 0x1,
+ rightMargin = 0x2,
+ topMargin = 0x4,
+ bottomMargin = 0x8
+ };
+
+ // Placeholders-related methods
+ virtual void selectDockPlaceholder(QMouseEvent *me);
+ void clearDockPlaceholders();
+
+ // Decorations allocator
+ void setDecoAllocator(DockDecoAllocator *decoAllocator);
+
+ // reimpremented in FlipbookPanel
+ virtual void onDock(bool docked) {}
private:
- //Event handling
- //Basic events
- bool event(QEvent *e);
- void mousePressEvent(QMouseEvent *me);
- void mouseReleaseEvent(QMouseEvent *me);
- void mouseMoveEvent(QMouseEvent *me);
- void hoverMoveEvent(QHoverEvent *he);
+ // Event handling
+ // Basic events
+ bool event(QEvent *e);
+ void mousePressEvent(QMouseEvent *me);
+ void mouseReleaseEvent(QMouseEvent *me);
+ void mouseMoveEvent(QMouseEvent *me);
+ void hoverMoveEvent(QHoverEvent *he);
protected:
- //Customizable events
- virtual void wheelEvent(QWheelEvent *we);
- virtual void mouseDoubleClickEvent(QMouseEvent *me);
- virtual void windowTitleEvent(QEvent *) {}
+ // Customizable events
+ virtual void wheelEvent(QWheelEvent *we);
+ virtual void mouseDoubleClickEvent(QMouseEvent *me);
+ virtual void windowTitleEvent(QEvent *) {}
};
//========================================================================
diff --cc toonz/sources/toonzqt/dockwidget.cpp
index ba1ecbad8,4f624f734..715c1e8a2
--- a/toonz/sources/toonzqt/dockwidget.cpp
+++ b/toonz/sources/toonzqt/dockwidget.cpp
@@@ -385,29 -385,23 +385,31 @@@ void DockWidget::mouseDoubleClickEvent(
//-------------------------------------
+void DockWidget::maximizeDock()
+{
+ if (!m_floating) {
+ parentLayout()->setMaximized(this, !m_maximized);
+ }
+}
+
+//-------------------------------------
-
- //!Switch in selected dock placeholder's hierarchy.
- void DockWidget::wheelEvent(QWheelEvent *we)
- {
- if (m_dragging) {
- if (m_selectedPlace) {
- DockPlaceholder *newSelected = (we->delta() > 0) ? m_selectedPlace->parentPlaceholder() : m_selectedPlace->childPlaceholder(parentWidget()->mapFromGlobal(we->globalPos()));
-
- if (newSelected != m_selectedPlace) {
- m_selectedPlace->hide();
- newSelected->show();
- m_selectedPlace = newSelected;
- }
- }
- }
+ //! Switch in selected dock placeholder's hierarchy.
+ void DockWidget::wheelEvent(QWheelEvent *we) {
+ if (m_dragging) {
+ if (m_selectedPlace) {
+ DockPlaceholder *newSelected =
+ (we->delta() > 0)
+ ? m_selectedPlace->parentPlaceholder()
+ : m_selectedPlace->childPlaceholder(
+ parentWidget()->mapFromGlobal(we->globalPos()));
+
+ if (newSelected != m_selectedPlace) {
+ m_selectedPlace->hide();
+ newSelected->show();
+ m_selectedPlace = newSelected;
+ }
+ }
+ }
}
//-------------------------------------