diff --git a/resources/forms/mainWindow.ui b/resources/forms/mainWindow.ui index 14ef49c3..e0b23cad 100644 --- a/resources/forms/mainWindow.ui +++ b/resources/forms/mainWindow.ui @@ -1,1646 +1,1755 @@ - - - MainWindow - - - - 0 - 0 - 1342 - 334 - - - - Uniboard - - - - :/images/uniboard.png:/images/uniboard.png - - - - 32 - 32 - - - - Qt::ToolButtonTextUnderIcon - - - false - - - - - Qt::PreventContextMenu - - - Board - - - false - - - Qt::BottomToolBarArea|Qt::TopToolBarArea - - - - 48 - 32 - - - - false - - - TopToolBarArea - - - false - - - - - - - - - - - - - - - - - - - - - - Qt::PreventContextMenu - - - Web - - - false - - - Qt::BottomToolBarArea|Qt::TopToolBarArea - - - - 48 - 32 - - - - false - - - TopToolBarArea - - - true - - - - - - - - - - - - - - - - - - - - - - Qt::PreventContextMenu - - - Documents - - - false - - - Qt::BottomToolBarArea|Qt::TopToolBarArea - - - - 48 - 32 - - - - false - - - TopToolBarArea - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - Qt::PreventContextMenu - - - Tutorial - - - Qt::LeftToRight - - - false - - - Qt::BottomToolBarArea|Qt::TopToolBarArea - - - - 48 - 32 - - - - false - - - TopToolBarArea - - - true - - - - - - - - - true - - - true - - - - :/images/toolbar/stylus.png:/images/toolbar/stylus.png - - - Stylus - - - Stylus - - - Ctrl+T - - - - - true - - - - :/images/toolbar/background.png:/images/toolbar/background.png - - - Backgrounds - - - Change Background - - - - - - :/images/toolbar/undoOn.png:/images/toolbar/undoOn.png - - - Undo - - - Ctrl+Z - - - - - - :/images/toolbar/redoOn.png:/images/toolbar/redoOn.png - - - Redo - - - Ctrl+Y - - - - - - :/images/toolbar/previousPageOn.png:/images/toolbar/previousPageOn.png - - - Previous - - - Previous Page - - - PgUp - - - - - - :/images/toolbar/nextPageOn.png:/images/toolbar/nextPageOn.png - - - Next - - - Next Page - - - PgDown - - - - - false - - - - :/images/toolbar/documents.png:/images/toolbar/documents.png - - - Documents - - - Manage Documents - - - Ctrl+D - - - - - - :/images/toolbar/web.png:/images/toolbar/web.png - - - Web - - - Web Browsing - - - Ctrl+W - - - - - true - - - true - - - - :/images/toolbar/smallPen.png:/images/toolbar/smallPen.png - - - Line - - - Small Line - - - - - true - - - - :/images/toolbar/mediumPen.png:/images/toolbar/mediumPen.png - - - Line - - - Medium Line - - - - - true - - - - :/images/toolbar/largePen.png:/images/toolbar/largePen.png - - - Line - - - Large Line - - - - - - :/images/toolbar/quitOn.png:/images/toolbar/quitOn.png - - - Quit - - - Quit Uniboard - - - Qt::WindowShortcut - - - QAction::NoRole - - - - - true - - - - :/images/toolbar/smallEraser.png:/images/toolbar/smallEraser.png - - - Eraser - - - Smalle Eraser - - - - - true - - - true - - - - :/images/toolbar/mediumEraser.png:/images/toolbar/mediumEraser.png - - - Eraser - - - Medium Eraser - - - - - true - - - - :/images/toolbar/largeEraser.png:/images/toolbar/largeEraser.png - - - Eraser - - - Large Eraser - - - - - - :/images/toolbar/color.png:/images/toolbar/color.png - - - Color - - - Color - - - - - - :/images/toolbar/color.png:/images/toolbar/color.png - - - Color - - - - - - :/images/toolbar/color.png:/images/toolbar/color.png - - - Color - - - - - - :/images/toolbar/color.png:/images/toolbar/color.png - - - Color - - - - - - :/images/toolbar/previousPageOn.png:/images/toolbar/previousPageOn.png - - - Back - - - Previous Page - - - Left - - - - - - :/images/toolbar/nextPageOn.png:/images/toolbar/nextPageOn.png - - - Forward - - - Next Page - - - Right - - - - - - :/images/toolbar/reload.png:/images/toolbar/reload.png - - - Reload - - - Reload Current Page - - - - - - :/images/toolbar/home.png:/images/toolbar/home.png - - - Home - - - Load Home Page - - - - - - :/images/toolbar/bookmarks.png:/images/toolbar/bookmarks.png - - - Bookmarks - - - Show Bookmarks - - - - - - :/images/toolbar/addBookmark.png:/images/toolbar/addBookmark.png - - - Bookmark - - - Add Bookmark - - - - - - :/images/toolbar/board.png:/images/toolbar/board.png - - - Board - - - Display Board - - - Ctrl+B - - - - - true - - - - :/images/toolbar/clearPage.png:/images/toolbar/clearPage.png - - - Erase - - - Erase Content - - - - - - :/images/toolbar/settings.png:/images/toolbar/settings.png - - - Preferences - - - Display Preferences - - - - - true - - - - :/images/toolbar/library.png:/images/toolbar/library.png - - - Library - - - Show Library - - - Ctrl+L - - - - - - :/images/toolbar/menu.png:/images/toolbar/menu.png - - - Sankoré 3.1 - - - Sankore 3.1 - - - - - - :/images/toolbar/display.png:/images/toolbar/display.png - - - Show Desktop - - - Show Computer Desktop - - - Ctrl+Shift+H - - - - - - :/images/stylusPalette/zoomIn.png:/images/stylusPalette/zoomIn.png - - - Bigger - - - Zoom In - - - Ctrl++ - - - - - - :/images/stylusPalette/zoomOut.png:/images/stylusPalette/zoomOut.png - - - Smaller - - - Zoom Out - - - Ctrl+- - - - - - - :/images/toolbar/newFolder.png:/images/toolbar/newFolder.png - - - New Folder - - - Create a New Folder - - - - - - :/images/toolbar/newDocument.png:/images/toolbar/newDocument.png - - - New Document - - - Create a New Document - - - - - - :/images/toolbar/import.png:/images/toolbar/import.png - - - Import - - - Import a Document - - - - - - :/images/toolbar/export.png:/images/toolbar/export.png - - - Export - - - Export a Document - - - - - - :/images/toolbar/open.png:/images/toolbar/open.png - - - Open in Board - - - Open Page in Board - - - Ctrl+O - - - - - - :/images/toolbar/duplicate.png:/images/toolbar/duplicate.png - - - Duplicate - - - Duplicate Selected Content - - - - - - :/images/toolbar/deleteDocument.png:/images/toolbar/deleteDocument.png - - - Delete - - - Delete Selected Content - - - Del - - - - - - :/images/toolbar/addToWorkingDoc.png:/images/toolbar/addToWorkingDoc.png - - - Add to Working Document - - - Add Selected Content to Open Document - - - - - - :/images/toolbar/addToPage.png:/images/toolbar/addToPage.png - - - Add - - - Add Content to Document - - - - - - :/images/toolbar/rename.png:/images/toolbar/rename.png - - - Rename - - - Rename Content - - - QAction::TextHeuristicRole - - - - - - :/images/toolbar/tools.png:/images/toolbar/tools.png - - - Tools - - - Display Tools - - - - - true - - - - :/images/toolbar/tools.png:/images/toolbar/tools.png - - - Tools - - - Display Tools - - - - - true - - - true - - - - :/images/toolbar/display.png:/images/toolbar/display.png - - - Multi Screen - - - - - true - - - - :/images/toolbar/addToPage.png:/images/toolbar/addToPage.png - - - Wide Size (16/9) - - - Wide Size (16/9) - - - Use Document Wide Size (16/9) - - - false - - - - - true - - - - :/images/toolbar/addToPage.png:/images/toolbar/addToPage.png - - - Regular Size (4/3) - - - Regular Size (4/3) - - - Use Document Regular Size (4/3) - - - false - - - - - true - - - false - - - - :/images/toolbar/addToPage.png:/images/toolbar/addToPage.png - - - Custom Size - - - Custom Size - - - Use Custom Document Size - - - false - - - - - - :/images/toolbar/deleteDocument.png:/images/toolbar/deleteDocument.png - - - Stop Loading - - - Stop Loading Web Page - - - - - - :/images/toolbar/cut.png:/images/toolbar/cut.png - - - Cut - - - Qt::ApplicationShortcut - - - - - - :/images/toolbar/copy.png:/images/toolbar/copy.png - - - Copy - - - Qt::ApplicationShortcut - - - - - - :/images/toolbar/paste.png:/images/toolbar/paste.png - - - Paste - - - Qt::ApplicationShortcut - - - QAction::TextHeuristicRole - - - - - - :/images/extraPalette/blackout.png - :/images/extraPalette/blackoutOn.png:/images/extraPalette/blackout.png - - - Sleep - - - Put Presentation to Sleep - - - - - true - - - - :/images/extraPalette/keyboard.png - :/images/extraPalette/keyboardOn.png:/images/extraPalette/keyboard.png - - - Virtual Keyboard - - - Display Virtual Keyboard - - - - - true - - - - :/images/backgroundPalette/background1.svg - :/images/backgroundPalette/background1On.svg:/images/backgroundPalette/background1.svg - - - Plain Light Background - - - Light - - - Plain Light Background - - - - - true - - - - :/images/backgroundPalette/background2.svg - :/images/backgroundPalette/background2On.svg:/images/backgroundPalette/background2.svg - - - Grid Light Background - - - Light - - - Grid Light Background - - - - - true - - - - :/images/backgroundPalette/background3.svg - :/images/backgroundPalette/background3On.svg:/images/backgroundPalette/background3.svg - - - Plain Dark Background - - - Dark - - - Plain Dark Background - - - - - true - - - - :/images/backgroundPalette/background4.svg - :/images/backgroundPalette/background4On.svg:/images/backgroundPalette/background4.svg - - - Grid Dark Background - - - Dark - - - Grid Dark Background - - - - - true - - - - :/images/toolbar/record.png:/images/toolbar/record.png - - - Podcast - - - Record Presentation to Video - - - - - true - - - - :/images/toolbar/record.png - :/images/toolbar/stop.png:/images/toolbar/record.png - - - Record - - - Start Screen Recording - - - - - - :/images/erasePalette/eraseItem.svg:/images/erasePalette/eraseItem.svg - - - Erase Items - - - Erase All Items - - - - - - :/images/erasePalette/eraseAnnotation.svg:/images/erasePalette/eraseAnnotation.svg - - - Erase Annotations - - - Erase All Annotations - - - - - - :/images/erasePalette/eraseAll.svg:/images/erasePalette/eraseAll.svg - - - Clear Page - - - Clear All Elements - - - - - - :/images/toolbar/addToPage.png:/images/toolbar/addToPage.png - - - Add - - - - - true - - - true - - - - :/images/stylusPalette/pen.png - :/images/stylusPalette/penOn.png:/images/stylusPalette/pen.png - - - Pen - - - Annotate Document - - - Ctrl+I - - - - - true - - - - :/images/stylusPalette/eraser.png - :/images/stylusPalette/eraserOn.png:/images/stylusPalette/eraser.png - - - Eraser - - - Erase Annotation - - - Ctrl+E - - - - - true - - - - :/images/stylusPalette/marker.png - :/images/stylusPalette/markerOn.png:/images/stylusPalette/marker.png - - - Marker - - - Highlight - - - Ctrl+M - - - - - true - - - - :/images/stylusPalette/arrow.png - :/images/stylusPalette/arrowOn.png:/images/stylusPalette/arrow.png - - - Selector - - - Select And Modify Objects - - - Ctrl+F - - - - - true - - - - :/images/stylusPalette/hand.png - :/images/stylusPalette/handOn.png:/images/stylusPalette/hand.png - - - Hand - - - Scroll Page - - - - - true - - - - :/images/stylusPalette/zoomIn.png - :/images/stylusPalette/zoomInOn.png:/images/stylusPalette/zoomIn.png - - - Zoom In - - - - - true - - - - :/images/stylusPalette/zoomOut.png - :/images/stylusPalette/zoomOutOn.png:/images/stylusPalette/zoomOut.png - - - Zoom Out - - - - - true - - - - :/images/stylusPalette/laser.png - :/images/stylusPalette/laserOn.png:/images/stylusPalette/laser.png - - - Laser Pointer - - - Virtual Laser Pointer - - - Ctrl+G - - - - - true - - - - :/images/stylusPalette/line.png - :/images/stylusPalette/lineOn.png:/images/stylusPalette/line.png - - - Line - - - Draw Lines - - - Ctrl+J - - - - - true - - - - :/images/stylusPalette/text.png - :/images/stylusPalette/textOn.png:/images/stylusPalette/text.png - - - Text - - - Write Text - - - Ctrl+K - - - - - true - - - - :/images/stylusPalette/captureArea.png - :/images/stylusPalette/captureAreaOn.png:/images/stylusPalette/captureArea.png - - - Capture - - - Capture Part of the Screen - - - - - - :/images/addItemToCurrentPage.svg:/images/addItemToCurrentPage.svg - - - Add To Current Page - - - Add To Current Page - - - Add Item To Current Page - - - - - - :/images/addItemToNewPage.svg:/images/addItemToNewPage.svg - - - Add To New Page - - - Add Item To New Page - - - - - - :/images/addItemToLibrary.svg:/images/addItemToLibrary.svg - - - Add To Library - - - Add Item To Library - - - - - false - - - - :/images/toolbar/newDocument.png:/images/toolbar/newDocument.png - - - Pages - - - Create a New Page - - - - - - :/images/addItemToCurrentPage.svg:/images/addItemToCurrentPage.svg - - - New Page - - - Create a New Page - - - - - - :/images/addItemToNewPage.svg:/images/addItemToNewPage.svg - - - Duplicate Page - - - Duplicate the Current Page - - - - - - :/images/addItemToLibrary.svg:/images/addItemToLibrary.svg - - - Import Page - - - Import an External Page - - - - - true - - - false - - - - :/images/toolbar/pause.png:/images/toolbar/pause.png - - - Pause - - - Pause Podcast Recording - - - - - - :/images/toolbar/settings.png:/images/toolbar/settings.png - - - Podcast Config - - - Configure Podcast Recording - - - - - - :/images/toolbar/addToolToLibrary.png:/images/toolbar/addToolToLibrary.png - - - Flash Trap - - - Trap Flash Content - - - - - true - - - - :/images/extraPalette/webTrap.png - :/images/extraPalette/webTrapEnabled.png:/images/extraPalette/webTrap.png - - - Web Trap - - - Trap Web Content - - - - - - :/images/toolbar/captureArea.png:/images/toolbar/captureArea.png - - - Custom Capture - - - Capture Part of the Screen - - - - - - :/images/toolbar/captureWindow.png:/images/toolbar/captureWindow.png - - - Window Capture - - - Capture a Window - - - - - false - - - - :/images/extraPalette/oEmbed.png:/images/extraPalette/oEmbed.png - - - Embed Web Content - - - Capture Embeddable Web Content - - - - - true - - - - :/images/toolbar/eyeClosed.png - :/images/toolbar/eyeOpened.png:/images/toolbar/eyeClosed.png - - - Show on Display - - - Show Main Screen on Display Screen - - - false - - - QAction::TextHeuristicRole - - - - - true - - - - :/images/toolbar/tools.png:/images/toolbar/tools.png - - - Tools - - - Define Drawing Options - - - - - - :/images/erasePalette/eraseAnnotation.svg:/images/erasePalette/eraseAnnotation.svg - - - Erase Annotations - - - Erase all Annotations - - - - - - :/images/toolbar/addToolToLibrary.png:/images/toolbar/addToolToLibrary.png - - - eduMedia - - - Import eduMedia simulation - - - - - - :/images/toolbar/tutorial.png:/images/toolbar/tutorial.png - - - Tutorial - - - Open the tutorial - - - - - - :/images/toolbar/updates.png:/images/toolbar/updates.png - - - Check Update - - - - - - :/images/toolbar/paraschool.png:/images/toolbar/paraschool.png - - - Sankoré Editor - - - Show Sankore Widgets Editor - - - - - - :/images/toolbar/hide.png:/images/toolbar/hide.png - - - Hide Sankoré - - - Hide Sankoré Application - - - Ctrl+H - - - - - - - - + + + MainWindow + + + + 0 + 0 + 1342 + 334 + + + + Uniboard + + + + :/images/uniboard.png:/images/uniboard.png + + + + 32 + 32 + + + + Qt::ToolButtonTextUnderIcon + + + false + + + + + Qt::PreventContextMenu + + + Board + + + false + + + Qt::BottomToolBarArea|Qt::TopToolBarArea + + + + 48 + 32 + + + + false + + + TopToolBarArea + + + false + + + + + + + + + + + + + + + + + + + + + + Qt::PreventContextMenu + + + Web + + + false + + + Qt::BottomToolBarArea|Qt::TopToolBarArea + + + + 48 + 32 + + + + false + + + TopToolBarArea + + + true + + + + + + + + + + + + + + + + + + + + + + Qt::PreventContextMenu + + + Documents + + + false + + + Qt::BottomToolBarArea|Qt::TopToolBarArea + + + + 48 + 32 + + + + false + + + TopToolBarArea + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + Qt::PreventContextMenu + + + Tutorial + + + Qt::LeftToRight + + + false + + + Qt::BottomToolBarArea|Qt::TopToolBarArea + + + + 48 + 32 + + + + false + + + TopToolBarArea + + + true + + + + + + + + + true + + + true + + + + :/images/toolbar/stylus.png:/images/toolbar/stylus.png + + + Stylus + + + Stylus + + + Ctrl+T + + + + + true + + + + :/images/toolbar/background.png:/images/toolbar/background.png + + + Backgrounds + + + Change Background + + + + + + :/images/toolbar/undoOn.png:/images/toolbar/undoOn.png + + + Undo + + + Ctrl+Z + + + + + + :/images/toolbar/redoOn.png:/images/toolbar/redoOn.png + + + Redo + + + Ctrl+Y + + + + + + :/images/toolbar/previousPageOn.png:/images/toolbar/previousPageOn.png + + + Previous + + + Previous Page + + + PgUp + + + + + + :/images/toolbar/nextPageOn.png:/images/toolbar/nextPageOn.png + + + Next + + + Next Page + + + PgDown + + + + + false + + + + :/images/toolbar/documents.png:/images/toolbar/documents.png + + + Documents + + + Manage Documents + + + Ctrl+D + + + + + + :/images/toolbar/web.png:/images/toolbar/web.png + + + Web + + + Web Browsing + + + Ctrl+W + + + + + true + + + true + + + + :/images/toolbar/smallPen.png:/images/toolbar/smallPen.png + + + Line + + + Small Line + + + + + true + + + + :/images/toolbar/mediumPen.png:/images/toolbar/mediumPen.png + + + Line + + + Medium Line + + + + + true + + + + :/images/toolbar/largePen.png:/images/toolbar/largePen.png + + + Line + + + Large Line + + + + + + :/images/toolbar/quitOn.png:/images/toolbar/quitOn.png + + + Quit + + + Quit Uniboard + + + Qt::WindowShortcut + + + QAction::NoRole + + + + + true + + + + :/images/toolbar/smallEraser.png:/images/toolbar/smallEraser.png + + + Eraser + + + Smalle Eraser + + + + + true + + + true + + + + :/images/toolbar/mediumEraser.png:/images/toolbar/mediumEraser.png + + + Eraser + + + Medium Eraser + + + + + true + + + + :/images/toolbar/largeEraser.png:/images/toolbar/largeEraser.png + + + Eraser + + + Large Eraser + + + + + + :/images/toolbar/color.png:/images/toolbar/color.png + + + Color + + + Color + + + + + + :/images/toolbar/color.png:/images/toolbar/color.png + + + Color + + + + + + :/images/toolbar/color.png:/images/toolbar/color.png + + + Color + + + + + + :/images/toolbar/color.png:/images/toolbar/color.png + + + Color + + + + + + :/images/toolbar/previousPageOn.png:/images/toolbar/previousPageOn.png + + + Back + + + Previous Page + + + Left + + + + + + :/images/toolbar/nextPageOn.png:/images/toolbar/nextPageOn.png + + + Forward + + + Next Page + + + Right + + + + + + :/images/toolbar/reload.png:/images/toolbar/reload.png + + + Reload + + + Reload Current Page + + + + + + :/images/toolbar/home.png:/images/toolbar/home.png + + + Home + + + Load Home Page + + + + + + :/images/toolbar/bookmarks.png:/images/toolbar/bookmarks.png + + + Bookmarks + + + Show Bookmarks + + + + + + :/images/toolbar/addBookmark.png:/images/toolbar/addBookmark.png + + + Bookmark + + + Add Bookmark + + + + + + :/images/toolbar/board.png:/images/toolbar/board.png + + + Board + + + Display Board + + + Ctrl+B + + + + + true + + + + :/images/toolbar/clearPage.png:/images/toolbar/clearPage.png + + + Erase + + + Erase Content + + + + + + :/images/toolbar/settings.png:/images/toolbar/settings.png + + + Preferences + + + Display Preferences + + + + + true + + + + :/images/toolbar/library.png:/images/toolbar/library.png + + + Library + + + Show Library + + + Ctrl+L + + + + + + :/images/toolbar/menu.png:/images/toolbar/menu.png + + + Sankoré 3.1 + + + Sankore 3.1 + + + + + + :/images/toolbar/display.png:/images/toolbar/display.png + + + Show Desktop + + + Show Computer Desktop + + + Ctrl+Shift+H + + + + + + :/images/stylusPalette/zoomIn.png:/images/stylusPalette/zoomIn.png + + + Bigger + + + Zoom In + + + Ctrl++ + + + + + + :/images/stylusPalette/zoomOut.png:/images/stylusPalette/zoomOut.png + + + Smaller + + + Zoom Out + + + Ctrl+- + + + + + + :/images/toolbar/newFolder.png:/images/toolbar/newFolder.png + + + New Folder + + + Create a New Folder + + + + + + :/images/toolbar/newDocument.png:/images/toolbar/newDocument.png + + + New Document + + + Create a New Document + + + + + + :/images/toolbar/import.png:/images/toolbar/import.png + + + Import + + + Import a Document + + + + + + :/images/toolbar/export.png:/images/toolbar/export.png + + + Export + + + Export a Document + + + + + + :/images/toolbar/open.png:/images/toolbar/open.png + + + Open in Board + + + Open Page in Board + + + Ctrl+O + + + + + + :/images/toolbar/duplicate.png:/images/toolbar/duplicate.png + + + Duplicate + + + Duplicate Selected Content + + + + + + :/images/toolbar/deleteDocument.png:/images/toolbar/deleteDocument.png + + + Delete + + + Delete Selected Content + + + Del + + + + + + :/images/toolbar/addToWorkingDoc.png:/images/toolbar/addToWorkingDoc.png + + + Add to Working Document + + + Add Selected Content to Open Document + + + + + + :/images/toolbar/addToPage.png:/images/toolbar/addToPage.png + + + Add + + + Add Content to Document + + + + + + :/images/toolbar/rename.png:/images/toolbar/rename.png + + + Rename + + + Rename Content + + + QAction::TextHeuristicRole + + + + + + :/images/toolbar/tools.png:/images/toolbar/tools.png + + + Tools + + + Display Tools + + + + + true + + + + :/images/toolbar/tools.png:/images/toolbar/tools.png + + + Tools + + + Display Tools + + + + + true + + + true + + + + :/images/toolbar/display.png:/images/toolbar/display.png + + + Multi Screen + + + + + true + + + + :/images/toolbar/addToPage.png:/images/toolbar/addToPage.png + + + Wide Size (16/9) + + + Wide Size (16/9) + + + Use Document Wide Size (16/9) + + + false + + + + + true + + + + :/images/toolbar/addToPage.png:/images/toolbar/addToPage.png + + + Regular Size (4/3) + + + Regular Size (4/3) + + + Use Document Regular Size (4/3) + + + false + + + + + true + + + false + + + + :/images/toolbar/addToPage.png:/images/toolbar/addToPage.png + + + Custom Size + + + Custom Size + + + Use Custom Document Size + + + false + + + + + + :/images/toolbar/deleteDocument.png:/images/toolbar/deleteDocument.png + + + Stop Loading + + + Stop Loading Web Page + + + + + + :/images/toolbar/cut.png:/images/toolbar/cut.png + + + Cut + + + Qt::ApplicationShortcut + + + + + + :/images/toolbar/copy.png:/images/toolbar/copy.png + + + Copy + + + Qt::ApplicationShortcut + + + + + + :/images/toolbar/paste.png:/images/toolbar/paste.png + + + Paste + + + Qt::ApplicationShortcut + + + QAction::TextHeuristicRole + + + + + + :/images/extraPalette/blackout.png + :/images/extraPalette/blackoutOn.png:/images/extraPalette/blackout.png + + + Sleep + + + Put Presentation to Sleep + + + + + true + + + + :/images/extraPalette/keyboard.png + :/images/extraPalette/keyboardOn.png:/images/extraPalette/keyboard.png + + + Virtual Keyboard + + + Display Virtual Keyboard + + + + + true + + + + :/images/backgroundPalette/background1.svg + :/images/backgroundPalette/background1On.svg:/images/backgroundPalette/background1.svg + + + Plain Light Background + + + Light + + + Plain Light Background + + + + + true + + + + :/images/backgroundPalette/background2.svg + :/images/backgroundPalette/background2On.svg:/images/backgroundPalette/background2.svg + + + Grid Light Background + + + Light + + + Grid Light Background + + + + + true + + + + :/images/backgroundPalette/background3.svg + :/images/backgroundPalette/background3On.svg:/images/backgroundPalette/background3.svg + + + Plain Dark Background + + + Dark + + + Plain Dark Background + + + + + true + + + + :/images/backgroundPalette/background4.svg + :/images/backgroundPalette/background4On.svg:/images/backgroundPalette/background4.svg + + + Grid Dark Background + + + Dark + + + Grid Dark Background + + + + + true + + + + :/images/toolbar/record.png:/images/toolbar/record.png + + + Podcast + + + Record Presentation to Video + + + + + true + + + + :/images/toolbar/record.png + :/images/toolbar/stop.png:/images/toolbar/record.png + + + Record + + + Start Screen Recording + + + + + + :/images/erasePalette/eraseItem.svg:/images/erasePalette/eraseItem.svg + + + Erase Items + + + Erase All Items + + + + + + :/images/erasePalette/eraseAnnotation.svg:/images/erasePalette/eraseAnnotation.svg + + + Erase Annotations + + + Erase All Annotations + + + + + + :/images/erasePalette/eraseAll.svg:/images/erasePalette/eraseAll.svg + + + Clear Page + + + Clear All Elements + + + + + + :/images/toolbar/addToPage.png:/images/toolbar/addToPage.png + + + Add + + + + + true + + + true + + + + :/images/stylusPalette/pen.png + :/images/stylusPalette/penOn.png:/images/stylusPalette/pen.png + + + Pen + + + Annotate Document + + + Ctrl+I + + + + + true + + + + :/images/stylusPalette/eraser.png + :/images/stylusPalette/eraserOn.png:/images/stylusPalette/eraser.png + + + Eraser + + + Erase Annotation + + + Ctrl+E + + + + + true + + + + :/images/stylusPalette/marker.png + :/images/stylusPalette/markerOn.png:/images/stylusPalette/marker.png + + + Marker + + + Highlight + + + Ctrl+M + + + + + true + + + + :/images/stylusPalette/arrow.png + :/images/stylusPalette/arrowOn.png:/images/stylusPalette/arrow.png + + + Selector + + + Select And Modify Objects + + + Ctrl+F + + + + + true + + + + :/images/stylusPalette/hand.png + :/images/stylusPalette/handOn.png:/images/stylusPalette/hand.png + + + Hand + + + Scroll Page + + + + + true + + + + :/images/stylusPalette/zoomIn.png + :/images/stylusPalette/zoomInOn.png:/images/stylusPalette/zoomIn.png + + + Zoom In + + + + + true + + + + :/images/stylusPalette/zoomOut.png + :/images/stylusPalette/zoomOutOn.png:/images/stylusPalette/zoomOut.png + + + Zoom Out + + + + + true + + + + :/images/stylusPalette/laser.png + :/images/stylusPalette/laserOn.png:/images/stylusPalette/laser.png + + + Laser Pointer + + + Virtual Laser Pointer + + + Ctrl+G + + + + + true + + + + :/images/stylusPalette/line.png + :/images/stylusPalette/lineOn.png:/images/stylusPalette/line.png + + + Line + + + Draw Lines + + + Ctrl+J + + + + + true + + + + :/images/stylusPalette/text.png + :/images/stylusPalette/textOn.png:/images/stylusPalette/text.png + + + Text + + + Write Text + + + Ctrl+K + + + + + true + + + + :/images/stylusPalette/captureArea.png + :/images/stylusPalette/captureAreaOn.png:/images/stylusPalette/captureArea.png + + + Capture + + + Capture Part of the Screen + + + + + + :/images/addItemToCurrentPage.svg:/images/addItemToCurrentPage.svg + + + Add To Current Page + + + Add To Current Page + + + Add Item To Current Page + + + + + + :/images/addItemToNewPage.svg:/images/addItemToNewPage.svg + + + Add To New Page + + + Add Item To New Page + + + + + + :/images/addItemToLibrary.svg:/images/addItemToLibrary.svg + + + Add To Library + + + Add Item To Library + + + + + false + + + + :/images/toolbar/newDocument.png:/images/toolbar/newDocument.png + + + Pages + + + Create a New Page + + + + + + :/images/addItemToCurrentPage.svg:/images/addItemToCurrentPage.svg + + + New Page + + + Create a New Page + + + + + + :/images/addItemToNewPage.svg:/images/addItemToNewPage.svg + + + Duplicate Page + + + Duplicate the Current Page + + + + + + :/images/addItemToLibrary.svg:/images/addItemToLibrary.svg + + + Import Page + + + Import an External Page + + + + + true + + + false + + + + :/images/toolbar/pause.png:/images/toolbar/pause.png + + + Pause + + + Pause Podcast Recording + + + + + + :/images/toolbar/settings.png:/images/toolbar/settings.png + + + Podcast Config + + + Configure Podcast Recording + + + + + + :/images/toolbar/addToolToLibrary.png:/images/toolbar/addToolToLibrary.png + + + Flash Trap + + + Trap Flash Content + + + + + true + + + + :/images/extraPalette/webTrap.png + :/images/extraPalette/webTrapEnabled.png:/images/extraPalette/webTrap.png + + + Web Trap + + + Trap Web Content + + + + + + :/images/toolbar/captureArea.png:/images/toolbar/captureArea.png + + + Custom Capture + + + Capture Part of the Screen + + + + + + :/images/toolbar/captureWindow.png:/images/toolbar/captureWindow.png + + + Window Capture + + + Capture a Window + + + + + false + + + + :/images/extraPalette/oEmbed.png:/images/extraPalette/oEmbed.png + + + Embed Web Content + + + Capture Embeddable Web Content + + + + + true + + + + :/images/toolbar/eyeClosed.png + :/images/toolbar/eyeOpened.png:/images/toolbar/eyeClosed.png + + + Show on Display + + + Show Main Screen on Display Screen + + + false + + + QAction::TextHeuristicRole + + + + + true + + + + :/images/toolbar/tools.png:/images/toolbar/tools.png + + + Tools + + + Define Drawing Options + + + + + + :/images/erasePalette/eraseAnnotation.svg:/images/erasePalette/eraseAnnotation.svg + + + Erase Annotations + + + Erase all Annotations + + + + + + :/images/toolbar/addToolToLibrary.png:/images/toolbar/addToolToLibrary.png + + + eduMedia + + + Import eduMedia simulation + + + + + + :/images/toolbar/tutorial.png:/images/toolbar/tutorial.png + + + Tutorial + + + Open the tutorial + + + + + + :/images/toolbar/updates.png:/images/toolbar/updates.png + + + Check Update + + + + + + :/images/toolbar/paraschool.png:/images/toolbar/paraschool.png + + + Sankoré Editor + + + Show Sankore Widgets Editor + + + + + + :/images/toolbar/hide.png:/images/toolbar/hide.png + + + Hide Sankoré + + + Hide Sankoré Application + + + Ctrl+H + + + + + true + + + + :/images/stylusPalette/magnifier.png + :/images/stylusPalette/magnifierOn.png:/images/stylusPalette/magnifier.png + + + Magnifier + + + Magnifier + + + + + true + + + + :/images/toolbar/smallMagnifierZoom.png:/images/toolbar/smallMagnifierZoom.png + + + Zoom + + + x2 Zoom + + + + + true + + + true + + + + :/images/toolbar/mediumMagnifierZoom.png:/images/toolbar/mediumMagnifierZoom.png + + + Zoom + + + x3 Zoom + + + + + true + + + + :/images/toolbar/largeMagnifierZoom.png:/images/toolbar/largeMagnifierZoom.png + + + Zoom + + + x4 Zoom + + + + + true + + + + :/images/toolbar/smallMagnifierSize.png:/images/toolbar/smallMagnifierSize.png + + + Size + + + 10% from scene size + + + + + true + + + + :/images/toolbar/mediumMagnifierSize.png:/images/toolbar/mediumMagnifierSize.png + + + Size + + + 20% from scene size + + + + + true + + + + :/images/toolbar/largeMagnifierSize.png:/images/toolbar/largeMagnifierSize.png + + + Size + + + 30% from scene size + + + + + + + + diff --git a/resources/images/stylusPalette/magnifier.png b/resources/images/stylusPalette/magnifier.png new file mode 100644 index 00000000..2690747b Binary files /dev/null and b/resources/images/stylusPalette/magnifier.png differ diff --git a/resources/images/stylusPalette/magnifierOn.png b/resources/images/stylusPalette/magnifierOn.png new file mode 100644 index 00000000..03896037 Binary files /dev/null and b/resources/images/stylusPalette/magnifierOn.png differ diff --git a/resources/images/toolbar/largeMagnifierSize.png b/resources/images/toolbar/largeMagnifierSize.png new file mode 100644 index 00000000..d5d6ea2e Binary files /dev/null and b/resources/images/toolbar/largeMagnifierSize.png differ diff --git a/resources/images/toolbar/largeMagnifierZoom.png b/resources/images/toolbar/largeMagnifierZoom.png new file mode 100644 index 00000000..d5d6ea2e Binary files /dev/null and b/resources/images/toolbar/largeMagnifierZoom.png differ diff --git a/resources/images/toolbar/mediumMagnifierSize.png b/resources/images/toolbar/mediumMagnifierSize.png new file mode 100644 index 00000000..b3b1950d Binary files /dev/null and b/resources/images/toolbar/mediumMagnifierSize.png differ diff --git a/resources/images/toolbar/mediumMagnifierZoom.png b/resources/images/toolbar/mediumMagnifierZoom.png new file mode 100644 index 00000000..b3b1950d Binary files /dev/null and b/resources/images/toolbar/mediumMagnifierZoom.png differ diff --git a/resources/images/toolbar/smallMagnifierSize.png b/resources/images/toolbar/smallMagnifierSize.png new file mode 100644 index 00000000..554f3549 Binary files /dev/null and b/resources/images/toolbar/smallMagnifierSize.png differ diff --git a/resources/images/toolbar/smallMagnifierZoom.png b/resources/images/toolbar/smallMagnifierZoom.png new file mode 100644 index 00000000..554f3549 Binary files /dev/null and b/resources/images/toolbar/smallMagnifierZoom.png differ diff --git a/resources/sankore.qrc b/resources/sankore.qrc index af062959..72e7236f 100644 --- a/resources/sankore.qrc +++ b/resources/sankore.qrc @@ -121,6 +121,12 @@ images/toolbar/eraserTool.png images/toolbar/lineTool.png images/toolbar/tools.png + images/toolbar/largeMagnifierSize.png + images/toolbar/mediumMagnifierSize.png + images/toolbar/smallMagnifierSize.png + images/toolbar/largeMagnifierZoom.png + images/toolbar/mediumMagnifierZoom.png + images/toolbar/smallMagnifierZoom.png images/stylusPalette/arrow.png images/stylusPalette/arrowOn.png images/stylusPalette/eraser.png @@ -144,6 +150,8 @@ images/stylusPalette/textOn.png images/stylusPalette/captureArea.png images/stylusPalette/captureAreaOn.png + images/stylusPalette/magnifier.png + images/stylusPalette/magnifierOn.png images/backgroundPalette/background1.svg images/backgroundPalette/background1On.svg images/backgroundPalette/background2.svg diff --git a/src/board/UBBoardController.cpp b/src/board/UBBoardController.cpp index 97e7bdb8..712e1e0d 100644 --- a/src/board/UBBoardController.cpp +++ b/src/board/UBBoardController.cpp @@ -289,7 +289,9 @@ void UBBoardController::setupToolbar() mMainWindow->boardToolBar->insertWidget(mMainWindow->actionBackgrounds, lineWidthChoice); + //-----------------------------------------------------------// // Setup eraser width choice widget + QList eraserWidthActions; eraserWidthActions.append(mMainWindow->actionEraserSmall); eraserWidthActions.append(mMainWindow->actionEraserMedium); @@ -307,6 +309,45 @@ void UBBoardController::setupToolbar() eraserWidthChoice->setCurrentIndex(settings->eraserWidthIndex()); mMainWindow->boardToolBar->insertSeparator(mMainWindow->actionBackgrounds); + + //-----------------------------------------------------------// + + QList magnifierZoomActions; + magnifierZoomActions.append(mMainWindow->actionMagnifierZoomSmall); + magnifierZoomActions.append(mMainWindow->actionMagnifierZoomMedium); + magnifierZoomActions.append(mMainWindow->actionMagnifierZoomLarge); + + UBToolbarButtonGroup *magnifierZoomChoice = + new UBToolbarButtonGroup(mMainWindow->boardToolBar, magnifierZoomActions); + + mMainWindow->boardToolBar->insertWidget(mMainWindow->actionBackgrounds, magnifierZoomChoice); + + connect(settings->appToolBarDisplayText, SIGNAL(changed(QVariant)), magnifierZoomChoice, SLOT(displayText(QVariant))); + connect(magnifierZoomChoice, SIGNAL(activated(int)), UBDrawingController::drawingController(), SLOT(setMagnifierZoomIndex(int))); + + magnifierZoomChoice->displayText(QVariant(settings->appToolBarDisplayText->get().toBool())); + magnifierZoomChoice->setCurrentIndex(settings->magnifierZoomIndex()); + + QList magnifierSizeActions; + magnifierSizeActions.append(mMainWindow->actionMagnifierSizeSmall); + magnifierSizeActions.append(mMainWindow->actionMagnifierSizeMedium); + magnifierSizeActions.append(mMainWindow->actionMagnifierSizeLarge); + + UBToolbarButtonGroup *magnifierSizeChoice = + new UBToolbarButtonGroup(mMainWindow->boardToolBar, magnifierSizeActions); + + mMainWindow->boardToolBar->insertWidget(mMainWindow->actionBackgrounds, magnifierSizeChoice); + + connect(settings->appToolBarDisplayText, SIGNAL(changed(QVariant)), magnifierSizeChoice, SLOT(displayText(QVariant))); + connect(magnifierSizeChoice, SIGNAL(activated(int)), UBDrawingController::drawingController(), SLOT(setMagnifierSizeIndex(int))); + + magnifierSizeChoice->displayText(QVariant(settings->appToolBarDisplayText->get().toBool())); + magnifierSizeChoice->setCurrentIndex(settings->magnifierSizeIndex()); + + mMainWindow->boardToolBar->insertSeparator(mMainWindow->actionBackgrounds); + + //-----------------------------------------------------------// + UBApplication::app()->insertSpaceToToolbarBeforeAction(mMainWindow->boardToolBar, mMainWindow->actionBoard); UBApplication::app()->insertSpaceToToolbarBeforeAction(mMainWindow->tutorialToolBar, mMainWindow->actionBoard); diff --git a/src/board/UBBoardView.cpp b/src/board/UBBoardView.cpp index 7e9a256b..d38df42c 100644 --- a/src/board/UBBoardView.cpp +++ b/src/board/UBBoardView.cpp @@ -855,7 +855,10 @@ UBBoardView::setToolCursor (int tool) controlViewport->setCursor (UBResources::resources ()->penCursor); break; case UBStylusTool::Eraser: - controlViewport->setCursor (UBResources::resources ()->eraserCursor); + controlViewport->setCursor (UBResources::resources ()->eraserCursor); + break; + case UBStylusTool::Magnifier: + controlViewport->setCursor (UBResources::resources ()->magnifierCursor); break; case UBStylusTool::Marker: controlViewport->setCursor (UBResources::resources ()->markerCursor); diff --git a/src/board/UBDrawingController.cpp b/src/board/UBDrawingController.cpp index 9cf9233b..61196338 100644 --- a/src/board/UBDrawingController.cpp +++ b/src/board/UBDrawingController.cpp @@ -44,6 +44,7 @@ UBDrawingController::UBDrawingController(QObject * parent) connect(UBApplication::mainWindow->actionPen, SIGNAL(triggered(bool)), this, SLOT(penToolSelected(bool))); connect(UBApplication::mainWindow->actionEraser, SIGNAL(triggered(bool)), this, SLOT(eraserToolSelected(bool))); + connect(UBApplication::mainWindow->actionMagnifier, SIGNAL(triggered(bool)), this, SLOT(magnifierToolSelected(bool))); connect(UBApplication::mainWindow->actionMarker, SIGNAL(triggered(bool)), this, SLOT(markerToolSelected(bool))); connect(UBApplication::mainWindow->actionSelector, SIGNAL(triggered(bool)), this, SLOT(selectorToolSelected(bool))); connect(UBApplication::mainWindow->actionHand, SIGNAL(triggered(bool)), this, SLOT(handToolSelected(bool))); @@ -102,6 +103,8 @@ void UBDrawingController::setStylusTool(int tool) UBApplication::mainWindow->actionPen->setChecked(true); else if (mStylusTool == UBStylusTool::Eraser) UBApplication::mainWindow->actionEraser->setChecked(true); + else if (mStylusTool == UBStylusTool::Magnifier) + UBApplication::mainWindow->actionMagnifier->setChecked(true); else if (mStylusTool == UBStylusTool::Marker) UBApplication::mainWindow->actionMarker->setChecked(true); else if (mStylusTool == UBStylusTool::Selector) @@ -263,6 +266,20 @@ void UBDrawingController::setEraserWidthIndex(int index) } +void UBDrawingController::setMagnifierZoomIndex(int index) +{ + setStylusTool(UBStylusTool::Magnifier); + UBSettings::settings()->setMagnifierZoomIndex(index); +} + + +void UBDrawingController::setMagnifierSizeIndex(int index) +{ + setStylusTool(UBStylusTool::Magnifier); + UBSettings::settings()->setMagnifierSizeIndex(index); +} + + void UBDrawingController::setPenColor(bool onDarkBackground, const QColor& color, int pIndex) { if (onDarkBackground) @@ -323,6 +340,11 @@ void UBDrawingController::eraserToolSelected(bool checked) setStylusTool(UBStylusTool::Eraser); } +void UBDrawingController::magnifierToolSelected(bool checked) +{ + if (checked) + setStylusTool(UBStylusTool::Magnifier); +} void UBDrawingController::markerToolSelected(bool checked) { diff --git a/src/board/UBDrawingController.h b/src/board/UBDrawingController.h index 2f6e8f3e..2e4e4394 100644 --- a/src/board/UBDrawingController.h +++ b/src/board/UBDrawingController.h @@ -57,6 +57,8 @@ class UBDrawingController : public QObject void setLineWidthIndex(int index); void setColorIndex(int index); void setEraserWidthIndex(int index); + void setMagnifierZoomIndex(int index); + void setMagnifierSizeIndex(int index); signals: void stylusToolChanged(int tool); @@ -75,6 +77,7 @@ class UBDrawingController : public QObject void penToolSelected(bool checked); void eraserToolSelected(bool checked); + void magnifierToolSelected(bool checked); void markerToolSelected(bool checked); void selectorToolSelected(bool checked); void handToolSelected(bool checked); diff --git a/src/core/UB.h b/src/core/UB.h index bf989b2e..72fed56e 100644 --- a/src/core/UB.h +++ b/src/core/UB.h @@ -26,6 +26,7 @@ struct UBStylusTool { Pen = 0, Eraser, + Magnifier, Marker, Selector, Hand, @@ -46,6 +47,23 @@ struct UBWidth }; }; +struct UBZoom +{ + enum Enum + { + Small = 0, Medium, Large + }; +}; + +struct UBSize +{ + enum Enum + { + Small = 0, Medium, Large + }; +}; + + struct UBItemLayerType { enum Enum @@ -80,7 +98,8 @@ struct UBGraphicsItemType CompassItemType, ProtractorItemType, StrokeItemType, - TriangleItemType + TriangleItemType, + MagnifierItemType, }; }; diff --git a/src/core/UBSettings.cpp b/src/core/UBSettings.cpp index 84511d6a..2e8997b6 100644 --- a/src/core/UBSettings.cpp +++ b/src/core/UBSettings.cpp @@ -556,55 +556,49 @@ QList UBSettings::markerColors(bool onDarkBackground) } } +//----------------------------------------// +// eraser int UBSettings::eraserWidthIndex() { return value("Board/EraserCircleWidthIndex", 1).toInt(); } - void UBSettings::setEraserWidthIndex(int index) { setValue("Board/EraserCircleWidthIndex", index); } - qreal UBSettings::eraserFineWidth() { return value("Board/EraserFineWidth", 16).toDouble(); } - void UBSettings::setEraserFineWidth(qreal width) { setValue("Board/EraserFineWidth", width); } - qreal UBSettings::eraserMediumWidth() { return value("Board/EraserMediumWidth", 64).toDouble(); } - void UBSettings::setEraserMediumWidth(qreal width) { setValue("Board/EraserMediumWidth", width); } - qreal UBSettings::eraserStrongWidth() { return value("Board/EraserStrongWidth", 128).toDouble(); } - void UBSettings::setEraserStrongWidth(qreal width) { setValue("Board/EraserStrongWidth", width); } - qreal UBSettings::currentEraserWidth() { qreal width = 0; @@ -630,6 +624,169 @@ qreal UBSettings::currentEraserWidth() return width; } +//----------------------------------------// +// magnifier + +//-------------// +// zoom index + +int UBSettings::magnifierZoomIndex() +{ + return value("Board/MagnifierZoomIndex", 1).toInt(); +} + +void UBSettings::setMagnifierZoomIndex(int index) +{ + setValue("Board/MagnifierZoomIndex", index); +} + +//-------------// +// small zoom + +qreal UBSettings::magnifierSmallZoom() +{ + return value("Board/MagnifierSmallZoom", 2).toDouble(); +} + +void UBSettings::setMagnifierSmallZoom(qreal xZoom) +{ + setValue("Board/MagnifierSmallZoom", xZoom); +} + +//-------------// +// medium zoom + +qreal UBSettings::magnifierMediumZoom() +{ + return value("Board/MagnifierMediumZoom", 3).toDouble(); +} + +void UBSettings::setMagnifierMediumZoom(qreal xZoom) +{ + setValue("Board/MagnifierMediumZoom", xZoom); +} + +//-------------// +// large zoom + +qreal UBSettings::magnifierLargeZoom() +{ + return value("Board/MagnifierLargeZoom", 4).toDouble(); +} + +void UBSettings::setMagnifierLargeZoom(qreal xZoom) +{ + setValue("Board/MagnifierLargeZoom", xZoom); +} + +//-------------// + +qreal UBSettings::currentMagnifierZoom() +{ + qreal zoom = 0; + + switch (magnifierZoomIndex()) + { + case UBZoom::Small: + zoom = magnifierSmallZoom(); + break; + case UBZoom::Medium: + zoom = magnifierMediumZoom(); + break; + case UBZoom::Large: + zoom = magnifierLargeZoom(); + break; + default: + Q_ASSERT(false); + //failsafe + zoom = magnifierSmallZoom(); + break; + } + + return zoom; +} + +//-------------// +// size index + +int UBSettings::magnifierSizeIndex() +{ + return value("Board/MagnifierSizeIndex", 1).toInt(); +} + +void UBSettings::setMagnifierSizeIndex(int index) +{ + setValue("Board/MagnifierSizeIndex", index); +} + +//-------------// +// small zoom + +qreal UBSettings::magnifierSmallSize() +{ + return value("Board/MagnifierSmallSize", 10).toDouble(); +} + +void UBSettings::setMagnifierSmallSize(qreal xSize) +{ + setValue("Board/MagnifierSmallSize", xSize); +} + +//-------------// +// medium zoom + +qreal UBSettings::magnifierMediumSize() +{ + return value("Board/MagnifierMediumSize", 20).toDouble(); +} + +void UBSettings::setMagnifierMediumSize(qreal xSize) +{ + setValue("Board/MagnifierMediumSize", xSize); +} + +//-------------// +// large zoom + +qreal UBSettings::magnifierLargeSize() +{ + return value("Board/MagnifierLargeSize", 30).toDouble(); +} + +void UBSettings::setMagnifierLargeSize(qreal xSize) +{ + setValue("Board/MagnifierLargeSize", xSize); +} + +//-------------// + +qreal UBSettings::currentMagnifierSize() +{ + qreal size = 0; + + switch (magnifierSizeIndex()) + { + case UBSize::Small: + size = magnifierSmallSize(); + break; + case UBSize::Medium: + size = magnifierMediumSize(); + break; + case UBSize::Large: + size = magnifierLargeSize(); + break; + default: + Q_ASSERT(false); + //failsafe + size = magnifierSmallSize(); + break; + } + + return size; +} + +//----------------------------------------// + bool UBSettings::isDarkBackground() { diff --git a/src/core/UBSettings.h b/src/core/UBSettings.h index b93767ee..67afc057 100644 --- a/src/core/UBSettings.h +++ b/src/core/UBSettings.h @@ -66,6 +66,19 @@ class UBSettings : public QObject qreal eraserStrongWidth(); qreal currentEraserWidth(); + // Magnifier related + int magnifierZoomIndex(); + qreal magnifierSmallZoom(); + qreal magnifierMediumZoom(); + qreal magnifierLargeZoom(); + qreal currentMagnifierZoom(); + + int magnifierSizeIndex(); + qreal magnifierSmallSize(); + qreal magnifierMediumSize(); + qreal magnifierLargeSize(); + qreal currentMagnifierSize(); + // Background related bool isDarkBackground(); bool isCrossedBackground(); @@ -347,6 +360,17 @@ class UBSettings : public QObject void setEraserMediumWidth(qreal width); void setEraserStrongWidth(qreal width); + void setMagnifierZoomIndex(int index); + void setMagnifierSmallZoom(qreal xZoom); + void setMagnifierMediumZoom(qreal xZoom); + void setMagnifierLargeZoom(qreal xZoom); + + void setMagnifierSizeIndex(int index); + void setMagnifierSmallSize(qreal xSize); + void setMagnifierMediumSize(qreal xSize); + void setMagnifierLargeSize(qreal xSize); + + void setStylusPaletteVisible(bool visible); void setPenPressureSensitive(bool sensitive); diff --git a/src/domain/UBGraphicsScene.cpp b/src/domain/UBGraphicsScene.cpp index 0974105f..fdc5bf82 100644 --- a/src/domain/UBGraphicsScene.cpp +++ b/src/domain/UBGraphicsScene.cpp @@ -29,6 +29,8 @@ #include "core/UBDisplayManager.h" #include "core/UBPersistenceManager.h" +#include "gui/UBMagnifer.h" + #include "tools/UBGraphicsRuler.h" #include "tools/UBGraphicsProtractor.h" #include "tools/UBGraphicsCompass.h" @@ -88,6 +90,8 @@ UBGraphicsScene::UBGraphicsScene(UBDocumentProxy* parent) , mCurrentStroke(0) , mShouldUseOMP(true) , mItemCount(0) + , magniferControlViewWidget(0) + , magniferDisplayViewWidget(0) { #ifdef __ppc__ @@ -232,6 +236,15 @@ bool UBGraphicsScene::inputDevicePress(const QPointF& scenePos, const qreal& pre drawPointer(scenePos); accepted = true; } + else if (currentTool == UBStylusTool::Magnifier) + { + CreateMagnifierQWidgets(QCursor::pos() /*scenePos*/); + magniferControlViewWidget->grabNMove(QCursor::pos(), true); + magniferDisplayViewWidget->grabNMove(scenePos, true); + magniferControlViewWidget->show(); + magniferDisplayViewWidget->show(); + accepted = true; + } } return accepted; @@ -305,6 +318,11 @@ bool UBGraphicsScene::inputDeviceMove(const QPointF& scenePos, const qreal& pres { drawPointer(position); } + else if (currentTool == UBStylusTool::Magnifier) + { + magniferControlViewWidget->grabNMove(QCursor::pos(), false); + magniferDisplayViewWidget->grabNMove(position, false); + } accepted = true; } @@ -329,15 +347,25 @@ bool UBGraphicsScene::inputDeviceRelease() bool accepted = false; + + if (mPointer) { mPointer->hide(); accepted = true; } - if (UBDrawingController::drawingController()->isDrawingTool()) + UBDrawingController *dc = UBDrawingController::drawingController(); + UBStylusTool::Enum currentTool = (UBStylusTool::Enum)dc->stylusTool(); + if (dc->isDrawingTool()) { mCurrentStroke = 0; + } + else + if (currentTool == UBStylusTool::Magnifier) + { + DisposeMagnifierQWidgets(); + //qDebug() << "deleted"; } if (mRemovedItems.size() > 0 || mAddedItems.size() > 0) @@ -395,6 +423,45 @@ void UBGraphicsScene::drawPointer(const QPointF &pPoint) } } +// call this function when user press mouse button in Magnifier mode +void UBGraphicsScene::CreateMagnifierQWidgets(const QPoint & globalPos) +{ + UBApplication::app()->setOverrideCursor( QCursor( Qt::BlankCursor ) ); + + magniferControlViewWidget = new UBMagnifer((QWidget*)(UBApplication::boardController->controlContainer())); + magniferControlViewWidget->setGrabView((QGraphicsView*)UBApplication::boardController->controlView()); + magniferControlViewWidget->setMoveView((QGraphicsView*)UBApplication::boardController->controlContainer()); + magniferControlViewWidget->setSize(UBSettings::settings()->currentMagnifierSize()); + magniferControlViewWidget->setZoom(UBSettings::settings()->currentMagnifierZoom()); + + magniferDisplayViewWidget = new UBMagnifer((QWidget*)(UBApplication::boardController->displayView())); + magniferDisplayViewWidget->setGrabView((QGraphicsView*)UBApplication::boardController->controlView()); + magniferDisplayViewWidget->setMoveView((QGraphicsView*)UBApplication::boardController->displayView()); + magniferDisplayViewWidget->setSize(UBSettings::settings()->currentMagnifierSize()); + magniferDisplayViewWidget->setZoom(UBSettings::settings()->currentMagnifierZoom()); +} + +// call this function when user release mouse button in Magnifier mode +void UBGraphicsScene::DisposeMagnifierQWidgets() +{ + if(magniferControlViewWidget) + { + magniferControlViewWidget->hide(); + magniferControlViewWidget->setParent(0); + delete magniferControlViewWidget; + magniferControlViewWidget = NULL; + } + + if(magniferDisplayViewWidget) + { + magniferDisplayViewWidget->hide(); + magniferDisplayViewWidget->setParent(0); + delete magniferDisplayViewWidget; + magniferDisplayViewWidget = NULL; + } + + UBApplication::app()->restoreOverrideCursor(); +} void UBGraphicsScene::moveTo(const QPointF &pPoint) { diff --git a/src/domain/UBGraphicsScene.h b/src/domain/UBGraphicsScene.h index e3d30af3..8092baf3 100644 --- a/src/domain/UBGraphicsScene.h +++ b/src/domain/UBGraphicsScene.h @@ -44,6 +44,7 @@ class UBAbstractWidget; class UBDocumentProxy; class UBGraphicsCurtainItem; class UBGraphicsStroke; +class UBMagnifer; const double PI = 4.0 * atan(1.0); @@ -288,6 +289,9 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem void drawEraser(const QPointF& pEndPoint); void drawPointer(const QPointF& pEndPoint); + void CreateMagnifierQWidgets(const QPoint &point); + void DisposeMagnifierQWidgets(); + virtual void keyReleaseEvent(QKeyEvent * keyEvent); @@ -347,6 +351,9 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem QList mFastAccessItems; // a local copy as QGraphicsScene::items() is very slow in Qt 4.6 //int mMesure1Ms, mMesure2Ms; + + UBMagnifer *magniferControlViewWidget; + UBMagnifer *magniferDisplayViewWidget; }; #endif /* UBGRAPHICSSCENE_H_ */ diff --git a/src/gui/UBMagnifer.cpp b/src/gui/UBMagnifer.cpp new file mode 100644 index 00000000..0888522e --- /dev/null +++ b/src/gui/UBMagnifer.cpp @@ -0,0 +1,155 @@ + +#include "UBMagnifer.h" +#include +#include +#include +#include +#include +#include +#include +#include + +UBMagnifer::UBMagnifer(QWidget *parent) + : QWidget(parent) + , gView(0) + , mView(0) + , sizePercentFromScene(20) + , inTimer(false) + , borderPen(Qt::darkGray) +{ + borderPen.setWidth(2); +} + +UBMagnifer::~UBMagnifer() +{ + if (timerUpdate != 0) + { + killTimer(timerUpdate); + timerUpdate = 0; + } +} + +void UBMagnifer::setSize(int percentFromScene) +{ + if(gView == NULL) return; + + // calculate object size + sizePercentFromScene = percentFromScene; + QSize sceneSize = gView->size(); + int size = sizePercentFromScene * sceneSize.width() / 100; + + setGeometry(0, 0, size, size); + + // prepare transparent bit mask + QImage mask_img(width(), height(), QImage::Format_Mono); + mask_img.fill(0xff); + QPainter mask_ptr(&mask_img); + mask_ptr.setBrush( QBrush( QColor(0, 0, 0) ) ); + mask_ptr.drawEllipse(QPoint(size/2, size/2), size/2, size/2); + bmpMask = QBitmap::fromImage(mask_img); + + // prepare general image + pMap = QPixmap(width(), height()); + pMap.fill(Qt::transparent); + pMap.setMask(bmpMask); +} + +void UBMagnifer::setZoom(int z) +{ + zoom = z; + + zWidth = size().width() / zoom; + zWidthHalf = zWidth / 2; + zHeight = size().height() / zoom; + zHeightHalf = zHeight / 2; +} + +void UBMagnifer::paintEvent(QPaintEvent *) +{ + QPainter p(this); + p.drawPixmap(0, 0, pMap); + + // in future replace to image border + QPen pen(Qt::darkGray); + pen.setWidth(2); + p.setPen(borderPen); + p.drawEllipse(QPoint( size().width() / 2, size().height() / 2), size().width() / 2, size().height() / 2); +} + +void UBMagnifer::timerEvent(QTimerEvent *e) +{ + if(inTimer) return; + if (e->timerId() == timerUpdate) + { + inTimer = true; + if(!(updPoint.isNull())) grabPoint(updPoint); + if(!(updPointF.isNull()))grabPoint(updPointF); + inTimer = false; + } +} + +void UBMagnifer::grabPoint(const QPoint &point) +{ + QPointF itemPos = gView->mapFromGlobal(point); + + int x = itemPos.x() - zWidthHalf; + int y = itemPos.y() - zHeightHalf; + + QPixmap newPixMap(QSize(zWidth,zHeight)); + ((QWidget*)gView)->render(&newPixMap, QPoint(0, 0), QRegion(x, y, zWidth, zHeight)); + pMap.fill(Qt::transparent); + pMap = newPixMap.scaled(QSize(width(), height())); + pMap.setMask(bmpMask); + + update(); +} + +void UBMagnifer::grabPoint(const QPointF &point) +{ + QPoint itemPos = gView->mapFromScene(point); + + int x = itemPos.x() - zWidthHalf; + int y = itemPos.y() - zHeightHalf; + + QPixmap newPixMap(QSize(zWidth,zHeight)); + ((QWidget*)gView)->render(&newPixMap, QPoint(0, 0), QRegion(x, y, zWidth, zHeight)); + pMap.fill(Qt::transparent); + pMap = newPixMap.scaled(QSize(width(), height())); + pMap.setMask(bmpMask); + + update(); +} + + +// from global +void UBMagnifer::grabNMove(const QPoint &point, bool needGrab = true) +{ + updPoint = point; + + if(needGrab) + grabPoint(point); + QPoint itemPos = mView->mapFromGlobal(point); + move(itemPos.x() - width()/2, itemPos.y() - height()/2); +// move(itemPos.x(), itemPos.y()); +} + +// from scene +void UBMagnifer::grabNMove(const QPointF &point, bool needGrab = true) +{ + updPointF = point; + + if(needGrab) + grabPoint(point); + QPoint itemPos = mView->mapFromScene(point); + move(itemPos.x() - width()/2, itemPos.y() - height()/2); +// move(itemPos.x(), itemPos.y()); +} + +void UBMagnifer::setGrabView(QGraphicsView *view) +{ + if (timerUpdate != 0) + killTimer(timerUpdate); + gView = view; + timerUpdate = startTimer(200); +} + diff --git a/src/gui/UBMagnifer.h b/src/gui/UBMagnifer.h new file mode 100644 index 00000000..435775a3 --- /dev/null +++ b/src/gui/UBMagnifer.h @@ -0,0 +1,60 @@ + +#ifndef UBMAGNIFER_H +#define UBMAGNIFER_H + +#include +#include +#include + +class QPixmap; +class QBitmap; +class QPen; +class QGraphicsView; + +class UBMagnifer : public QWidget +{ + Q_OBJECT + +public: + UBMagnifer(QWidget *parent = 0); + ~UBMagnifer(); + + void setSize(int percentFromScene); + void setZoom(int z); + + void setGrabView(QGraphicsView *view); + void setMoveView(QGraphicsView *view) {mView = view;} + + void grabPoint(const QPoint &point); + void grabPoint(const QPointF &point); + void grabNMove(const QPoint &point, bool needGrab); + void grabNMove(const QPointF &point, bool needGrab); + +protected: + void paintEvent(QPaintEvent *); + void timerEvent(QTimerEvent *); + + int sizePercentFromScene; + + +private: + int zoom; + int zWidth; + int zHeight; + int zWidthHalf; + int zHeightHalf; + bool inTimer; + + int timerUpdate; + QPoint updPoint; + QPointF updPointF; + + QPixmap pMap; + QBitmap bmpMask; + QPen borderPen; + + QGraphicsView *gView; + QGraphicsView *mView; +}; + +#endif // UBMAGNIFER_H diff --git a/src/gui/UBResources.cpp b/src/gui/UBResources.cpp index 9827a827..8c18bf0e 100644 --- a/src/gui/UBResources.cpp +++ b/src/gui/UBResources.cpp @@ -49,15 +49,16 @@ UBResources* UBResources::resources() void UBResources::init() { // Cursors - penCursor = QCursor(Qt::CrossCursor); - eraserCursor = QCursor(QPixmap(":/images/cursors/eraser.png"), 21, 21); - markerCursor = QCursor(QPixmap(":/images/cursors/marker.png"), 3, 30); - pointerCursor = QCursor(QPixmap(":/images/cursors/laser.png"), 2, 1); - handCursor = QCursor(Qt::OpenHandCursor); - zoomInCursor = QCursor(QPixmap(":/images/cursors/zoomIn.png"), 9, 9); - zoomOutCursor = QCursor(QPixmap(":/images/cursors/zoomOut.png"), 9, 9); - arrowCursor = QCursor(Qt::ArrowCursor); - textCursor = QCursor(Qt::ArrowCursor); - rotateCursor = QCursor(QPixmap(":/images/cursors/rotate.png"), 16, 16); + penCursor = QCursor(Qt::CrossCursor); + eraserCursor = QCursor(QPixmap(":/images/cursors/eraser.png"), 21, 21); + magnifierCursor = QCursor(QPixmap(":/images/cursors/zoomIn.png"), 9, 9); + markerCursor = QCursor(QPixmap(":/images/cursors/marker.png"), 3, 30); + pointerCursor = QCursor(QPixmap(":/images/cursors/laser.png"), 2, 1); + handCursor = QCursor(Qt::OpenHandCursor); + zoomInCursor = QCursor(QPixmap(":/images/cursors/zoomIn.png"), 9, 9); + zoomOutCursor = QCursor(QPixmap(":/images/cursors/zoomOut.png"), 9, 9); + arrowCursor = QCursor(Qt::ArrowCursor); + textCursor = QCursor(Qt::ArrowCursor); + rotateCursor = QCursor(QPixmap(":/images/cursors/rotate.png"), 16, 16); drawLineRulerCursor = QCursor(QPixmap(":/images/cursors/drawRulerLine.png"), 3, 12); } diff --git a/src/gui/UBResources.h b/src/gui/UBResources.h index bae4eee6..fd32fa6d 100644 --- a/src/gui/UBResources.h +++ b/src/gui/UBResources.h @@ -37,6 +37,7 @@ class UBResources : public QObject QCursor penCursor; QCursor eraserCursor; + QCursor magnifierCursor; QCursor markerCursor; QCursor pointerCursor; QCursor handCursor; diff --git a/src/gui/UBStylusPalette.cpp b/src/gui/UBStylusPalette.cpp index 93073ccd..4ae06f4c 100644 --- a/src/gui/UBStylusPalette.cpp +++ b/src/gui/UBStylusPalette.cpp @@ -37,6 +37,7 @@ UBStylusPalette::UBStylusPalette(QWidget *parent, Qt::Orientation orient) actions << UBApplication::mainWindow->actionPen; actions << UBApplication::mainWindow->actionEraser; + actions << UBApplication::mainWindow->actionMagnifier; actions << UBApplication::mainWindow->actionMarker; actions << UBApplication::mainWindow->actionSelector; diff --git a/src/gui/gui.pri b/src/gui/gui.pri index c1f18185..e1fa70a4 100644 --- a/src/gui/gui.pri +++ b/src/gui/gui.pri @@ -38,7 +38,8 @@ HEADERS += src/gui/UBThumbnailView.h \ src/gui/UBLibActionBar.h \ src/gui/UBLibraryWidget.h \ src/gui/UBLibPathViewer.h \ - src/gui/UBUpdateDlg.h + src/gui/UBUpdateDlg.h \ + src/gui/UBMagnifer.h SOURCES += src/gui/UBThumbnailView.cpp \ src/gui/UBFloatingPalette.cpp \ @@ -79,7 +80,8 @@ SOURCES += src/gui/UBThumbnailView.cpp \ src/gui/UBLibActionBar.cpp \ src/gui/UBLibraryWidget.cpp \ src/gui/UBLibPathViewer.cpp \ - src/gui/UBUpdateDlg.cpp + src/gui/UBUpdateDlg.cpp \ + src/gui/UBMagnifer.cpp win32 {