Compare commits
7 Commits
ubuntu/que
...
upstream/1
Author | SHA1 | Date | |
---|---|---|---|
|
727bda879b | ||
|
11dcc131c7 | ||
|
356a29f903 | ||
|
c177e5784f | ||
|
11f6e30f7c | ||
|
d325fba672 | ||
|
c41701becf |
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +0,0 @@
|
||||
build/
|
||||
*.qm
|
||||
*.kdev4
|
621
CHANGELOG
621
CHANGELOG
@ -1,119 +1,538 @@
|
||||
2.0
|
||||
* Port on Qt5
|
||||
|
||||
1.2
|
||||
* Added ability for autosaving type of the last created screenshot
|
||||
* Some small fixes
|
||||
screengrab-1.97 / 2017-09-26
|
||||
============================
|
||||
|
||||
1.1.1
|
||||
* Fixed wrong 'imgur' uploading result string for bb-code with preview
|
||||
* Fixed segfault when exist configuration file contains "showTrayIcon=false"
|
||||
* Added basic .gitattributes
|
||||
* Bump SCREENGRAB_VERSION to 1.9.7
|
||||
* Added KF5WindowSystem to build requirements
|
||||
* Updated italian translation
|
||||
* Update Qt Linguist files
|
||||
* French translation
|
||||
* Adds "snap to border" functionality
|
||||
* Fixes a FTBFS when compiled against Qt 5.8
|
||||
|
||||
1.1
|
||||
* added ability to upload to MediaCreush (http://mediacru.sh)
|
||||
* Option "Always save the window size" replaced by "autosave window size on exit ScreenGrab"
|
||||
* Reworked main window ui (the order of the buttons)
|
||||
* Reworked the configuration dialog (some UI elements moved between sections, and increment count of the sections)
|
||||
1.96 / 2016-10-18
|
||||
=================
|
||||
|
||||
1.0
|
||||
* Fixed dual monitor support
|
||||
* added XDG_CONFIG_HOME support, by a build option SG_XDG_CONFIG_SUPPORT
|
||||
* added ability to upload to some image hosting services (imgur.com and imgshack.us)
|
||||
* added build option for compiling without the upload feature (SG_EXT_UPLOADS build option)
|
||||
* added "Previous selection" mode (save the last selected area and restore it in the next get area screenshot)
|
||||
* added ability to edit a screenshot in an external editor
|
||||
* added option for preview screenshot in default image viewer by double click on screenshot area
|
||||
* Fixed non-minimize main window on "Exit" shortcut, when using "Minimize to tray" option
|
||||
* Fixed bug with cutting button text on main window
|
||||
* Fixed regression with not capturing a screenshot when a second instance of ScreenGrab is running
|
||||
* fixed bug with not creating the path to autosave screenshots (when it is typed in manually in configuration dialog)
|
||||
* added build option SG_GLOBALSHORTCUTS for turning on/off build with global shortcuts support
|
||||
* autoincrement filenames when saving screenshots in manual mode (in one running session)
|
||||
* added the ability to customise shortcuts to close ScreenGrab
|
||||
* added ability to run ScreenGrab minimized to tray (or taskbar, if tray is disabled) with "--minimized" command line option
|
||||
* Added ability to automatically upload the screenshot via the command line "--upload" parameter
|
||||
* Bump version to 1.96
|
||||
* Disable the uploads the hard way - all other methods don't work right now. Only using the trigger results in a FTBFS. So for now it's the best just not to use the uploader lib.
|
||||
* Work around grep 2.23 new behaviour
|
||||
* Drop support for saving as bmp
|
||||
* Remove unnecessary notification on screenshot
|
||||
* Remove MediaCrush support as the official site shut down
|
||||
* Some fixes regarding orthography and wording
|
||||
* Documentation: fix some typos and HTML formatting issues
|
||||
* Translations: drop country-specific translations in German and Italian
|
||||
* Cleanup unused functions and defs
|
||||
* Adds the Ui elements to support shot type saving/loading
|
||||
* Adds methods to get/set screenshot type from/to config file
|
||||
* imgur: Use https for uploads
|
||||
* Make Imgur the default upload host again
|
||||
* GPL2 header added whitespaces fixed
|
||||
* fixed wrong fsf address the hard way
|
||||
* Updates the CMake minimum version to v3.0.2
|
||||
* Adapt to Qt5Xdg new way of finding the package
|
||||
* Grab the mouse pointer only if the option is enabled
|
||||
* Add checkboxes for enable or disable grab image of the mouse pointer
|
||||
* Add configuration option for enable or disable grabbing image of the mouse pointer
|
||||
* Change const DEF_ENABLE_EXT_VIEWER from "1" to "true"
|
||||
* Add code for grab image of the cursor on the screenshots (full screen or active window)
|
||||
* Add CMake modules for finding XCB library
|
||||
* Install the app icon to the hicolor theme
|
||||
* Move "quit" toolbutton to the right edge of toolbar
|
||||
* Return simple QSystemTray notification, if D-Bus notifications is disabled
|
||||
* Add build option "-DSG_DBUS_NOTIFY" for enable \ disable D-Bus notification support
|
||||
* Replace QStystemTray notification at Freedesktop notificaions (via DBus)
|
||||
* Rename method "Core::getScreen" to "Core::getScreenData"
|
||||
* Add configuration option for url to mediacru.sh uploader
|
||||
* "Imgur' now is default uploader
|
||||
* Create screengrab_it.desktop
|
||||
* Update screengrab_it_IT.ts
|
||||
|
||||
0.9.1
|
||||
* fixed non-switching combo-box "Type of Screeen" when grabbing screenshot from signal by another instance
|
||||
* fixed incorect grab active window screens in GNOME (when disabled "Allow multiple copies" option and run another instance)
|
||||
1.95_pr1 / 2015-01-29
|
||||
=====================
|
||||
|
||||
0.9
|
||||
* added global shortcuts
|
||||
* added option to enable|disable system tray
|
||||
* added switch to the already running instance of an application when you start a second instance (non-operating mode to allow multiple instances)
|
||||
* added autosave first screenshot which has been taken on application start (enabled | disabled optional)
|
||||
* redesign of the configuration dialog UI
|
||||
* Reverse wrong cleanup in 21ad656c7284f346f5ecd4fc6914fa53b5c23093
|
||||
|
||||
0.8.1
|
||||
* [Linux] fixed incorrect selection of the default saving format in the KDE 4.4.x save file dialog
|
||||
* added de_DE translation
|
||||
1.95 / 2015-01-29
|
||||
=================
|
||||
|
||||
0.8
|
||||
* added command line parameters for grab modes (fullscreen, active window, selection area)
|
||||
* added BMP support
|
||||
* added pt_BR translation
|
||||
* added automatically hiding main window on grab process
|
||||
* [Linux] fixed grab active window screenshot without decorations
|
||||
* [Linux] added option "no window decoration"
|
||||
* added shortcuts for main window buttons
|
||||
* v2.0-beta1
|
||||
* Small CMakeLists cleanup
|
||||
* Refactor connections signals & slots to the Qt5-style (modules classes)
|
||||
* Refactor connections signals & slots to the Qt5-style (core and ui classes)
|
||||
* Incapsulate pointer to Config instance in Core instance
|
||||
* Remove debug output prints
|
||||
* Add ability to upload on MediaCrush vith "--upload" command line option
|
||||
* Restore ability to upload screenshot vith "--upload" command line option
|
||||
* Restore ability for send IPC signal from new instance to the running instance (if "Allow multiple instances" is disabled)
|
||||
* Actions of the modules (upload & edit) moved to the right at the toolbar
|
||||
* Restore ability to run as minimized to tray (or taskbarO
|
||||
* Actions of the modules (upload & edit) moved to the left at the toolbar
|
||||
* Replace the deprecated QPixmap::grabWindow() method at the QScreen::grabWindow()
|
||||
* Replase emitimh signal "newScreenShot" by direct call "updatePixmap" method of the MainWnd
|
||||
* Make re-update preview after editing screenshot
|
||||
* Fox wrong connect to slot for the "copy" action
|
||||
* Refactor adding to main toolbar the actions for upload & edit screenshot
|
||||
* Restore code for autosave mainwindow size on exit
|
||||
* Change order initialization for some members of the MainWindow
|
||||
* Kill some old unused code
|
||||
* Refactor code for displaying tray info messages
|
||||
* Update code fo crate / kill tray icon and tray menu actions
|
||||
* Remove some old code
|
||||
* Restore shortcuts
|
||||
* Restore open screenshot in ext viewer by double click on preview
|
||||
* Restore display tooltip on the preview image
|
||||
* Make right resizing mainwindow preview on startup
|
||||
* Return worked resize pixmap on resizing main window
|
||||
* Small return show() main window code
|
||||
* Captured screenshot now displayed again
|
||||
* Return make first screenshot when app is running
|
||||
* Remove old quit() method from MainWindow
|
||||
* Rewok restoring main window after shot
|
||||
* Fix file saving (now used Qt-based dialog for save)
|
||||
* Refactir method for hide main window on the sho event
|
||||
* Screenshot with delay is moved to Core::setScreen
|
||||
* Update close event code
|
||||
* Fix crash on exit
|
||||
* Code from "restoreWindow()" moved to "show()" (Main window)
|
||||
* Start refactoring MainWindos and COre
|
||||
* Sync translation infrastrucuture with LXQt
|
||||
* Destroy old architecture
|
||||
* lxqt_translate_desktop: Updates code to cope with the cmake-policy CMP0054
|
||||
* Fix translations loader path bug introduced recently
|
||||
* Remove old Windows files and move Changelog.txt
|
||||
* More CMake cleanups
|
||||
* Remove call 'displayPixmap()' method from the constructor of main window.
|
||||
* Made first screenshot not too small in main window
|
||||
* Removes left behind commented lines
|
||||
* Merges singleapp lib with the core.
|
||||
* More cleanups
|
||||
* Use QDesktopServices::openUrl instead of calling xdg-open on uploader
|
||||
* Move configuration const variables to #defines
|
||||
* Remove option to use XDG's home config path and use it by default
|
||||
* Remove old unused code
|
||||
* Remove unused include in moduleuploader class
|
||||
* Bump minimal required Qt version to 5.2
|
||||
* Replace old command line parser on the QCommandLineParser
|
||||
* Extracts modules translations sources
|
||||
* Adds translation infrastructure to the modules
|
||||
* Updates main application translations sources
|
||||
* Use LXQt translation infrastructure
|
||||
* Drop the check on Qt5LinguistTools_FOUND
|
||||
* Avoid opening two intances of external editor
|
||||
* translations: Use install(FILES ...) instead of install(DIRECTORY ...)
|
||||
* Fix is not loaded translations
|
||||
* Remove unnecessary separator from toolbar
|
||||
* Use the same actions for both toolbar and tray menu
|
||||
* Removed code specific to X11 (using KWindowSystem now) and large code refactoring to LXQt's style
|
||||
* GUI fixes
|
||||
* Use libqtxdg for the external editor module
|
||||
* Fix some smapp typos in README
|
||||
* Bump version number to 2.0-dev
|
||||
* Add AUTHORS list
|
||||
* Fix wrong 'imgur' uploading result string for bb-code with preview
|
||||
* Fix regressive starting crash with 'showTrayIcon=false' settings parameter
|
||||
* Define and handle LIB_SUFFIX
|
||||
* Updated German translation
|
||||
* Move buttons on right to toolbar and clean up main window layout
|
||||
* Add an empty toolbar
|
||||
* Get rid of DESKTOP_SESSION hacks
|
||||
* Normalize style to whatever extent possible..
|
||||
* Move translations to translations/
|
||||
* No need to mention Qt-based
|
||||
* Update Russian translation
|
||||
* Remove debian/
|
||||
* Move license to COPYING
|
||||
* Change default preferences shortcut to something more appropriate
|
||||
* Remove unused code
|
||||
* Get rid of a warning in dialoguploader.ui
|
||||
* Fix a warning in Core::sleep()
|
||||
* Fix translations
|
||||
* Windows support removed and CMake cleanups
|
||||
* Port to Qt5
|
||||
* CMakeLists.txt cleanup
|
||||
* Some clean-ups in docs/html/en/index.html
|
||||
* Fixed some typos in CMakeLists.txt
|
||||
* Reword help messages
|
||||
* Clean up --help output
|
||||
* Remove imgshack support
|
||||
* Move Delay below the screen, next to Type
|
||||
|
||||
0.6.2 [Linux only]
|
||||
* fixed non-translated tray menu (closed issue #7)
|
||||
1.2 / 2014-12-30
|
||||
================
|
||||
|
||||
0.6.1 [Linux only]
|
||||
* fixed incorrect detection of the system language in some Linux distributions
|
||||
* v1.2 release
|
||||
* Add some Q_UNUSED macro
|
||||
* Update changelog
|
||||
* Add option for autosaving type of the last created screenshot
|
||||
* Add ability for autosaving type of the last created screenshot
|
||||
* Fix a warning in Core::sleep()
|
||||
|
||||
0.6
|
||||
* default value of hiding main window changed to true.
|
||||
* added input template for inserting date-time into the saved filename
|
||||
* added zoom around mouse cursor in area selection mode
|
||||
* small modifications of the configuration dialog
|
||||
* added html help info (English & Russian)
|
||||
1.1.1 / 2014-11-14
|
||||
==================
|
||||
|
||||
0.5
|
||||
* added inserting date|time in saving filename [optional]
|
||||
* added auto saving screenshots in grabbing process [option]
|
||||
* added option to change the time of displaying tray messages [1 - 10 sec]
|
||||
* added help info
|
||||
* added tool tips for the UI elements
|
||||
* small fixes config file syntax
|
||||
* v1.1.1
|
||||
* Update .ts files
|
||||
* Fix wrong 'imgur' uploading result string for bb-code with preview
|
||||
* Fix regressive starting crash with 'showTrayIcon=false' settings parameter
|
||||
|
||||
v0.4
|
||||
* added grabbing selection screen area
|
||||
* added ability to copy image files into the clipboard
|
||||
* added saving the size of the main window on exit [default is turned off]
|
||||
* halve the memory size occupied by ScreenGrab at startup
|
||||
* [win32] fixed bug with storing the screengrab.ini file
|
||||
* change structure of some source code
|
||||
* change buttons tab order of the main window
|
||||
* new application icon
|
||||
* some fixes
|
||||
1.1 / 2014-11-12
|
||||
================
|
||||
|
||||
v0.3.1
|
||||
* fixed bug with non-displayed main window icon
|
||||
* v1.1
|
||||
* Reword help messages
|
||||
* Clean up --help output
|
||||
* Update 'direct link' string for Uploade::MediaCrush (made link really direct, not page with image)
|
||||
* Hide "fade effect" bug on the kwin with enabled compositing. issue #48
|
||||
* Small update .ts files
|
||||
* Change the "Exit" to a "Quit" button in the main window
|
||||
* Updated help-file (cont.)
|
||||
* Updated help-file (cont.)
|
||||
* Updated help-file (cont.)
|
||||
* Updated help-file (cont.)
|
||||
* Updated help file (cont.)
|
||||
* Fix non-reading local mimieifo.cache issue #42
|
||||
* Start update docs for 1.1 release issue #43
|
||||
* Update ChangeLog for 1.1 release
|
||||
* Updated help file (cont.)
|
||||
* Updated help file (cont.)
|
||||
* Updated help file
|
||||
* Updated ChangeLog.txt
|
||||
* Fixed some typos in ChangeLog.txt
|
||||
* Updated German translation
|
||||
* Update ts files more
|
||||
* Update translation files
|
||||
* Update about.cpp
|
||||
* Update configwidget.ui
|
||||
* Update about.cpp
|
||||
* Update core.cpp
|
||||
* Update dialoguploader.cpp
|
||||
* Update screengrab.desktop
|
||||
* Update configwidget.cpp
|
||||
* Update README.md
|
||||
* Add check Debian or Ubuntu, via existing '/etc/debian_version' file (for set LIB path)
|
||||
* Add hiding label and field for display preformated html and bb code with links to uploaded screenshot, when these links not were generated by uploader module. close #33
|
||||
* Fix some tooltps in the window of the result uploading. issue #33
|
||||
* Add the button for open "drect link" in the window of the result uploading. issue #33
|
||||
* Add the button for open "delete link" in the window of the result uploading. issue #33
|
||||
* Move "delete link" (in the window of the result uploading) into separate UI element issue #33
|
||||
* Add empty widget for MediaCrush uploading settings. Fixed #36
|
||||
* some typos: omage -> image Sset -> Set {A,a}utomaticaly - tically
|
||||
* Add the delete url for MediaCrush uploads issue #27
|
||||
* Micro refactor in MediaCrush uploder code
|
||||
* Updated readme file
|
||||
* Set Qt 4.8.0 as minimum required verions of Qt
|
||||
* Add uploading to MediaCrush issue #27
|
||||
* Move the clipboard setting below the default host. issue #28
|
||||
* Set active tab "Saving" in the main section on load settings dialog issue #28
|
||||
* Remove unused section in the configuration dialog issue #28
|
||||
* Move "Zoom area around mouse in selection mode" to the "Main" section, in the "Screenshot" tab issue #28
|
||||
* Move the filename clipboard copy to the Main tab, in the Saving section issue #28
|
||||
* Secyion "main" of the configuration widget were split to the two tabs issue #28
|
||||
* Disable (instead of hiding) other tray options when the tray isn't checked issue #28
|
||||
* Fixes some English strings in the settings dialo issue #28
|
||||
* Fixes some English strings in the settings dialog issue #28
|
||||
* Made "Upload" and "Edit" in as two buttons instead "Advanced" button. close #29
|
||||
* Fix detect 'lib64' dir
|
||||
* Make "Help" a menu-button, with "Help" and "About" as menu items issue #29
|
||||
* Option "Always save the window size" replaced by autosave window size on exit app. issue #28
|
||||
* Started developing version 1.1
|
||||
* Refactor some win32-depend code
|
||||
|
||||
v0.3
|
||||
* main window is now based on ui-file (remaked UI)
|
||||
* added grabbing active window
|
||||
* added option to allow running multiple instances of ScreenGrab
|
||||
* added option to select between minimizing to tray and closing ScreenGrab (by close window button)
|
||||
1.0 / 2013-08-13
|
||||
================
|
||||
|
||||
v0.2
|
||||
* added JPEG support
|
||||
* added options dialog
|
||||
* added option to select a default directory for saving the files
|
||||
* added option to select a default filename
|
||||
* added option to select a default image format
|
||||
* added saving options into an INI-file
|
||||
* added i18n support and Russian localisation
|
||||
* some fixes and changes in the code
|
||||
* Windows version is now available as installer
|
||||
* Release 1.0
|
||||
* Fix segfault on startup, when missing configuration file close #26
|
||||
* Update ukrainian translation
|
||||
* Update translation files
|
||||
* Refactor some private class members (coding style fix)
|
||||
* Updated copyrights (2012 -> 2013 year), version 1.0
|
||||
* Remove unused files in ExtEdit module
|
||||
* Update docs close #22
|
||||
* Change modules lib fron STATIC to SHARED (only linux) close #23
|
||||
* Enable shared linking with qkeysequencewidget library issue #23
|
||||
* Update changelog for feature, which was added in issue #20
|
||||
* Add the ability to automaticaly upload screenshot via command line "--upload" param issue #20
|
||||
* Add dummy code for shadow upload screenshot issue #20
|
||||
* Remove some old an unused code
|
||||
* Refactor comand line options code close #21
|
||||
* Add public method to ModuleManager, for init modules outside Core constructor
|
||||
* Add "upload" cmd line param
|
||||
* Update docs
|
||||
* Update changelog
|
||||
* Add opening screenshot in external default viewer by double click issue #18
|
||||
* Add tooltip on screenshot view in main window issue #18
|
||||
* Add load and saving @Enable ext view@ option in gui configuration dialog issue #18
|
||||
* Add checkbox for enable disable external view option issue #18
|
||||
* Add config param for enable\disable external view on dbl click issue #18
|
||||
* Refactor code for reset to default settings in modules
|
||||
* Fix non restore ImgUr as default image host by reset setings
|
||||
* Refactor configwidget code for load modules configwidgets and save settings
|
||||
* Remove prereserved listitem for ploader config widget in main configdialog
|
||||
* Add return module by num if for cycle call all modules
|
||||
* Add method for returning modules count (modulemanager)
|
||||
* Add returning module name method to module interface
|
||||
* Const string for path to global app linst moved outside a ExtEdit class
|
||||
* Add ability to editing screenshots in external app (in Win32 platforn) close issue #10
|
||||
* Add update screenshot when it is a changed and saved in external editor.
|
||||
* Changed Core::getPixmap() return value form QPixmap to QPixmap*.
|
||||
* Add monitoring changes for editing screenshot in external app by QFileSystemWatcher (issue #10)
|
||||
* Implemented opening screenshot in selected external app. issue #10
|
||||
* Add killing temp file after prepare screenshot for uploading
|
||||
* Add core mrthod to kill temporary file
|
||||
* Move method for getTempFilename from Uploader class to Core class
|
||||
* Remove old unused code for module calls
|
||||
* Implement base run selected external editor (without file)
|
||||
* Set caption "Close" to DialogUploader->butClose in uploadDone slot
|
||||
* Set caption "Close" to DialogUploader->butClose in uploadDone slot
|
||||
* Refactor code for generate and display links with links on uploaded image (add delete url if it avalible) issue#17
|
||||
* Add show delete url in "imgur uploader" #17
|
||||
* Fix text labels on the uploader view (close #19)
|
||||
* Temporary fix regressive crash whan display configuration dialog
|
||||
* Remove some debug outputs
|
||||
* make inheritance class ModuleUploader by QObject and AbstractModule and connect class action to Init() slot
|
||||
* Refactor generate advansed menu in mainwindow
|
||||
* Add module base interface and modulemanager basic implementation
|
||||
* Add implementation for get external editors list
|
||||
* Add extedit module static lib to linl on main code
|
||||
* Add displaing status of SG_EXT_EDIT build variable
|
||||
* ./src/common/singleapp/singleapp.cpp:94:60: error: format not a string literal and no format arguments [-Werror=format-security] ./src/common/singleapp/singleapp.cpp:100:60: error: format not a string literal and no format arguments [-Werror=format-security] cc1plus: some warnings being treated as errors
|
||||
* Add module ext edit implementation
|
||||
* Add license header in extedit module files
|
||||
* Add menu for advanced actions and reconnect "Upload" slot to it.
|
||||
* Change butUpload to butAdvanced
|
||||
* Add blank code for module 'external edit'
|
||||
* Fix override user set CXXFLAGS (close #14)
|
||||
* Some small fix in ui and updated translation files
|
||||
* added ability to run in minimized to ttray (or taskar, if tray is disabled) with "--minimized" comand line option
|
||||
* Add "Previous selection" mode (issue #12)
|
||||
* Micro fix code formating
|
||||
* Small updates in user docs files
|
||||
* Change preview image alignment in uploader dialog
|
||||
* Fix incorrect scale of preview image in uploader dialog
|
||||
* Fix non-selection default (first) image hosting in uploader dialog, when uploader.conf is missing
|
||||
* Small fix in README filex
|
||||
* Add note for building with using system version Qxt in Debian-based Linux distro (#11)
|
||||
* Kill some compile warnings in uploader code
|
||||
|
||||
v0.1
|
||||
* first public version
|
||||
* added system tray icon and menu
|
||||
* added option to hide ScreenGrab in systray
|
||||
* added option to block running a second instance of ScreenGrab
|
||||
0.9.96 / 2012-10-03
|
||||
===================
|
||||
|
||||
v0.0.3
|
||||
- first working build
|
||||
* v0.9.96 (1.0-rc, code and text strings are freezed to 1.0 release)
|
||||
* Update translation files
|
||||
* Remake about dialog
|
||||
* Add layouts to "Common settings" tab in uploader config widget
|
||||
* Implement selection uploader fron "defaultHost" settings param
|
||||
* Add options for selectin default image hosting
|
||||
* Change the text align on label for the option to select host settings (uploader config widget)
|
||||
* Fix install README file problem
|
||||
* Add some forgotten strings to README
|
||||
* Update README file
|
||||
* Add ability to build with system Qxt Lib (-DSG_USE_SYSTEM_QXT=ON) #11
|
||||
* Add FindQxt.cmake module for detecting installed Qxt Library
|
||||
* Fix resizing list of configuration sections
|
||||
* Remove fixed size in configuration dialog
|
||||
* Some small modified ui of uploader module
|
||||
* Add layout to uploaderconfigwidget_imgur
|
||||
* Remove some debug and unused code
|
||||
* Add autocopy to clipboard result direct url for uploaded screenshot (if it is a set as true)
|
||||
* Add widget for configuration uploading to image hosts (imgshack is work, imgur is not)
|
||||
* Add .gitignore file
|
||||
* Add save, load and deafaults setings of uploader (base, not full settings for image hostings)
|
||||
* Add widget for uploader settings
|
||||
* Fix incorrect defination path to user documentation files
|
||||
* Move README file to project root directory
|
||||
* Added forgotten license header into some new files
|
||||
* Restore functionality for umageshack.us uploader part
|
||||
* Add base implementation load & save uploader config params
|
||||
* Slider "Image Quality" is hiding, if selected default format not "jpg" (issue #8)
|
||||
* v0.9.94
|
||||
* Some small code formating changes and remove unused code
|
||||
|
||||
0.9.94 / 2012-07-27
|
||||
===================
|
||||
|
||||
* Some small code formating changes and remove unused code
|
||||
* Fix non-minimize main window on @Exit@ shortcut, when use "Minimize to tray" option
|
||||
* Escape key now is default shortcut to exit (issue #7)
|
||||
* add ability to compile without upload feature [-DSG_EXT_UPLOADS=OFF] issue#5
|
||||
* Remaked uploader module (base functions) Add ability to upload to imgur.com (issue #4)
|
||||
* Add "0" symbol before string of screenshot's number (if num < 10)
|
||||
* Remove conditional compilation in get save path function [core]
|
||||
* Fix regression of autosaving first screenshot, when filename includes date-time
|
||||
* Add checking existing file, when filename of saving file contains date-time string
|
||||
* Removed compareSavename core function
|
||||
* Moved screen number variable to Config class And commit forgotten changes for area selection grabber code
|
||||
* Fix crash when canceled select of screen area (by Esc key)
|
||||
* Append scheenshot number (1,2,3,etc) to default screenshot name, if it is already exists (issu #6)
|
||||
* Updated ChangeLog
|
||||
* Add build option SG_XDG_CONFIG_SUPPORT for enable storage config files in XDG_CONFIG_JOME (issue
|
||||
* [X11 only] add moving config files from old-style location ($HOME/.screengrab/) to XDG_CONFIG_HOME ($XDG_CONFIG_HOME/screengrab/)
|
||||
|
||||
0.9.90 / 2012-04-06
|
||||
===================
|
||||
|
||||
* Add Spanish translation (thanks to Burjans L García D)
|
||||
* Add Italian translation (thnks to speps)
|
||||
* Fix for selection on dual monitor
|
||||
* Updated copyrights (2011 -> 2012 year), version 0.9.90
|
||||
* Fixed wrong saving screenshot, when canceled area selection (in "Screen area" mode)
|
||||
* Removed bad and deprecated code in regionselectclass
|
||||
* changed applying region selection (from releasing left mouse button to double click or pressing enter)
|
||||
* aligned some code lines in mainwindow.cpp
|
||||
* Added disabling slider for set image qualkity, when bmp format is selected
|
||||
* Added build option for manually setting name of documentation directory in unix(e.g. screengrab-1.0"
|
||||
* Moved defination -DBUILD_QXT_GUI to if SG_GLOBALSHORTCUTS block
|
||||
* Dixed some warnings
|
||||
* Added "image quality" option for saved screenshots
|
||||
* Removed overloaded method Core::writeScreen and moved his functionality to main Core::writeScreen method
|
||||
* Fixed code indents in configwidget.cpp
|
||||
* Modified ui for uploader doalog
|
||||
* Set minimal button size of uis to 112 px
|
||||
* Modified configuration dialog (tabwidget replaced by stackedwidget + listwidget)
|
||||
* button text "Information" replaced with "About"
|
||||
|
||||
0.9.85 / 2011-08-17
|
||||
===================
|
||||
|
||||
* Modified CMakeLists.txt - added some target for create distro (src and windows binary)
|
||||
* Fixed non-saving uploader settings in windows
|
||||
* Modified changelog and CMakeLists.txt v0.9.85
|
||||
* small fix ui
|
||||
* v0.9.82
|
||||
* Fixed regression with non-capturing screen when runnin another instance
|
||||
* Changed sizePolicy for buttons on main windows changed default width from 449 to 480 fixed issue #11
|
||||
* Fixed non-creating directory for saved screenshot, when it directory was manualy entered in config dialog (v0.9.81) changed method of creating a dev-version number (nov baed on git rev)
|
||||
* Fixed non-creating directory for saved screenshot, when it directory was manualy entered in config dialog (v0.9.81) changed method of creating a dev-version number (nov baed on git rev)
|
||||
|
||||
0.9.80 / 2011-05-30
|
||||
===================
|
||||
|
||||
* Added implementation uploader settings
|
||||
* Added static method to get the settings storage directory
|
||||
* Implement set username and password in uploading process
|
||||
* Added ui elements for user's imageshack account (login|pass)
|
||||
* Added connectyion between errorFail signal in uploader backend and errorFail slot in uploader giu
|
||||
* Fix incorrect setting mime-type for uploaded jpeg screenshots
|
||||
* Added parsing returned error messages
|
||||
* Modified ui for uploader dialog (set layouts on upload page)
|
||||
* Modified ui for uploader dialog (set layouts on upload page)
|
||||
* Added select modes for server-side resize uploaded screenshots
|
||||
* Implement uploaderdialog ui basic functionaly
|
||||
* Added basic implementation of create network request for uploader
|
||||
* Added overloaded function writeScreen() in Core
|
||||
* Started implementation uploading
|
||||
* Added overloaded function writeScreen() in Core
|
||||
* added skeletons for of functions for creating upload data & http-request
|
||||
* Some small changes in uploader ui
|
||||
* added connect button click to uploading slot
|
||||
* Cleaned uploaderdialog ui (kill deprecated concept)
|
||||
* Added copying string of saved image name (file name or full path)
|
||||
* Small upd some include directives
|
||||
* Implementation of the autoincrement filenames when saving screenshots in maual mode (in one running session)
|
||||
* Updated CmakeLists.txt
|
||||
* Added build option SG_GLOBALSHORTCUTS for enable|disable global shortcuts support in compile time
|
||||
* Added setup @close shortcut" on close button
|
||||
* Added ui dialog item foe @close shortcut"
|
||||
* Added config key and default value for shotrcut close (load & save shortcuts modified)
|
||||
* Changed detecting KDE session in show savefile dialog (for display KDE-based dialog in KDE SC 4.6)
|
||||
* Starting development version 1.0
|
||||
* added dir for debian-based pakcge cfgs
|
||||
* Started uploader branch
|
||||
|
||||
0.9.1 / 2011-01-20
|
||||
==================
|
||||
|
||||
* v 0.9.1
|
||||
* Remove incorrect symbol in mai.cpp
|
||||
* added debian oackage configs
|
||||
* Updated ts files
|
||||
* Updaded docs files
|
||||
* Changed years in license headers
|
||||
* Added hack for in gnome on showing window when run second instance app
|
||||
* Removed double grab screen in start another instance app
|
||||
* Removed executable flag from source files
|
||||
* Added link to X11, for building in some rpm-based linux distro (Fedora, Mandriva, etc)
|
||||
* Removed g++ warnings on some function of CmdLine class
|
||||
* Added return value on assignment operator of Core class
|
||||
* Close regression with not create screenshot whe run second instace app
|
||||
* Added question messagebox on restore settings (replace information messagebox)
|
||||
* Fix tray visible regression (hack with reimplement MainWindow::show() method )
|
||||
* Added grab screenshot in restore mainwindow on signal from anther instance app (tested in KDE SC 4.6)
|
||||
* Fixed non changed "Type" combobox on restoring app window when recieved msg from another innstance
|
||||
* Start dev 0.9.1 bugfix
|
||||
* Changed detecting KDE session in show savefile dialog (for display KDE-based dialog in KDE SC 4.6)
|
||||
|
||||
0.9 / 2010-11-14
|
||||
================
|
||||
|
||||
* v0.9
|
||||
* Updated pt_BR help file
|
||||
* Removed unused debug output
|
||||
* Small fx text strings
|
||||
* Changed value of DEF_SHOW_TRAY from false to true
|
||||
* Updated pt_BR translation
|
||||
* change spacing for checkbox "Save first screen" from 14 to 16 px
|
||||
* added margin in ledt for checkAutoSaveFirst
|
||||
* mall string fix in core.cpp
|
||||
* Modified README.txt
|
||||
* Modified Russian & Ukrainian translation modified
|
||||
* updated html-based user docs
|
||||
* v0.8.97
|
||||
* String freeze for version 0.9
|
||||
* fixed crash when selected not avalible shortcuts in condig dialog (Windows)
|
||||
* fixed non-build 0.8.95 in windows
|
||||
|
||||
0.8.95.1 / 2010-10-20
|
||||
=====================
|
||||
|
||||
* fixed crash by clicking on empty shortcuts treewidget
|
||||
* Update changelog for 0.9
|
||||
|
||||
0.8.95 / 2010-10-17
|
||||
===================
|
||||
|
||||
* version 0.8.95 (0.9-rc)
|
||||
* Added private slot for block|unblock global shortcuts in main wnd (when show config dialog)
|
||||
* Renamed configwidget -> ConfigDialog & aboutWidget -> AboutDialog
|
||||
* Added activation process of capturing key sequence with mouse dblClick & key enter pressed on hotkey items
|
||||
* change method navigation on hotkeys treewidget
|
||||
* Fixed regression incorrect displays tray messages
|
||||
* Autoconnects replaced to manual connects in config dialog
|
||||
* Refactored getDefaultFormatID method in Config class (ifs -> QVector.indexOf)
|
||||
* added checkbox in configdialog for autosSaveFirst option
|
||||
* added check of autoSaveDirst option on screenShot function
|
||||
* fix forgotten loading autoSaveFirst option
|
||||
* add setter & getter for aoutoSaveFirst option
|
||||
|
||||
0.8.88 / 2010-09-24
|
||||
===================
|
||||
|
||||
* removed some debug code
|
||||
* added small hack for block crash on grab selected area with globalshortcuts (whem main window is trayed) -- win32 only
|
||||
* remove duplicate qrc file some fix on try code
|
||||
* fix for build on win32 with mingw 4.4.0
|
||||
* class screengrab renamed to core
|
||||
* removed some deprecated code
|
||||
* added non-displayed @new screen@ message on crete first screenshot (when ScreenGrab starting)
|
||||
* remove inused code; added small hack for display autosave tray message on running screengrab
|
||||
* restored saving mainwindow size on exit (if it enabled)
|
||||
* restored minimization on tray on close window button, when is it enabled
|
||||
* replace first call screenShot from core to mainWindow (core->screenShot() ) constructor
|
||||
* Test commit
|
||||
* Test commit
|
||||
* Test commit
|
||||
* add implementation get screens on shortcuts
|
||||
* add shortcuts creating in mainwindow
|
||||
* add trayed flag for check minimization to systray
|
||||
* implement show runned aps when run another instance app with disabled allow multiple copies
|
||||
* modify showAbout & showOptions method (fix crash when mainwindow is trayed)
|
||||
* change emiting nweScreen signal pos in code
|
||||
* add display tray notitfications
|
||||
* add block tray icon on mwe screen getting process
|
||||
* add sending StateNotigyMessages from core to mainwindow fix #includes
|
||||
* returned tray
|
||||
* dlete backupp files, created kdevelop
|
||||
* first commit
|
||||
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 2.8.11)
|
||||
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
||||
|
||||
# set project's name
|
||||
project(screengrab)
|
||||
@ -20,8 +20,26 @@ set(CMAKE_AUTOUIC ON)
|
||||
include(GNUInstallDirs)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
|
||||
find_package(X11)
|
||||
if (X11_FOUND)
|
||||
set(HAVE_X11 1)
|
||||
endif(X11_FOUND)
|
||||
|
||||
# set up xcb and x11_xcb
|
||||
|
||||
find_package(
|
||||
XCB MODULE COMPONENTS
|
||||
XCB
|
||||
SHAPE
|
||||
XFIXES
|
||||
)
|
||||
|
||||
find_package(
|
||||
X11_XCB MODULE
|
||||
)
|
||||
|
||||
# add version define
|
||||
set(SCREENGRAB_VERSION "1.95")
|
||||
set(SCREENGRAB_VERSION "1.97")
|
||||
set(SCREENGRAB_VERSION_DEV "2.0-beta1")
|
||||
# set(DEV_BUILD True)
|
||||
|
||||
@ -63,8 +81,9 @@ message(STATUS "Library path: ${CMAKE_INSTALL_RPATH}")
|
||||
|
||||
# options
|
||||
option(SG_GLOBALSHORTCUTS "Enable global shortcuts" OFF)
|
||||
option(SG_EXT_UPLOADS "Enable upload screenshots to MediaCrush and imgur" ON)
|
||||
option(SG_EXT_UPLOADS "Enable upload screenshots to Imgur" ON)
|
||||
option(SG_EXT_EDIT "Enable ability to edit screenshots in external editor" ON)
|
||||
option(SG_DBUS_NOTIFY "Enable D-Bus notifications" ON)
|
||||
option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF)
|
||||
|
||||
# Although the names, LXQtTranslateTs and LXQtTranslateDesktop, they don't
|
||||
@ -90,12 +109,17 @@ endif()
|
||||
if(SG_EXT_EDIT)
|
||||
add_definitions( -DSG_EXT_EDIT="1")
|
||||
find_package(Qt5Xdg REQUIRED)
|
||||
include(${QTXDG_USE_FILE})
|
||||
endif()
|
||||
|
||||
if(SG_DBUS_NOTIFY)
|
||||
find_package(Qt5DBus 5.2 REQUIRED)
|
||||
add_definitions( -DSG_DBUS_NOTIFY="1")
|
||||
endif()
|
||||
|
||||
message(STATUS "Global shortcuts support: " ${SG_GLOBALSHORTCUTS})
|
||||
message(STATUS "Upload to MediaCrush and imgur support: " ${SG_EXT_UPLOADS})
|
||||
message(STATUS "Imgur upload support: " ${SG_EXT_UPLOADS})
|
||||
message(STATUS "Editing screenshots in external editor support: " ${SG_EXT_EDIT})
|
||||
message(STATUS "Enable D-Bus notifications: " ${SG_DBUS_NOTIFY})
|
||||
message(STATUS "Use system Qxt Library: " ${SG_USE_SYSTEM_QXT})
|
||||
message(STATUS "Update source translation translations/*.ts files: " ${UPDATE_TRANSLATIONS})
|
||||
|
||||
@ -104,6 +128,9 @@ message(STATUS "Update source translation translations/*.ts files: " ${UPDATE_TR
|
||||
message(STATUS "Documentation directory: " ${CMAKE_INSTALL_FULL_DOCDIR})
|
||||
add_definitions(-DSG_DOCDIR="${CMAKE_INSTALL_FULL_DOCDIR}")
|
||||
|
||||
# app icon path
|
||||
add_definitions(-DSG_ICONPATH="${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/pixmaps/screengrab.png")
|
||||
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src")
|
||||
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/common/qkeysequencewidget")
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src/common/qkeysequencewidget/src")
|
||||
@ -131,6 +158,14 @@ set(SCREENGRAB_SRC
|
||||
src/core/ui/mainwindow.cpp
|
||||
)
|
||||
|
||||
if(SG_DBUS_NOTIFY)
|
||||
set(SCREENGRAB_SRC ${SCREENGRAB_SRC} src/core/dbusnotifier.cpp)
|
||||
endif()
|
||||
|
||||
if(X11_FOUND)
|
||||
set(SCREENGRAB_SRC ${SCREENGRAB_SRC} src/core/x11utils.cpp)
|
||||
endif()
|
||||
|
||||
set(SCREENGRAB_HDR
|
||||
src/core/singleapp.h
|
||||
)
|
||||
@ -195,8 +230,31 @@ if(SG_EXT_EDIT)
|
||||
target_link_libraries(screengrab extedit)
|
||||
endif()
|
||||
|
||||
target_link_libraries(screengrab qkeysequencewidget Qt5::Widgets KF5::WindowSystem)
|
||||
if(SG_DBUS_NOTIFY)
|
||||
target_link_libraries(screengrab Qt5::DBus)
|
||||
endif()
|
||||
|
||||
if (X11_XCB_FOUND)
|
||||
add_definitions( -DX11_XCB_FOUND="1")
|
||||
target_link_libraries(screengrab ${X11_XCB_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if (XCB_XCB_FOUND)
|
||||
add_definitions( -DXCB_XCB_FOUND="1")
|
||||
target_link_libraries(screengrab ${XCB_XCB_LIBRARY})
|
||||
endif()
|
||||
|
||||
if (XCB_SHAPE_FOUND)
|
||||
add_definitions( -DXCB_SHAPE_FOUND="1")
|
||||
target_link_libraries(screengrab ${XCB_SHAPE_LIBRARY})
|
||||
endif()
|
||||
|
||||
if (XCB_XFIXES_FOUND)
|
||||
add_definitions( -DXCB_XFOXES_FOUND="1")
|
||||
target_link_libraries(screengrab ${XCB_XFIXES_LIBRARY})
|
||||
endif()
|
||||
|
||||
target_link_libraries(screengrab qkeysequencewidget Qt5::Widgets KF5::WindowSystem ${X11_LIBRARIES})
|
||||
|
||||
# make src.tar.gz
|
||||
add_custom_target(dist @echo create source package)
|
||||
@ -226,4 +284,4 @@ install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/docs/html" DESTINATION "${CMAKE_I
|
||||
# install desktop files
|
||||
install(FILES ${SCREENGRAB_DESKTOP_FILES} DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
|
||||
# install pixmap
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/img/screengrab.png" DESTINATION ${CMAKE_INSTALL_DATADIR}/pixmaps)
|
||||
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/img/screengrab.png" DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/32x32/apps")
|
||||
|
@ -11,6 +11,7 @@ Build requirements
|
||||
* Qt5 >= 5.2 (Qt 4.x support only 1.x branch)
|
||||
* CMake >= 2.8.11 (only for building ScreenGrab from sources)
|
||||
* GCC > 4.5
|
||||
* KF5WindowSystem
|
||||
* [optional] Qxt Library > 0.6 (if you want to build ScreenGrab using your system Qxt version - see the "Build options" section in this file)
|
||||
|
||||
Build
|
||||
@ -32,6 +33,7 @@ You can use some or all of these parameters to customise your build.
|
||||
* **-DCMAKE_INSTALL_PREFIX** - Install prefix for Linux distro. Default setting: "/usr".
|
||||
* **-DSG_XDG_CONFIG_SUPPORT** - Place config files into XDGC_CONFIG_HOME directory (usually - ~/.config/${app_name) ). Default setting: ON. In previous versions the config files were stored in ~/.screengrab (Set this parameter to "OFF" to store the config files here).
|
||||
* **-DSG_EXT_UPLOADS** - Enable uploading screenshots to image hosting services. Default setting: ON.
|
||||
* **-DSG_DBUS_NOTIFY** - Enable D-Bus notifications.
|
||||
* **-DSG_GLOBALSHORTCUTS** - Enable global shortcuts for main actions to create screenshots. Default setting: ON.
|
||||
* **-DSG_USE_SYSTEM_QXT** - Use system version Qxt Library for global shortcuts. Default setting: OFF.
|
||||
* **-DSG_DOCDIR** - Name for the directory of user's documentation. Default setting: "screengrab".
|
||||
|
31
cmake/FindX11_XCB.cmake
Normal file
31
cmake/FindX11_XCB.cmake
Normal file
@ -0,0 +1,31 @@
|
||||
# - Try to find libX11-xcb
|
||||
# Once done this will define
|
||||
#
|
||||
# X11_XCB_FOUND - system has libX11-xcb
|
||||
# X11_XCB_LIBRARIES - Link these to use libX11-xcb
|
||||
# X11_XCB_INCLUDE_DIR - the libX11-xcb include dir
|
||||
# X11_XCB_DEFINITIONS - compiler switches required for using libX11-xcb
|
||||
|
||||
# Copyright (c) 2011 Fredrik Höglund <fredrik@kde.org>
|
||||
# Copyright (c) 2008 Helio Chissini de Castro, <helio@kde.org>
|
||||
# Copyright (c) 2007 Matthias Kretz, <kretz@kde.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
IF (NOT WIN32)
|
||||
# use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
FIND_PACKAGE(PkgConfig)
|
||||
PKG_CHECK_MODULES(PKG_X11_XCB QUIET x11-xcb)
|
||||
|
||||
SET(X11_XCB_DEFINITIONS ${PKG_X11_XCB_CFLAGS})
|
||||
|
||||
FIND_PATH(X11_XCB_INCLUDE_DIR NAMES X11/Xlib-xcb.h HINTS ${PKG_X11_XCB_INCLUDE_DIRS})
|
||||
FIND_LIBRARY(X11_XCB_LIBRARIES NAMES X11-xcb HINTS ${PKG_X11_XCB_LIBRARY_DIRS})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(X11_XCB DEFAULT_MSG X11_XCB_LIBRARIES X11_XCB_INCLUDE_DIR)
|
||||
|
||||
MARK_AS_ADVANCED(X11_XCB_INCLUDE_DIR X11_XCB_LIBRARIES)
|
||||
ENDIF (NOT WIN32)
|
238
cmake/FindXCB.cmake
Normal file
238
cmake/FindXCB.cmake
Normal file
@ -0,0 +1,238 @@
|
||||
# Try to find XCB on a Unix system
|
||||
#
|
||||
# This will define:
|
||||
#
|
||||
# XCB_FOUND - True if xcb is available
|
||||
# XCB_LIBRARIES - Link these to use xcb
|
||||
# XCB_INCLUDE_DIRS - Include directory for xcb
|
||||
# XCB_DEFINITIONS - Compiler flags for using xcb
|
||||
#
|
||||
# In addition the following more fine grained variables will be defined:
|
||||
#
|
||||
# XCB_XCB_FOUND XCB_XCB_INCLUDE_DIR XCB_XCB_LIBRARY
|
||||
# XCB_UTIL_FOUND XCB_UTIL_INCLUDE_DIR XCB_UTIL_LIBRARY
|
||||
# XCB_COMPOSITE_FOUND XCB_COMPOSITE_INCLUDE_DIR XCB_COMPOSITE_LIBRARY
|
||||
# XCB_DAMAGE_FOUND XCB_DAMAGE_INCLUDE_DIR XCB_DAMAGE_LIBRARY
|
||||
# XCB_XFIXES_FOUND XCB_XFIXES_INCLUDE_DIR XCB_XFIXES_LIBRARY
|
||||
# XCB_RENDER_FOUND XCB_RENDER_INCLUDE_DIR XCB_RENDER_LIBRARY
|
||||
# XCB_RANDR_FOUND XCB_RANDR_INCLUDE_DIR XCB_RANDR_LIBRARY
|
||||
# XCB_SHAPE_FOUND XCB_SHAPE_INCLUDE_DIR XCB_SHAPE_LIBRARY
|
||||
# XCB_DRI2_FOUND XCB_DRI2_INCLUDE_DIR XCB_DRI2_LIBRARY
|
||||
# XCB_GLX_FOUND XCB_GLX_INCLUDE_DIR XCB_GLX_LIBRARY
|
||||
# XCB_SHM_FOUND XCB_SHM_INCLUDE_DIR XCB_SHM_LIBRARY
|
||||
# XCB_XV_FOUND XCB_XV_INCLUDE_DIR XCB_XV_LIBRARY
|
||||
# XCB_SYNC_FOUND XCB_SYNC_INCLUDE_DIR XCB_SYNC_LIBRARY
|
||||
# XCB_XTEST_FOUND XCB_XTEST_INCLUDE_DIR XCB_XTEST_LIBRARY
|
||||
# XCB_ICCCM_FOUND XCB_ICCCM_INCLUDE_DIR XCB_ICCCM_LIBRARY
|
||||
# XCB_EWMH_FOUND XCB_EWMH_INCLUDE_DIR XCB_EWMH_LIBRARY
|
||||
# XCB_IMAGE_FOUND XCB_IMAGE_INCLUDE_DIR XCB_IMAGE_LIBRARY
|
||||
# XCB_RENDERUTIL_FOUND XCB_RENDERUTIL_INCLUDE_DIR XCB_RENDERUTIL_LIBRARY
|
||||
# XCB_KEYSYMS_FOUND XCB_KEYSYMS_INCLUDE_DIR XCB_KEYSYMS_LIBRARY
|
||||
#
|
||||
# Copyright (c) 2011 Fredrik Höglund <fredrik@kde.org>
|
||||
# Copyright (c) 2013 Martin Gräßlin <mgraesslin@kde.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
set(knownComponents XCB
|
||||
COMPOSITE
|
||||
DAMAGE
|
||||
DRI2
|
||||
EWMH
|
||||
GLX
|
||||
ICCCM
|
||||
IMAGE
|
||||
KEYSYMS
|
||||
RANDR
|
||||
RENDER
|
||||
RENDERUTIL
|
||||
SHAPE
|
||||
SHM
|
||||
SYNC
|
||||
UTIL
|
||||
XFIXES
|
||||
XTEST
|
||||
XV)
|
||||
|
||||
unset(unknownComponents)
|
||||
|
||||
set(pkgConfigModules)
|
||||
set(requiredComponents)
|
||||
|
||||
if (XCB_FIND_COMPONENTS)
|
||||
set(comps ${XCB_FIND_COMPONENTS})
|
||||
else()
|
||||
set(comps ${knownComponents})
|
||||
endif()
|
||||
|
||||
# iterate through the list of requested components, and check that we know them all.
|
||||
# If not, fail.
|
||||
foreach(comp ${comps})
|
||||
list(FIND knownComponents ${comp} index )
|
||||
if("${index}" STREQUAL "-1")
|
||||
list(APPEND unknownComponents "${comp}")
|
||||
else()
|
||||
if("${comp}" STREQUAL "XCB")
|
||||
list(APPEND pkgConfigModules "xcb")
|
||||
elseif("${comp}" STREQUAL "COMPOSITE")
|
||||
list(APPEND pkgConfigModules "xcb-composite")
|
||||
elseif("${comp}" STREQUAL "DAMAGE")
|
||||
list(APPEND pkgConfigModules "xcb-damage")
|
||||
elseif("${comp}" STREQUAL "DRI2")
|
||||
list(APPEND pkgConfigModules "xcb-dri2")
|
||||
elseif("${comp}" STREQUAL "EWMH")
|
||||
list(APPEND pkgConfigModules "xcb-ewmh")
|
||||
elseif("${comp}" STREQUAL "GLX")
|
||||
list(APPEND pkgConfigModules "xcb-glx")
|
||||
elseif("${comp}" STREQUAL "ICCCM")
|
||||
list(APPEND pkgConfigModules "xcb-icccm")
|
||||
elseif("${comp}" STREQUAL "IMAGE")
|
||||
list(APPEND pkgConfigModules "xcb-image")
|
||||
elseif("${comp}" STREQUAL "KEYSYMS")
|
||||
list(APPEND pkgConfigModules "xcb-keysyms")
|
||||
elseif("${comp}" STREQUAL "RANDR")
|
||||
list(APPEND pkgConfigModules "xcb-randr")
|
||||
elseif("${comp}" STREQUAL "RENDER")
|
||||
list(APPEND pkgConfigModules "xcb-render")
|
||||
elseif("${comp}" STREQUAL "RENDERUTIL")
|
||||
list(APPEND pkgConfigModules "xcb-renderutil")
|
||||
elseif("${comp}" STREQUAL "SHAPE")
|
||||
list(APPEND pkgConfigModules "xcb-shape")
|
||||
elseif("${comp}" STREQUAL "SHM")
|
||||
list(APPEND pkgConfigModules "xcb-shm")
|
||||
elseif("${comp}" STREQUAL "SYNC")
|
||||
list(APPEND pkgConfigModules "xcb-sync")
|
||||
elseif("${comp}" STREQUAL "UTIL")
|
||||
list(APPEND pkgConfigModules "xcb-util")
|
||||
elseif("${comp}" STREQUAL "XFIXES")
|
||||
list(APPEND pkgConfigModules "xcb-xfixes")
|
||||
elseif("${comp}" STREQUAL "XTEST")
|
||||
list(APPEND pkgConfigModules "xcb-xtest")
|
||||
elseif("${comp}" STREQUAL "XV")
|
||||
list(APPEND pkgConfigModules "xcb-xv")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
||||
if(DEFINED unknownComponents)
|
||||
set(msgType STATUS)
|
||||
if(XCB_FIND_REQUIRED)
|
||||
set(msgType FATAL_ERROR)
|
||||
endif()
|
||||
if(NOT XCB_FIND_QUIETLY)
|
||||
message(${msgType} "XCB: requested unknown components ${unknownComponents}")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
macro(_XCB_HANDLE_COMPONENT _comp)
|
||||
set(_header )
|
||||
set(_lib )
|
||||
if("${_comp}" STREQUAL "XCB")
|
||||
set(_header "xcb/xcb.h")
|
||||
set(_lib "xcb")
|
||||
elseif("${_comp}" STREQUAL "COMPOSITE")
|
||||
set(_header "xcb/composite.h")
|
||||
set(_lib "xcb-composite")
|
||||
elseif("${_comp}" STREQUAL "DAMAGE")
|
||||
set(_header "xcb/damage.h")
|
||||
set(_lib "xcb-damage")
|
||||
elseif("${_comp}" STREQUAL "DRI2")
|
||||
set(_header "xcb/dri2.h")
|
||||
set(_lib "xcb-dri2")
|
||||
elseif("${_comp}" STREQUAL "EWMH")
|
||||
set(_header "xcb/xcb_ewmh.h")
|
||||
set(_lib "xcb-ewmh")
|
||||
elseif("${_comp}" STREQUAL "GLX")
|
||||
set(_header "xcb/glx.h")
|
||||
set(_lib "xcb-glx")
|
||||
elseif("${_comp}" STREQUAL "ICCCM")
|
||||
set(_header "xcb/xcb_icccm.h")
|
||||
set(_lib "xcb-icccm")
|
||||
elseif("${_comp}" STREQUAL "IMAGE")
|
||||
set(_header "xcb/xcb_image.h")
|
||||
set(_lib "xcb-image")
|
||||
elseif("${_comp}" STREQUAL "KEYSYMS")
|
||||
set(_header "xcb/xcb_keysyms.h")
|
||||
set(_lib "xcb-keysyms")
|
||||
elseif("${_comp}" STREQUAL "RANDR")
|
||||
set(_header "xcb/randr.h")
|
||||
set(_lib "xcb-randr")
|
||||
elseif("${_comp}" STREQUAL "RENDER")
|
||||
set(_header "xcb/render.h")
|
||||
set(_lib "xcb-render")
|
||||
elseif("${_comp}" STREQUAL "RENDERUTIL")
|
||||
set(_header "xcb/xcb_renderutil.h")
|
||||
set(_lib "xcb-render-util")
|
||||
elseif("${_comp}" STREQUAL "SHAPE")
|
||||
set(_header "xcb/shape.h")
|
||||
set(_lib "xcb-shape")
|
||||
elseif("${_comp}" STREQUAL "SHM")
|
||||
set(_header "xcb/shm.h")
|
||||
set(_lib "xcb-shm")
|
||||
elseif("${_comp}" STREQUAL "SYNC")
|
||||
set(_header "xcb/sync.h")
|
||||
set(_lib "xcb-sync")
|
||||
elseif("${_comp}" STREQUAL "UTIL")
|
||||
set(_header "xcb/xcb_util.h")
|
||||
set(_lib "xcb-util")
|
||||
elseif("${_comp}" STREQUAL "XFIXES")
|
||||
set(_header "xcb/xfixes.h")
|
||||
set(_lib "xcb-xfixes")
|
||||
elseif("${_comp}" STREQUAL "XTEST")
|
||||
set(_header "xcb/xtest.h")
|
||||
set(_lib "xcb-xtest")
|
||||
elseif("${_comp}" STREQUAL "XV")
|
||||
set(_header "xcb/xv.h")
|
||||
set(_lib "xcb-xv")
|
||||
endif()
|
||||
|
||||
find_path(XCB_${_comp}_INCLUDE_DIR NAMES ${_header} HINTS ${PKG_XCB_INCLUDE_DIRS})
|
||||
find_library(XCB_${_comp}_LIBRARY NAMES ${_lib} HINTS ${PKG_XCB_LIBRARY_DIRS})
|
||||
|
||||
if(XCB_${_comp}_INCLUDE_DIR AND XCB_${_comp}_LIBRARY)
|
||||
list(APPEND XCB_INCLUDE_DIRS ${XCB_${_comp}_INCLUDE_DIR})
|
||||
list(APPEND XCB_LIBRARIES ${XCB_${_comp}_LIBRARY})
|
||||
if (NOT XCB_FIND_QUIETLY)
|
||||
message(STATUS "XCB[${_comp}]: Found component ${_comp}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(XCB_FIND_REQUIRED_${_comp})
|
||||
list(APPEND requiredComponents XCB_${_comp}_FOUND)
|
||||
endif()
|
||||
|
||||
find_package_handle_standard_args(XCB_${_comp} DEFAULT_MSG XCB_${_comp}_LIBRARY XCB_${_comp}_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(XCB_${_comp}_LIBRARY XCB_${_comp}_INCLUDE_DIR)
|
||||
|
||||
# compatibility for old variable naming
|
||||
set(XCB_${_comp}_INCLUDE_DIRS ${XCB_${_comp}_INCLUDE_DIR})
|
||||
set(XCB_${_comp}_LIBRARIES ${XCB_${_comp}_LIBRARY})
|
||||
endmacro()
|
||||
|
||||
IF (NOT WIN32)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# Use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PKG_XCB QUIET ${pkgConfigModules})
|
||||
|
||||
set(XCB_DEFINITIONS ${PKG_XCB_CFLAGS})
|
||||
|
||||
foreach(comp ${comps})
|
||||
_xcb_handle_component(${comp})
|
||||
endforeach()
|
||||
|
||||
if(XCB_INCLUDE_DIRS)
|
||||
list(REMOVE_DUPLICATES XCB_INCLUDE_DIRS)
|
||||
endif()
|
||||
|
||||
find_package_handle_standard_args(XCB DEFAULT_MSG XCB_LIBRARIES XCB_INCLUDE_DIRS ${requiredComponents})
|
||||
|
||||
# compatibility for old variable naming
|
||||
set(XCB_INCLUDE_DIR ${XCB_INCLUDE_DIRS})
|
||||
|
||||
ENDIF (NOT WIN32)
|
@ -71,13 +71,13 @@ function(lxqt_translate_desktop _RESULT)
|
||||
set(_pattern "'\\[.*]\\s*='")
|
||||
if (_translations)
|
||||
add_custom_command(OUTPUT ${_outFile}
|
||||
COMMAND grep -v "'#TRANSLATIONS_DIR='" ${_inFile} > ${_outFile}
|
||||
COMMAND grep -h ${_pattern} ${_translations} >> ${_outFile}
|
||||
COMMAND grep -v -a "'#TRANSLATIONS_DIR='" ${_inFile} > ${_outFile}
|
||||
COMMAND grep -h -a ${_pattern} ${_translations} >> ${_outFile}
|
||||
COMMENT "Generating ${_fileName}${_fileExt}"
|
||||
)
|
||||
else()
|
||||
add_custom_command(OUTPUT ${_outFile}
|
||||
COMMAND grep -v "'#TRANSLATIONS_DIR='" ${_inFile} > ${_outFile}
|
||||
COMMAND grep -v -a "'#TRANSLATIONS_DIR='" ${_inFile} > ${_outFile}
|
||||
COMMENT "Generating ${_fileName}${_fileExt}"
|
||||
)
|
||||
endif()
|
||||
|
@ -27,18 +27,18 @@
|
||||
<p>
|
||||
ScreenGrab is a crossplatform application designed to quickly get screenshots.
|
||||
ScreenGrab is based on the Qt Framework, which allows the program to be used in
|
||||
Microsoft Windows and GNU/Linux environments.
|
||||
GNU/Linux and Microsoft Windows environments.
|
||||
</p>
|
||||
<p>
|
||||
Main features:
|
||||
</p>
|
||||
<ul>
|
||||
<li>Supports Windows & Linux</li>
|
||||
<li>Supports Linux & Windows</li>
|
||||
<li>Get desktop screenshots</li>
|
||||
<li>Get active window screenshots</li>
|
||||
<li>Get screenshots of selected desktop areas</li>
|
||||
<li>Copy screenshots into the clipboard</li>
|
||||
<li>Save your image files in PNG, JPEG or BMP format</li>
|
||||
<li>Save your image files in PNG or JPEG format</li>
|
||||
<li>Ability to view and edit screenshots in an external editor</li>
|
||||
<li>Ability to upload screenshots to MediaCrush and imgur</li>
|
||||
<li>Ability to set delay before getting screenshots
|
||||
@ -84,7 +84,7 @@ All management of the program can be carried out through the buttons in the main
|
||||
<li><b>Quit</b> [Ctrl+Q] -- Exit ScreenGrab</li>
|
||||
</ul>
|
||||
<p>
|
||||
These buttons can be accessed via right-click on the ScreenGrab icon in the systemtray menu as well.
|
||||
These buttons can be accessed via right-click on the ScreenGrab icon in the system tray menu as well.
|
||||
</p>
|
||||
<p>
|
||||
Additional controls, located in main window.
|
||||
@ -101,7 +101,7 @@ or active window]. </li>
|
||||
<li><b>Default directory</b> -- Default directory to save screenshots</li>
|
||||
<li><b>Default filename</b> -- Default name of the saved file</li>
|
||||
<li><b>Format</b> -- Default saving image format (you can select other formats)</li>
|
||||
<li><b>No window decoration</b> -- Grab a screenshot of the active window without window decorations (only for linux version).</li>
|
||||
<li><b>No window decoration</b> -- Grab a screenshot of the active window without window decorations (only for Linux version).</li>
|
||||
</ul>
|
||||
<p>
|
||||
<b><u>Advanced settings:</u></b>
|
||||
@ -178,12 +178,12 @@ when exiting ScreenGrab (and restore it at next run)</li>
|
||||
<li><b>Tray messages</b> -- Mode of displaying tray messages on grab|save events. Can be "none"
|
||||
or "if hidden" or "always"</li>
|
||||
<li><b>Time to display tray messages</b> -- Time within a specific notification is displayed </li>
|
||||
<li><b>Close in tray</b> -- Minimize the main window into the systemtray
|
||||
<li><b>Close in tray</b> -- Minimize the main window into the system tray
|
||||
by click on the close window button.</li>
|
||||
|
||||
</ul>
|
||||
<p>
|
||||
<u><b>Shortcut Settings:</u></b>
|
||||
<u><b>Shortcut Settings:</b></u>
|
||||
</p>
|
||||
<p>
|
||||
On the tab "Shortcuts" in the options window you can set the keyboard shortcuts, which allows you to access the application functions easily. There are two kinds of key combinations used in ScreenGrab - local and global.
|
||||
@ -195,7 +195,7 @@ by click on the close window button.</li>
|
||||
Global shortcuts can be used the get a new screenshot when you have opened other application windows.
|
||||
</p>
|
||||
<p>
|
||||
<u><b>Command line parameters:</u></b>
|
||||
<u><b>Command line parameters:</b></u>
|
||||
</p>
|
||||
<ul>
|
||||
<li><b>--fullscreen</b> -- Set the fullscreen mode [default].</li>
|
||||
@ -231,8 +231,8 @@ by click on the close window button.</li>
|
||||
<strong>Translators:</strong>
|
||||
</p>
|
||||
<ul>
|
||||
<li><strong>Marcio Moraes</strong> -- Brazilian Portuguese translation</strong> </li>
|
||||
<li><strong>Gennadi Motsyo</strong> -- Ukrainian translation</strong> </li>
|
||||
<li><strong>Marcio Moraes</strong> -- Brazilian Portuguese translation</li>
|
||||
<li><strong>Gennadi Motsyo</strong> -- Ukrainian translation</li>
|
||||
</ul>
|
||||
<p>
|
||||
<strong>Beta-testers:</strong>
|
||||
@ -415,9 +415,9 @@ And all those who use ScreenGrab :)
|
||||
<li>added saving options into INI-file</li>
|
||||
<li>added i18n support and Russian localisation</li>
|
||||
<li>some fixes and changes in code</li>
|
||||
<li>now available as installer (Windows) and deb packages (ubuntu 9.04)</li>
|
||||
<li>now available as installer (Windows) and deb packages (Ubuntu 9.04)</li>
|
||||
</ul>
|
||||
<p>x
|
||||
<p>
|
||||
<strong>Version 0.1:</strong>
|
||||
</p>
|
||||
<ul>
|
||||
|
@ -38,8 +38,7 @@ Microsoft Windows e GNU/Linux.
|
||||
<li>Obtém captura de tela da janela ativa</li>
|
||||
<li>Obtém captura de tela de uma região do desktop</li>
|
||||
<li>Copia a captura de tela para a área de transferência</li>
|
||||
<li>Salva seus arquivos de imagens no formato PNG
|
||||
ou JPEG ou BMP</li>
|
||||
<li>Salva seus arquivos de imagens no formato PNG ou JPEG</li>
|
||||
<li>Ability to view and edit screenshots in an external editor</li>
|
||||
<li>Ability to upload screenshots on several image hostings (mediacru.sh, imgur.com)</li>
|
||||
<li>Habilidade em definir atraso ao obter as capturas de telas
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.11)
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||
include_directories(${Qt5Widgets_INCLUDE_DIRS})
|
||||
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "src/core/config.h"
|
||||
@ -37,6 +35,8 @@
|
||||
#define KEY_SAVEFORMAT "defImgFormat"
|
||||
#define KEY_DELAY_DEF "defDelay"
|
||||
#define KEY_DELAY "delay"
|
||||
#define KEY_SCREENSHOT_TYPE_DEF "defScreenshotType"
|
||||
#define KEY_SCREENSHOT_TYPE "screenshotType"
|
||||
#define KEY_IMG_QUALITY "imageQuality"
|
||||
#define KEY_FILENAMEDATE "insDateTimeInFilename"
|
||||
#define KEY_DATETIME_TPL "templateDateTime"
|
||||
@ -53,9 +53,60 @@
|
||||
#define KEY_ZOOMBOX "zoomAroundMouse"
|
||||
#define KEY_TIME_NOTIFY "timeTrayMessages"
|
||||
#define KEY_ALLOW_COPIES "AllowCopies"
|
||||
#define KEY_TYPE_SCREEN "typeScreenDefault"
|
||||
#define KEY_ENABLE_EXT_VIEWER "enbaleExternalView"
|
||||
#define KEY_NODECOR "noDecorations"
|
||||
#define KEY_INCLUDE_CURSOR "includeCursor"
|
||||
#define KEY_FIT_INSIDE "fitInside"
|
||||
|
||||
|
||||
static const QLatin1String FullScreen("FullScreen");
|
||||
static const QLatin1String Window("Window");
|
||||
static const QLatin1String Area("Area");
|
||||
static const QLatin1String PreviousSelection("PreviousSelection");
|
||||
|
||||
static QString screenshotTypeToString(int v);
|
||||
static int screenshotTypeFromString(const QString& str);
|
||||
|
||||
static QString screenshotTypeToString(int v)
|
||||
{
|
||||
QString r;
|
||||
|
||||
switch(v) {
|
||||
case Core::FullScreen:
|
||||
r = FullScreen;
|
||||
break;
|
||||
case Core::Window:
|
||||
r = Window;
|
||||
break;
|
||||
case Core::Area:
|
||||
r = Area;
|
||||
break;
|
||||
case Core::PreviousSelection:
|
||||
r = PreviousSelection;
|
||||
break;
|
||||
default:
|
||||
r = FullScreen;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
static int screenshotTypeFromString(const QString& str)
|
||||
{
|
||||
int r;
|
||||
|
||||
if (str == FullScreen)
|
||||
r = Core::FullScreen;
|
||||
else if (str == Window)
|
||||
r = Core::Window;
|
||||
else if (str == Area)
|
||||
r = Core::Area;
|
||||
else if (str == PreviousSelection)
|
||||
r = Core::PreviousSelection;
|
||||
else
|
||||
r = Core::FullScreen; // Default
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
Config* Config::ptrInstance = 0;
|
||||
|
||||
@ -80,7 +131,6 @@ Config::Config()
|
||||
saveSettings();
|
||||
}
|
||||
|
||||
_imageFormats << "png" << "jpg" << "bmp";
|
||||
_settings->setIniCodec("UTF-8");
|
||||
_scrNum = 0;
|
||||
}
|
||||
@ -183,6 +233,16 @@ void Config::setEnableExtView(bool val)
|
||||
setValue(KEY_ENABLE_EXT_VIEWER, val);
|
||||
}
|
||||
|
||||
bool Config::getIncludeCursor()
|
||||
{
|
||||
return value(KEY_INCLUDE_CURSOR).toBool();
|
||||
}
|
||||
|
||||
void Config::setIncludeCursor(bool val)
|
||||
{
|
||||
setValue(KEY_INCLUDE_CURSOR, val);
|
||||
}
|
||||
|
||||
QString Config::getSaveDir()
|
||||
{
|
||||
return value(KEY_SAVEDIR).toString();
|
||||
@ -233,6 +293,26 @@ void Config::setDelay(quint8 sec)
|
||||
setValue(KEY_DELAY, sec);
|
||||
}
|
||||
|
||||
int Config::getDefScreenshotType()
|
||||
{
|
||||
return (value(QLatin1String(KEY_SCREENSHOT_TYPE_DEF)).toInt());
|
||||
}
|
||||
|
||||
void Config::setDefScreenshotType(const int type)
|
||||
{
|
||||
setValue(QLatin1String(KEY_SCREENSHOT_TYPE_DEF), type);
|
||||
}
|
||||
|
||||
int Config::getScreenshotType()
|
||||
{
|
||||
return (value(QLatin1String(KEY_SCREENSHOT_TYPE)).toInt());
|
||||
}
|
||||
|
||||
void Config::setScreenshotType(const int type)
|
||||
{
|
||||
setValue(QLatin1String(KEY_SCREENSHOT_TYPE), type);
|
||||
}
|
||||
|
||||
quint8 Config::getAutoCopyFilenameOnSaving()
|
||||
{
|
||||
return value(KEY_FILENAME_TO_CLB).toInt();
|
||||
@ -274,16 +354,6 @@ void Config::setCloseInTray(bool val)
|
||||
setValue(KEY_CLOSE_INTRAY, val);
|
||||
}
|
||||
|
||||
int Config::getTypeScreen()
|
||||
{
|
||||
return value(KEY_TYPE_SCREEN).toInt();
|
||||
}
|
||||
|
||||
void Config::setTypeScreen(quint8 type)
|
||||
{
|
||||
setValue(KEY_TYPE_SCREEN, type);
|
||||
}
|
||||
|
||||
quint8 Config::getTimeTrayMess()
|
||||
{
|
||||
return value(KEY_TIME_NOTIFY).toInt();
|
||||
@ -386,6 +456,16 @@ void Config::setNoDecoration(bool val)
|
||||
setValue(KEY_NODECOR, val);
|
||||
}
|
||||
|
||||
bool Config::getFitInside()
|
||||
{
|
||||
return value(KEY_FIT_INSIDE).toBool();
|
||||
}
|
||||
|
||||
void Config::setFitInside(bool val)
|
||||
{
|
||||
setValue(KEY_FIT_INSIDE, val);
|
||||
}
|
||||
|
||||
void Config::saveWndSize()
|
||||
{
|
||||
// saving size
|
||||
@ -403,6 +483,7 @@ void Config::loadSettings()
|
||||
setSaveFileName(_settings->value(KEY_SAVENAME,DEF_SAVE_NAME).toString());
|
||||
setSaveFormat(_settings->value(KEY_SAVEFORMAT, DEF_SAVE_FORMAT).toString());
|
||||
setDefDelay(_settings->value(KEY_DELAY, DEF_DELAY).toInt());
|
||||
setDefScreenshotType(screenshotTypeFromString(_settings->value(QLatin1String(KEY_SCREENSHOT_TYPE_DEF)).toString()));
|
||||
setAutoCopyFilenameOnSaving(_settings->value(KEY_FILENAME_TO_CLB, DEF_FILENAME_TO_CLB).toInt());
|
||||
setDateTimeInFilename(_settings->value(KEY_FILENAMEDATE, DEF_DATETIME_FILENAME).toBool());
|
||||
setDateTimeTpl(_settings->value(KEY_DATETIME_TPL, DEF_DATETIME_TPL).toString());
|
||||
@ -410,6 +491,7 @@ void Config::loadSettings()
|
||||
setAutoSaveFirst(_settings->value(KEY_AUTOSAVE_FIRST, DEF_AUTO_SAVE_FIRST).toBool());
|
||||
setNoDecoration(_settings->value(KEY_NODECOR, DEF_X11_NODECOR).toBool());
|
||||
setImageQuality(_settings->value(KEY_IMG_QUALITY, DEF_IMG_QUALITY).toInt());
|
||||
setIncludeCursor(_settings->value(KEY_INCLUDE_CURSOR, DEF_INCLUDE_CURSOR).toBool());
|
||||
_settings->endGroup();
|
||||
|
||||
_settings->beginGroup("Display");
|
||||
@ -426,6 +508,7 @@ void Config::loadSettings()
|
||||
setCloseInTray(_settings->value(KEY_CLOSE_INTRAY, DEF_CLOSE_IN_TRAY).toBool());
|
||||
setAllowMultipleInstance(_settings->value(KEY_ALLOW_COPIES, DEF_ALLOW_COPIES).toBool());
|
||||
setEnableExtView(_settings->value(KEY_ENABLE_EXT_VIEWER, DEF_ENABLE_EXT_VIEWER).toBool());
|
||||
setFitInside(_settings->value(KEY_FIT_INSIDE, DEF_FIT_INSIDE).toBool());
|
||||
_settings->endGroup();
|
||||
|
||||
setDelay(getDefDelay());
|
||||
@ -440,6 +523,7 @@ void Config::saveSettings()
|
||||
_settings->setValue(KEY_SAVENAME, getSaveFileName());
|
||||
_settings->setValue(KEY_SAVEFORMAT, getSaveFormat());
|
||||
_settings->setValue(KEY_DELAY, getDefDelay());
|
||||
_settings->setValue(QLatin1String(KEY_SCREENSHOT_TYPE_DEF), screenshotTypeToString(getDefScreenshotType()));
|
||||
_settings->setValue(KEY_FILENAME_TO_CLB, getAutoCopyFilenameOnSaving());
|
||||
_settings->setValue(KEY_FILENAMEDATE, getDateTimeInFilename());
|
||||
_settings->setValue(KEY_DATETIME_TPL, getDateTimeTpl());
|
||||
@ -447,6 +531,7 @@ void Config::saveSettings()
|
||||
_settings->setValue(KEY_AUTOSAVE_FIRST, getAutoSaveFirst());
|
||||
_settings->setValue(KEY_IMG_QUALITY, getImageQuality());
|
||||
_settings->setValue(KEY_NODECOR, getNoDecoration());
|
||||
_settings->setValue(KEY_INCLUDE_CURSOR, getIncludeCursor());
|
||||
_settings->endGroup();
|
||||
|
||||
_settings->beginGroup("Display");
|
||||
@ -461,6 +546,7 @@ void Config::saveSettings()
|
||||
_settings->setValue(KEY_CLOSE_INTRAY, getCloseInTray());
|
||||
_settings->setValue(KEY_ALLOW_COPIES, getAllowMultipleInstance());
|
||||
_settings->setValue(KEY_ENABLE_EXT_VIEWER, getEnableExtView());
|
||||
_settings->setValue(KEY_FIT_INSIDE, getFitInside());
|
||||
_settings->endGroup();
|
||||
|
||||
_shortcuts->saveSettings();
|
||||
@ -475,6 +561,7 @@ void Config::setDefaultSettings()
|
||||
setSaveFileName(DEF_SAVE_NAME);
|
||||
setSaveFormat(DEF_SAVE_FORMAT);
|
||||
setDefDelay(DEF_DELAY);
|
||||
setScreenshotType(Core::FullScreen);
|
||||
setImageQuality(DEF_IMG_QUALITY);
|
||||
setDateTimeInFilename(DEF_DATETIME_FILENAME);
|
||||
setDateTimeTpl(DEF_DATETIME_TPL);
|
||||
@ -482,6 +569,7 @@ void Config::setDefaultSettings()
|
||||
setAutoSave(DEF_AUTO_SAVE);
|
||||
setAutoSaveFirst(DEF_AUTO_SAVE_FIRST);
|
||||
setTrayMessages(DEF_TRAY_MESS_TYPE);
|
||||
setIncludeCursor(DEF_INCLUDE_CURSOR);
|
||||
setZoomAroundMouse(DEF_ZOOM_AROUND_MOUSE);
|
||||
setCloseInTray(DEF_CLOSE_IN_TRAY);
|
||||
setTimeTrayMess(DEF_TIME_TRAY_MESS);
|
||||
@ -490,6 +578,7 @@ void Config::setDefaultSettings()
|
||||
// setRestoredWndSize(DEF_WND_WIDTH, DEF_WND_HEIGHT);
|
||||
setShowTrayIcon(DEF_SHOW_TRAY);
|
||||
setEnableExtView(DEF_ENABLE_EXT_VIEWER);
|
||||
setFitInside(DEF_FIT_INSIDE);
|
||||
|
||||
_shortcuts->setDefaultSettings();
|
||||
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
@ -50,7 +48,9 @@ const bool DEF_AUTO_SAVE = false;
|
||||
const bool DEF_AUTO_SAVE_FIRST = false;
|
||||
const QString DEF_DATETIME_TPL = "yyyy-MM-dd-hh-mm-ss";
|
||||
const bool DEF_SHOW_TRAY = true;
|
||||
const bool DEF_ENABLE_EXT_VIEWER = 1;
|
||||
const bool DEF_ENABLE_EXT_VIEWER = true;
|
||||
const bool DEF_INCLUDE_CURSOR = false;
|
||||
const bool DEF_FIT_INSIDE = true;
|
||||
|
||||
// class worker with conf data
|
||||
class Config
|
||||
@ -145,6 +145,14 @@ public:
|
||||
quint8 getDelay();
|
||||
void setDelay(quint8 sec);
|
||||
|
||||
// configured default screenshot type
|
||||
int getDefScreenshotType();
|
||||
void setDefScreenshotType(const int type);
|
||||
|
||||
// current screenshot type
|
||||
int getScreenshotType();
|
||||
void setScreenshotType(const int type);
|
||||
|
||||
quint8 getAutoCopyFilenameOnSaving();
|
||||
void setAutoCopyFilenameOnSaving(quint8 val);
|
||||
|
||||
@ -160,10 +168,6 @@ public:
|
||||
bool getCloseInTray();
|
||||
void setCloseInTray(bool val);
|
||||
|
||||
// type of screen
|
||||
int getTypeScreen();
|
||||
void setTypeScreen(quint8 type);
|
||||
|
||||
// tume of tray messages
|
||||
quint8 getTimeTrayMess();
|
||||
void setTimeTrayMess(int src);
|
||||
@ -219,6 +223,12 @@ public:
|
||||
bool getEnableExtView();
|
||||
void setEnableExtView(bool val);
|
||||
|
||||
bool getIncludeCursor();
|
||||
void setIncludeCursor(bool val);
|
||||
|
||||
bool getFitInside();
|
||||
void setFitInside(bool val);
|
||||
|
||||
static QString getSysLang();
|
||||
|
||||
ShortcutManager* shortcuts();
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <QMutex>
|
||||
@ -31,8 +29,18 @@
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
#include "core/core.h"
|
||||
#include <KF5/KWindowSystem/KWindowSystem>
|
||||
#include <xcb/xfixes.h>
|
||||
|
||||
#ifdef X11_XCB_FOUND
|
||||
#include "x11utils.h"
|
||||
#endif
|
||||
|
||||
#include "core/core.h"
|
||||
|
||||
#ifdef SG_DBUS_NOTIFY
|
||||
#include "dbusnotifier.h"
|
||||
#endif
|
||||
|
||||
#ifdef SG_EXT_UPLOADS
|
||||
#include "modules/uploader/moduleuploader.h"
|
||||
@ -175,33 +183,34 @@ void Core::screenShot(bool first)
|
||||
if (_firstScreen)
|
||||
_conf->updateLastSaveDate();
|
||||
|
||||
switch(_conf->getTypeScreen())
|
||||
switch(_conf->getScreenshotType())
|
||||
{
|
||||
case 0:
|
||||
case Core::FullScreen:
|
||||
{
|
||||
const QList<QScreen *> screens = qApp->screens();
|
||||
const QDesktopWidget *desktop = QApplication::desktop();
|
||||
const int screenNum = desktop->screenNumber(QCursor::pos());
|
||||
*_pixelMap = screens[screenNum]->grabWindow(desktop->winId());
|
||||
grabCursor(0, 0);
|
||||
|
||||
checkAutoSave(first);
|
||||
_wnd->updatePixmap(_pixelMap);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
case Core::Window:
|
||||
{
|
||||
getActiveWindow();
|
||||
checkAutoSave(first);
|
||||
_wnd->updatePixmap(_pixelMap);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
case Core::Area:
|
||||
{
|
||||
_selector = new RegionSelect(_conf);
|
||||
connect(_selector, &RegionSelect::processDone, this, &Core::regionGrabbed);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
case Core::PreviousSelection:
|
||||
{
|
||||
_selector = new RegionSelect(_conf, _lastSelectedArea);
|
||||
connect(_selector, &RegionSelect::processDone, this, &Core::regionGrabbed);
|
||||
@ -212,6 +221,8 @@ void Core::screenShot(bool first)
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
_wnd->updatePixmap(_pixelMap);
|
||||
_wnd->restoreFromShot();
|
||||
}
|
||||
@ -229,14 +240,6 @@ void Core::checkAutoSave(bool first)
|
||||
else
|
||||
autoSave();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!first)
|
||||
{
|
||||
StateNotifyMessage message(tr("New screen"), tr("New screen is getted!"));
|
||||
_wnd->showTrayMessage(message.header, message.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Core::getActiveWindow()
|
||||
@ -271,6 +274,25 @@ void Core::getActiveWindow()
|
||||
geometry.y(),
|
||||
geometry.width(),
|
||||
geometry.height());
|
||||
grabCursor(geometry.x(), geometry.y());
|
||||
}
|
||||
|
||||
void Core::grabCursor(int offsetX, int offsetY)
|
||||
{
|
||||
#ifdef XCB_XFOXES_FOUND
|
||||
if (_conf->getIncludeCursor())
|
||||
X11Utils::compositePointer(offsetX, offsetY, _pixelMap);
|
||||
#else
|
||||
Q_UNUSED(offsetx);
|
||||
Q_UNUSED(offsety);
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
|
||||
void Core::sendSystemNotify(const StateNotifyMessage ¬ify)
|
||||
{
|
||||
qDebug() << "Send system notification";
|
||||
}
|
||||
|
||||
QString Core::getSaveFilePath(QString format)
|
||||
@ -279,14 +301,16 @@ QString Core::getSaveFilePath(QString format)
|
||||
|
||||
do
|
||||
{
|
||||
QDir dir(_conf->getSaveDir());
|
||||
const QString filePath = dir.filePath(_conf->getSaveFileName());
|
||||
if (_conf->getDateTimeInFilename())
|
||||
initPath = _conf->getSaveDir() + _conf->getSaveFileName() + "-" + getDateTimeFileName() + "." + format;
|
||||
initPath = filePath + "-" + getDateTimeFileName() + "." + format;
|
||||
else
|
||||
{
|
||||
if (_conf->getScrNum() != 0)
|
||||
initPath = _conf->getSaveDir() + _conf->getSaveFileName() + _conf->getScrNumStr() + "." + format;
|
||||
initPath = filePath + _conf->getScrNumStr() + "." + format;
|
||||
else
|
||||
initPath = _conf->getSaveDir() + _conf->getSaveFileName() + "." + format;
|
||||
initPath = filePath + "." + format;
|
||||
}
|
||||
} while (checkExsistFile(initPath));
|
||||
|
||||
@ -377,7 +401,7 @@ bool Core::writeScreen(QString& fileName, QString& format, bool tmpScreen)
|
||||
|
||||
message.message = message.message + copyFileNameToCliipboard(fileName);
|
||||
_conf->updateLastSaveDate();
|
||||
_wnd->showTrayMessage(message.header, message.message);
|
||||
sendNotify(message);
|
||||
}
|
||||
else
|
||||
qWarning() << "Error saving file " << fileName;
|
||||
@ -410,11 +434,21 @@ QString Core::copyFileNameToCliipboard(QString file)
|
||||
return retString;
|
||||
}
|
||||
|
||||
void Core::sendNotify(const StateNotifyMessage &message)
|
||||
{
|
||||
#ifdef SG_DBUS_NOTIFY
|
||||
DBusNotifier *notifier = new DBusNotifier();
|
||||
notifier->displayNotify(message);
|
||||
#else
|
||||
_wnd->showTrayMessage(message.header, message.message);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Core::copyScreen()
|
||||
{
|
||||
QApplication::clipboard()->setPixmap(*_pixelMap, QClipboard::Clipboard);
|
||||
StateNotifyMessage message(tr("Copied"), tr("Screenshot is copied to clipboard"));
|
||||
_wnd->showTrayMessage(message.header, message.message);
|
||||
sendNotify(message);
|
||||
}
|
||||
|
||||
void Core::openInExtViewer()
|
||||
@ -477,7 +511,7 @@ void Core::processCmdLineOpts(const QStringList& arguments)
|
||||
// Check commandline parameters and set screenshot type
|
||||
for (int i=0; i < _screenTypeOpts.count(); ++i)
|
||||
if (_cmdLine.isSet(_screenTypeOpts.at(i)))
|
||||
_conf->setTypeScreen(i);
|
||||
_conf->setScreenshotType(i);
|
||||
|
||||
#ifdef SG_EXT_UPLOADS
|
||||
/// FIXMA - In module interface need add the mthod for geting module cmdLine options
|
||||
@ -519,7 +553,7 @@ QPixmap* Core::getPixmap()
|
||||
return _pixelMap;
|
||||
}
|
||||
|
||||
QByteArray Core::getScreen()
|
||||
QByteArray Core::getScreenData()
|
||||
{
|
||||
QByteArray bytes;
|
||||
QBuffer buffer(&bytes);
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
#ifndef SCREENGRAB_H
|
||||
#define SCREENGRAB_H
|
||||
@ -26,7 +24,6 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "regionselect.h"
|
||||
|
||||
#include "modulemanager.h"
|
||||
|
||||
#include "ui/mainwindow.h"
|
||||
@ -74,6 +71,13 @@ public Q_SLOTS:
|
||||
void autoSave();
|
||||
|
||||
public:
|
||||
enum ScreenshotType {
|
||||
FullScreen = 0,
|
||||
Window,
|
||||
Area,
|
||||
PreviousSelection
|
||||
};
|
||||
|
||||
static Core* instance();
|
||||
~Core();
|
||||
|
||||
@ -84,7 +88,7 @@ public:
|
||||
static QString getVersionPrintable();
|
||||
|
||||
QPixmap* getPixmap();
|
||||
QByteArray getScreen();
|
||||
QByteArray getScreenData();
|
||||
|
||||
void updatePixmap();
|
||||
QString getTempFilename(const QString& format);
|
||||
@ -115,9 +119,12 @@ private:
|
||||
void checkAutoSave(bool first = false);
|
||||
|
||||
void getActiveWindow();
|
||||
|
||||
void grabCursor(int offsetX, int offsetY);
|
||||
void sendSystemNotify(const StateNotifyMessage& notify);
|
||||
bool checkExsistFile(QString path);
|
||||
QString copyFileNameToCliipboard(QString file);
|
||||
void sendNotify(const StateNotifyMessage& message);
|
||||
|
||||
QPixmap *_pixelMap; // pixel map
|
||||
RegionSelect *_selector; // region grabber widget
|
||||
QRect _lastSelectedArea;
|
||||
|
106
src/core/dbusnotifier.cpp
Normal file
106
src/core/dbusnotifier.cpp
Normal file
@ -0,0 +1,106 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <QDBusConnection>
|
||||
#include <QDBusConnectionInterface>
|
||||
#include <QDBusInterface>
|
||||
#include <QDir>
|
||||
#include <QTimer>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
#include "dbusnotifier.h"
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#define SERVICE_FREEDESKTOP "org.freedesktop.Notifications"
|
||||
#define PATH_FREEDESKTOP "/org/freedesktop/Notifications" ,"org.freedesktop.Notifications"
|
||||
|
||||
#define CACHE_DIR "notify-cache"
|
||||
#define CACHE_PREV "preview.jpg"
|
||||
|
||||
DBusNotifier::DBusNotifier(QObject *parent) : QObject(parent)
|
||||
{
|
||||
_notifier = new QDBusInterface(SERVICE_FREEDESKTOP, PATH_FREEDESKTOP,
|
||||
QDBusConnection::sessionBus(), this);
|
||||
if (_notifier->lastError().type() != QDBusError::NoError) {
|
||||
qWarning() << "Notify: Unable to create interface.";
|
||||
return;
|
||||
}
|
||||
|
||||
qWarning() << "Notify: DBus interfece created successfully.";
|
||||
|
||||
QDir dir(Config::getConfigDir());
|
||||
if (!dir.exists(CACHE_DIR))
|
||||
dir.mkdir(CACHE_DIR);
|
||||
|
||||
_previewPath = dir.absolutePath() + QDir::toNativeSeparators(QDir::separator()) + CACHE_PREV;
|
||||
_appIconPath = QString(SG_ICONPATH);
|
||||
|
||||
_notifyDuration = Config::instance()->getTimeTrayMess() * 1000;
|
||||
|
||||
}
|
||||
|
||||
DBusNotifier::~DBusNotifier()
|
||||
{
|
||||
if (!_previewPath.isEmpty()) {
|
||||
QDir dir(QDir::home());
|
||||
dir.remove(_previewPath);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DBusNotifier::displayNotify(const StateNotifyMessage &message)
|
||||
{
|
||||
QList<QVariant> n = prepareNotification(message);
|
||||
|
||||
if (!n.isEmpty()) {
|
||||
QDBusReply<uint> reply = _notifier->callWithArgumentList(QDBus::Block,"Notify",n);
|
||||
}
|
||||
|
||||
deleteLater();
|
||||
}
|
||||
|
||||
QList<QVariant> DBusNotifier::prepareNotification(const StateNotifyMessage& message)
|
||||
{
|
||||
QList<QVariant> args;
|
||||
|
||||
args << "Screen Grab";
|
||||
args << QVariant(QVariant::UInt); // id
|
||||
|
||||
// app-icon(path to icon on disk)
|
||||
args << _appIconPath;
|
||||
|
||||
// summary (notification title)
|
||||
args << message.header;
|
||||
|
||||
// message text
|
||||
args << message.message;
|
||||
|
||||
// actions is none
|
||||
args << QStringList();
|
||||
|
||||
// hints
|
||||
args << QVariantMap();
|
||||
|
||||
// timeout
|
||||
args << _notifyDuration;
|
||||
|
||||
return args;
|
||||
}
|
||||
|
@ -13,41 +13,34 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef UPLOADER_MEDIACRUSH_H
|
||||
#define UPLOADER_MEDIACRUSH_H
|
||||
#ifndef DBUSNOTIFIER_H
|
||||
#define DBUSNOTIFIER_H
|
||||
|
||||
#include <uploader.h>
|
||||
#include <QObject>
|
||||
|
||||
#include <QUrl>
|
||||
#include "core.h"
|
||||
|
||||
class Uploader_MediaCrush : public Uploader
|
||||
class QDBusInterface;
|
||||
|
||||
class DBusNotifier : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit Uploader_MediaCrush(const QString& format, QObject* parent = 0);
|
||||
virtual ~Uploader_MediaCrush();
|
||||
explicit DBusNotifier(QObject *parent = 0);
|
||||
~DBusNotifier();
|
||||
|
||||
virtual void startUploading();
|
||||
|
||||
protected:
|
||||
virtual QUrl apiUrl();
|
||||
virtual void createData(bool inBase64 = false);
|
||||
|
||||
protected Q_SLOTS:
|
||||
virtual void replyFinished(QNetworkReply* reply);
|
||||
void displayNotify(const StateNotifyMessage& message);
|
||||
|
||||
private:
|
||||
void setCurrentFormat(const QString& format);
|
||||
QList<QVariant> prepareNotification(const StateNotifyMessage& message);
|
||||
|
||||
QByteArray _host;
|
||||
QByteArray _currentFormat;
|
||||
void UpdateUploadedStrList();
|
||||
QDBusInterface *_notifier;
|
||||
int _notifyDuration;
|
||||
QString _appIconPath;
|
||||
QString _previewPath;
|
||||
};
|
||||
|
||||
#endif // UPLOADER_MEDIACRUSH_H
|
||||
|
||||
#endif // DBUSNOTIFIER_H
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "singleapp.h"
|
||||
@ -36,7 +34,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (!ScreenGrab->config()->getAllowMultipleInstance() && scr.isRunning())
|
||||
{
|
||||
QString type = QString::number(ScreenGrab->config()->getTypeScreen());
|
||||
QString type = QString::number(ScreenGrab->config()->getDefScreenshotType());
|
||||
scr.sendMessage("screengrab --type=" + type);
|
||||
return 0;
|
||||
}
|
||||
|
@ -13,16 +13,14 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "modulemanager.h"
|
||||
|
||||
#ifdef SG_EXT_UPLOADS
|
||||
#include "src/modules/uploader/moduleuploader.h"
|
||||
#endif
|
||||
// #ifdef SG_EXT_UPLOADS
|
||||
// #include "src/modules/uploader/moduleuploader.h"
|
||||
// #endif
|
||||
|
||||
#ifdef SG_EXT_EDIT
|
||||
#include "src/modules/extedit/moduleextedit.h"
|
||||
@ -37,10 +35,10 @@ ModuleManager::ModuleManager()
|
||||
|
||||
void ModuleManager::initModules()
|
||||
{
|
||||
#ifdef SG_EXT_UPLOADS
|
||||
ModuleUploader *uploader = new ModuleUploader();
|
||||
_modules->insert(MOD_UPLOADER , uploader);
|
||||
#endif
|
||||
//#ifdef SG_EXT_UPLOADS
|
||||
// ModuleUploader *uploader = new ModuleUploader();
|
||||
// _modules->insert(MOD_UPLOADER , uploader);
|
||||
//#endif
|
||||
#ifdef SG_EXT_EDIT
|
||||
ModuleExtEdit *extedit = new ModuleExtEdit();
|
||||
_modules->insert(MOD_EXT_EDIT.data(), extedit);
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef MODULEMANAGER_H
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "src/core/regionselect.h"
|
||||
@ -34,6 +32,7 @@ RegionSelect::RegionSelect(Config *mainconf, QWidget *parent)
|
||||
drawBackGround();
|
||||
|
||||
_processSelection = false;
|
||||
_fittedSelection = false;
|
||||
|
||||
show();
|
||||
|
||||
@ -52,6 +51,7 @@ RegionSelect::RegionSelect(Config* mainconf, const QRect& lastRect, QWidget* par
|
||||
drawBackGround();
|
||||
|
||||
_processSelection = false;
|
||||
_fittedSelection = false;
|
||||
|
||||
show();
|
||||
|
||||
@ -97,7 +97,7 @@ void RegionSelect::paintEvent(QPaintEvent *event)
|
||||
|
||||
void RegionSelect::mousePressEvent(QMouseEvent* event)
|
||||
{
|
||||
if (event->button() != Qt::LeftButton)
|
||||
if (event->button() != Qt::LeftButton && event->button() != Qt::RightButton)
|
||||
return;
|
||||
|
||||
_selStartPoint = event->pos();
|
||||
@ -108,6 +108,8 @@ void RegionSelect::mouseReleaseEvent(QMouseEvent* event)
|
||||
{
|
||||
_selEndPoint = event->pos();
|
||||
_processSelection = false;
|
||||
if (event->button() == Qt::RightButton && !_fittedSelection)
|
||||
selectFit();
|
||||
}
|
||||
|
||||
void RegionSelect::mouseDoubleClickEvent(QMouseEvent* event)
|
||||
@ -124,6 +126,7 @@ void RegionSelect::mouseMoveEvent(QMouseEvent *event)
|
||||
{
|
||||
_selEndPoint = event->pos();
|
||||
_selectRect = QRect(_selStartPoint, _selEndPoint).normalized();
|
||||
_fittedSelection = false;
|
||||
update();
|
||||
}
|
||||
}
|
||||
@ -134,6 +137,8 @@ void RegionSelect::keyPressEvent(QKeyEvent* event)
|
||||
if (event->key() == Qt::Key_Escape)
|
||||
Q_EMIT processDone(false);
|
||||
// canceled select screen area
|
||||
else if (event->key() == Qt::Key_Space)
|
||||
selectFit();
|
||||
else if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return)
|
||||
Q_EMIT processDone(true);
|
||||
else
|
||||
@ -218,6 +223,153 @@ void RegionSelect::drawRectSelection(QPainter &painter)
|
||||
}
|
||||
}
|
||||
|
||||
void RegionSelect::selectFit()
|
||||
{
|
||||
if (_fittedSelection)
|
||||
_currentFit = (_currentFit + 1) % _fitRectangles.size();
|
||||
else
|
||||
{
|
||||
findFit();
|
||||
_currentFit = 1;
|
||||
_fittedSelection = true;
|
||||
}
|
||||
_selectRect = _fitRectangles[_currentFit];
|
||||
update();
|
||||
}
|
||||
|
||||
void RegionSelect::findFit()
|
||||
{
|
||||
QRect boundingRect;
|
||||
int left = _selectRect.left();
|
||||
int top = _selectRect.top();
|
||||
int right = _selectRect.right();
|
||||
int bottom = _selectRect.bottom();
|
||||
|
||||
_fitRectangles.clear();
|
||||
_fitRectangles.push_back(_selectRect);
|
||||
|
||||
// Set the rectangle in which to search for borders
|
||||
if (_conf->getFitInside())
|
||||
boundingRect = _selectRect;
|
||||
else
|
||||
{
|
||||
boundingRect.setLeft(qMax(left - fitRectExpand, 0));
|
||||
boundingRect.setTop(qMax(top - fitRectExpand, 0));
|
||||
boundingRect.setRight(qMin(right + fitRectExpand, _sizeDesktop.width() - 1));
|
||||
boundingRect.setBottom(qMin(bottom + fitRectExpand, _sizeDesktop.height() - 1));
|
||||
}
|
||||
|
||||
// Find borders inside boundingRect
|
||||
fitBorder(boundingRect, LEFT, left);
|
||||
fitBorder(boundingRect, TOP, top);
|
||||
fitBorder(boundingRect, RIGHT, right);
|
||||
fitBorder(boundingRect, BOTTOM, bottom);
|
||||
|
||||
const QRect fitRectangle = QRect(QPoint(left, top), QPoint(right, bottom));
|
||||
_fitRectangles.push_back(fitRectangle);
|
||||
}
|
||||
|
||||
void RegionSelect::fitBorder(const QRect &boundRect, enum Side side, int &border)
|
||||
{
|
||||
const QImage boundImage = _desktopPixmapClr.copy(boundRect).toImage();
|
||||
|
||||
// Set the relative coordinates of a box vertex and a vector along the box side
|
||||
QPoint startPoint;
|
||||
QPoint directionVector;
|
||||
switch(side){
|
||||
case TOP:
|
||||
startPoint = QPoint(0,0);
|
||||
directionVector = QPoint(1,0);
|
||||
break;
|
||||
case RIGHT:
|
||||
startPoint = boundRect.topRight() - boundRect.topLeft();
|
||||
directionVector = QPoint(0,1);
|
||||
break;
|
||||
case BOTTOM:
|
||||
startPoint = boundRect.bottomRight() - boundRect.topLeft();
|
||||
directionVector = QPoint(-1,0);
|
||||
break;
|
||||
case LEFT:
|
||||
startPoint = boundRect.bottomLeft() - boundRect.topLeft();
|
||||
directionVector = QPoint(0,-1);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
// Set vector normal to the box side
|
||||
QPoint normalVector = QPoint(-directionVector.y(), directionVector.x());
|
||||
|
||||
// Setbox dimensions relative to the box side
|
||||
int directionLength;
|
||||
int normalDepth;
|
||||
if (directionVector.x() == 0)
|
||||
{
|
||||
directionLength = boundRect.height() - 1;
|
||||
normalDepth = boundRect.width() - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
directionLength = boundRect.width() - 1;
|
||||
normalDepth = boundRect.height() - 1;
|
||||
}
|
||||
|
||||
// Set how deep in the boundingRect to search for the border
|
||||
if (_conf->getFitInside())
|
||||
normalDepth = qMin(normalDepth/2 - 1, fitRectDepth);
|
||||
else
|
||||
normalDepth = qMin(normalDepth/2 - 1, fitRectDepth + fitRectExpand);
|
||||
|
||||
QVector<int> gradient = QVector<int>(normalDepth, 0);
|
||||
QVector<int> preR = QVector<int>(normalDepth + 1, 0);
|
||||
QVector<int> preG = QVector<int>(normalDepth + 1, 0);
|
||||
QVector<int> preB = QVector<int>(normalDepth + 1, 0);
|
||||
|
||||
// Compute pixel Sobel normal gradients and add their absolute values parallel to the box side
|
||||
for (int i = 1; i < directionLength; i++)
|
||||
{
|
||||
for (int j = 0; j <= normalDepth; j++)
|
||||
{
|
||||
QPoint point = startPoint + i*directionVector + j*normalVector;
|
||||
QRgb pixelL = boundImage.pixel(point - directionVector);
|
||||
QRgb pixelC = boundImage.pixel(point);
|
||||
QRgb pixelR = boundImage.pixel(point + directionVector);
|
||||
preR[j] = qRed(pixelL) + 2*qRed(pixelC) + qRed(pixelR);
|
||||
preG[j] = qGreen(pixelL) + 2*qGreen(pixelC) + qGreen(pixelR);
|
||||
preB[j] = qBlue(pixelL) + 2*qBlue(pixelC) + qBlue(pixelR);
|
||||
}
|
||||
for (int j = 1; j < normalDepth; j++)
|
||||
gradient[j] += qAbs(preR[j-1] - preR[j+1]) + qAbs(preG[j-1] - preG[j+1]) + qAbs(preB[j-1] - preB[j+1]);
|
||||
}
|
||||
|
||||
int maxGradient = 0;
|
||||
int positionMax = 0;
|
||||
for (int j = 1; j < normalDepth; j++)
|
||||
{
|
||||
// Scale pixel normal gradients and break if drop detected
|
||||
gradient[j] = 1 + gradient[j]/(60*directionLength);
|
||||
if (_conf->getFitInside() && gradient[j] <= maxGradient/2)
|
||||
break;
|
||||
|
||||
// Keep searching for the maximum normal gradient
|
||||
if (gradient[j] > maxGradient)
|
||||
{
|
||||
maxGradient = gradient[j];
|
||||
positionMax = j;
|
||||
}
|
||||
}
|
||||
// If all normal gradients small, keep the original user selected border
|
||||
if (maxGradient <= 1)
|
||||
return;
|
||||
|
||||
// Transform computed border back to original coordinates
|
||||
startPoint = boundRect.topLeft() + startPoint + (positionMax + 1)*normalVector;
|
||||
if (normalVector.x() == 0)
|
||||
border = startPoint.y();
|
||||
else
|
||||
border = startPoint.x();
|
||||
}
|
||||
|
||||
QPixmap RegionSelect::getSelection()
|
||||
{
|
||||
QPixmap sel;
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef REGIONSELECT_H
|
||||
@ -32,6 +30,13 @@
|
||||
#include <QSize>
|
||||
#include <QPoint>
|
||||
|
||||
enum Side{
|
||||
TOP,
|
||||
RIGHT,
|
||||
BOTTOM,
|
||||
LEFT
|
||||
};
|
||||
|
||||
// class RegionSelect : public QDialog
|
||||
class RegionSelect : public QWidget
|
||||
{
|
||||
@ -61,7 +66,11 @@ private:
|
||||
QPoint _selStartPoint;
|
||||
QPoint _selEndPoint;
|
||||
|
||||
int _currentFit;
|
||||
QVector<QRect> _fitRectangles;
|
||||
|
||||
bool _processSelection;
|
||||
bool _fittedSelection;
|
||||
|
||||
QPixmap _desktopPixmapBkg;
|
||||
QPixmap _desktopPixmapClr;
|
||||
@ -69,9 +78,15 @@ private:
|
||||
void sharedInit();
|
||||
void drawBackGround();
|
||||
void drawRectSelection(QPainter &painter);
|
||||
void selectFit();
|
||||
void findFit();
|
||||
void fitBorder(const QRect &boundRect, enum Side side, int &border);
|
||||
|
||||
Config *_conf;
|
||||
|
||||
const int fitRectExpand = 20;
|
||||
const int fitRectDepth = 50;
|
||||
|
||||
};
|
||||
|
||||
#endif // REGIONSELECT_H
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "shortcutmanager.h"
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef SHORTCUTMANAGER_H
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <QTimer>
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef SINGLEAPP_H
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "about.h"
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef ABOUT_H
|
||||
|
@ -13,10 +13,8 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <QKeyEvent>
|
||||
|
||||
@ -152,10 +150,10 @@ void ConfigDialog::loadSettings()
|
||||
|
||||
_ui->cbxFormat->addItem("png");
|
||||
_ui->cbxFormat->addItem("jpg");
|
||||
_ui->cbxFormat->addItem("bmp");
|
||||
_ui->cbxFormat->setCurrentIndex(conf->getDefaultFormatID());
|
||||
|
||||
_ui->defDelay->setValue(conf->getDefDelay());
|
||||
_ui->cbxTypeScr->setCurrentIndex(conf->getDefScreenshotType());
|
||||
_ui->checkIncDate->setChecked(conf->getDateTimeInFilename());
|
||||
_ui->editDateTmeTpl->setText(conf->getDateTimeTpl());
|
||||
_ui->cbxCopyFileName->setCurrentIndex(conf->getAutoCopyFilenameOnSaving());
|
||||
@ -167,8 +165,8 @@ void ConfigDialog::loadSettings()
|
||||
_ui->checkAutoSave->setChecked(conf->getAutoSave());;
|
||||
_ui->checkAutoSaveFirst->setChecked(conf->getAutoSaveFirst());;
|
||||
_ui->checkZommMouseArea->setChecked(conf->getZoomAroundMouse());
|
||||
_ui->cbxIncludeCursor->setChecked(conf->getIncludeCursor());
|
||||
|
||||
// integration tab
|
||||
_ui->checkInTray->setChecked(conf->getCloseInTray());
|
||||
_ui->checkAllowCopies->setChecked(conf->getAllowMultipleInstance());
|
||||
|
||||
@ -178,6 +176,8 @@ void ConfigDialog::loadSettings()
|
||||
|
||||
_ui->slideImgQuality->setValue(conf->getImageQuality());
|
||||
_ui->cbxEnableExtView->setChecked(conf->getEnableExtView());
|
||||
|
||||
_ui->checkFitInside->setChecked(conf->getFitInside());
|
||||
}
|
||||
|
||||
|
||||
@ -254,6 +254,7 @@ void ConfigDialog::saveSettings()
|
||||
conf->setSaveFileName(_ui->editFileName->text());
|
||||
conf->setSaveFormat(_ui->cbxFormat->currentText());
|
||||
conf->setDefDelay(_ui->defDelay->value());
|
||||
conf->setDefScreenshotType(_ui->cbxTypeScr->currentIndex());
|
||||
conf->setDateTimeInFilename(_ui->checkIncDate->isChecked());
|
||||
conf->setDateTimeTpl(_ui->editDateTmeTpl->text());
|
||||
conf->setAutoCopyFilenameOnSaving(_ui->cbxCopyFileName->currentIndex());
|
||||
@ -261,6 +262,7 @@ void ConfigDialog::saveSettings()
|
||||
conf->setAutoSaveFirst(_ui->checkAutoSaveFirst->isChecked());
|
||||
conf->setTrayMessages(_ui->cbxTrayMsg->currentIndex());
|
||||
conf->setCloseInTray(_ui->checkInTray->isChecked());
|
||||
conf->setIncludeCursor(_ui->cbxIncludeCursor->isChecked());
|
||||
conf->setZoomAroundMouse(_ui->checkZommMouseArea->isChecked());
|
||||
conf->setAllowMultipleInstance(_ui->checkAllowCopies->isChecked());
|
||||
conf->setTimeTrayMess(_ui->timeTrayMess->value());
|
||||
@ -268,6 +270,7 @@ void ConfigDialog::saveSettings()
|
||||
conf->setImageQuality(_ui->slideImgQuality->value());
|
||||
conf->setEnableExtView(_ui->cbxEnableExtView->isChecked());
|
||||
conf->setNoDecoration(_ui->checkNoDecorX11->isChecked());
|
||||
conf->setFitInside(_ui->checkFitInside->isChecked());
|
||||
|
||||
// save shortcuts in shortcutmanager
|
||||
int action = 0;
|
||||
@ -320,15 +323,12 @@ QString ConfigDialog::getFormat()
|
||||
|
||||
void ConfigDialog::selectDir()
|
||||
{
|
||||
QString *directory = new QString;
|
||||
{
|
||||
*directory = QFileDialog::getExistingDirectory(this, trUtf8("Select directory"),
|
||||
_ui->editDir->text(), QFileDialog::ShowDirsOnly)+QDir::separator();
|
||||
if (directory->toUtf8() != QDir::separator())
|
||||
_ui->editDir->setText( *directory);
|
||||
}
|
||||
QString directory = QFileDialog::getExistingDirectory(this, trUtf8("Select directory"),
|
||||
_ui->editDir->text(), QFileDialog::ShowDirsOnly);
|
||||
|
||||
delete directory;
|
||||
if (!directory.isEmpty()) {
|
||||
_ui->editDir->setText(QDir::toNativeSeparators(directory));
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigDialog::restoreDefaults()
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef CONFIGWIDGET_H
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>554</width>
|
||||
<height>278</height>
|
||||
<width>770</width>
|
||||
<height>335</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
@ -106,7 +106,7 @@
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>3</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page_6">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
@ -280,8 +280,8 @@
|
||||
<attribute name="title">
|
||||
<string>Screenshot</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
@ -331,14 +331,83 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_15">
|
||||
<item>
|
||||
<widget class="QLabel" name="labTypeScr_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Type: </string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="cbxTypeScr">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Type of screenshot</string>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Full screen</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Window</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Screen area</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Previous selection</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>118</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="labImgQuality">
|
||||
<property name="text">
|
||||
<string>Image quality</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="3" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
||||
<item>
|
||||
<widget class="QSlider" name="slideImgQuality">
|
||||
@ -368,14 +437,21 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="cbxIncludeCursor">
|
||||
<property name="text">
|
||||
<string>Include mouse pointer</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="checkZommMouseArea">
|
||||
<property name="text">
|
||||
<string>Zoom area around mouse in selection mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="6" column="1">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
@ -503,6 +579,16 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkFitInside">
|
||||
<property name="toolTip">
|
||||
<string>Fit to edges only inside selected screen area</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Fit to edges inside selected area</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
|
@ -13,10 +13,8 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
@ -96,12 +94,18 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent),
|
||||
help->setMenu(menuInfo);
|
||||
|
||||
_ui->toolBar->addWidget(help);
|
||||
|
||||
QWidget* spacer = new QWidget();
|
||||
spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
_ui->toolBar->addWidget(spacer);
|
||||
|
||||
_ui->toolBar->addAction(actQuit);
|
||||
|
||||
void (QSpinBox::*delayChange)(int) = &QSpinBox::valueChanged;
|
||||
connect(_ui->delayBox, delayChange, this, &MainWindow::delayBoxChange);
|
||||
void (QComboBox::*typeScr)(int) = &QComboBox::currentIndexChanged;
|
||||
connect(_ui->cbxTypeScr, typeScr, this, &MainWindow::typeScreenShotChange);
|
||||
connect(_ui->checkIncludeCursor, &QCheckBox::toggled, this, &MainWindow::checkIncludeCursor);
|
||||
|
||||
QIcon icon(":/res/img/logo.png");
|
||||
setWindowIcon(icon);
|
||||
@ -395,14 +399,20 @@ void MainWindow::delayBoxChange(int delay)
|
||||
|
||||
void MainWindow::typeScreenShotChange(int type)
|
||||
{
|
||||
_conf->setTypeScreen(type);
|
||||
_conf->setScreenshotType(type);
|
||||
}
|
||||
|
||||
void MainWindow::checkIncludeCursor(bool include)
|
||||
{
|
||||
_conf->setIncludeCursor(include);
|
||||
}
|
||||
|
||||
// updating UI from configdata
|
||||
void MainWindow::updateUI()
|
||||
{
|
||||
_ui->cbxTypeScr->setCurrentIndex(_conf->getTypeScreen());
|
||||
_ui->delayBox->setValue(_conf->getDelay());
|
||||
_ui->cbxTypeScr->setCurrentIndex(_conf->getDefScreenshotType());
|
||||
_ui->checkIncludeCursor->setChecked(_conf->getIncludeCursor());
|
||||
|
||||
updateShortcuts();
|
||||
|
||||
@ -487,7 +497,6 @@ void MainWindow::saveScreen()
|
||||
|
||||
formatsAvalible["png"] = tr("PNG Files");
|
||||
formatsAvalible["jpg"] = tr("JPEG Files");
|
||||
formatsAvalible["bmp"] = tr("BMP Files");
|
||||
|
||||
QString format = "png";
|
||||
_conf->getSaveFormat();
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef MAINWINDOW_H
|
||||
@ -106,6 +104,7 @@ private Q_SLOTS:
|
||||
void showAbout();
|
||||
void delayBoxChange(int);
|
||||
void typeScreenShotChange(int type);
|
||||
void checkIncludeCursor(bool include);
|
||||
void updateUI();
|
||||
void trayClick(QSystemTrayIcon::ActivationReason reason);
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>480</width>
|
||||
<height>299</height>
|
||||
<height>343</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
@ -30,9 +30,6 @@
|
||||
<enum>Qt::RightToLeft</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMaximumSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="scrLabel">
|
||||
<property name="sizePolicy">
|
||||
@ -201,6 +198,43 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkIncludeCursor">
|
||||
<property name="text">
|
||||
<string>Include mouse pointer</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QToolBar" name="toolBar">
|
||||
|
43
src/core/x11utils.cpp
Normal file
43
src/core/x11utils.cpp
Normal file
@ -0,0 +1,43 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2010 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "x11utils.h"
|
||||
|
||||
#include <xcb/xfixes.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QPainter>
|
||||
|
||||
void X11Utils::compositePointer(int offsetX, int offsetY, QPixmap *snapshot)
|
||||
{
|
||||
Xcb::ScopedCPointer<xcb_xfixes_get_cursor_image_reply_t> cursor(
|
||||
xcb_xfixes_get_cursor_image_reply(Xcb::connection(),
|
||||
xcb_xfixes_get_cursor_image_unchecked(Xcb::connection()),
|
||||
NULL));
|
||||
|
||||
if (cursor.isNull()) {
|
||||
return;
|
||||
}
|
||||
|
||||
QImage qcursorimg((uchar *) xcb_xfixes_get_cursor_image_cursor_image(cursor.data()),
|
||||
cursor->width, cursor->height,
|
||||
QImage::Format_ARGB32_Premultiplied);
|
||||
|
||||
QPainter painter(snapshot);
|
||||
painter.drawImage(QPointF(cursor->x - cursor->xhot - offsetX, cursor->y - cursor ->yhot - offsetY), qcursorimg);
|
||||
}
|
50
src/core/x11utils.h
Normal file
50
src/core/x11utils.h
Normal file
@ -0,0 +1,50 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2010 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef X11UTILS_H
|
||||
#define X11UTILS_H
|
||||
|
||||
#include <QPixmap>
|
||||
#include <QScopedPointer>
|
||||
#include <QX11Info>
|
||||
|
||||
#include <X11/Xlib-xcb.h>
|
||||
#include <fixx11h.h>
|
||||
#include <xcb/xcb.h>
|
||||
|
||||
namespace X11Utils {
|
||||
void compositePointer(int offsetX, int offsetY, QPixmap *snapshot);
|
||||
}
|
||||
|
||||
|
||||
namespace Xcb {
|
||||
template <typename T>
|
||||
class ScopedCPointer : public QScopedPointer<T, QScopedPointerPodDeleter>
|
||||
{
|
||||
public:
|
||||
ScopedCPointer(T *p = 0) : QScopedPointer<T, QScopedPointerPodDeleter>(p) {}
|
||||
};
|
||||
|
||||
inline xcb_connection_t *connection()
|
||||
{
|
||||
return XGetXCBConnection(QX11Info::display());
|
||||
}
|
||||
} // namespace Xcb
|
||||
|
||||
#endif // X11UTILS_H
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef ABSTRACTMODULE_H
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.11)
|
||||
|
||||
set (extedit_SRC
|
||||
moduleextedit.cpp
|
||||
extedit.cpp
|
||||
@ -34,4 +32,4 @@ add_library(extedit
|
||||
set_property (TARGET extedit PROPERTY SOVERSION 1.0.0)
|
||||
install(TARGETS extedit DESTINATION ${SG_LIBDIR})
|
||||
|
||||
target_link_libraries(extedit Qt5::Widgets Qt5::X11Extras ${QTXDG_LIBRARIES})
|
||||
target_link_libraries(extedit Qt5::Widgets Qt5::X11Extras Qt5Xdg)
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "extedit.h"
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef EXTEDIT_H
|
||||
|
@ -13,10 +13,8 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "moduleextedit.h"
|
||||
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef MODULEEXTEDIT_H
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.11)
|
||||
|
||||
set(uploader_SRC
|
||||
moduleuploader.cpp
|
||||
uploader.cpp
|
||||
@ -9,9 +7,6 @@ set(uploader_SRC
|
||||
uploaderconfigwidget.cpp
|
||||
imgur/uploader_imgur_widget.cpp
|
||||
imgur/uploaderconfigwidget_imgur.cpp
|
||||
mediacrush/uploader_mediacrush.cpp
|
||||
mediacrush/uploader_mediacrush_widget.cpp
|
||||
mediacrush/uploaderconfigwidget_mediacrush.cpp
|
||||
)
|
||||
|
||||
set(uploader_UI
|
||||
@ -19,8 +14,6 @@ set(uploader_UI
|
||||
uploaderconfigwidget.ui
|
||||
imgur/uploader_imgur_widget.ui
|
||||
imgur/uploaderconfigwidget_imgur.ui
|
||||
mediacrush/uploader_mediacrush_widget.ui
|
||||
mediacrush/uploaderconfigwidget_mediacrush.ui
|
||||
)
|
||||
|
||||
lxqt_translate_ts(uploader_QMS
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "dialoguploader.h"
|
||||
@ -24,8 +22,6 @@
|
||||
#include "uploaderconfig.h"
|
||||
#include "imgur/uploader_imgur.h"
|
||||
#include "imgur/uploader_imgur_widget.h"
|
||||
#include "mediacrush/uploader_mediacrush.h"
|
||||
#include "mediacrush/uploader_mediacrush_widget.h"
|
||||
#include <core/core.h>
|
||||
|
||||
#include <QMessageBox>
|
||||
@ -115,9 +111,6 @@ void DialogUploader::slotUploadStart()
|
||||
switch(_selectedHost)
|
||||
{
|
||||
case 0:
|
||||
_uploader = new Uploader_MediaCrush(Core::instance()->config()->getSaveFormat());
|
||||
break;
|
||||
case 1:
|
||||
_uploader = new Uploader_ImgUr;
|
||||
break;
|
||||
default:
|
||||
@ -150,13 +143,10 @@ void DialogUploader::slotSeletHost(int type)
|
||||
switch(_selectedHost)
|
||||
{
|
||||
case 0:
|
||||
_uploaderWidget = new Uploader_MediaCrush_Widget();
|
||||
break;
|
||||
case 1:
|
||||
_uploaderWidget = new Uploader_ImgUr_Widget();
|
||||
break;
|
||||
default:
|
||||
_uploaderWidget = new Uploader_MediaCrush_Widget();
|
||||
_uploaderWidget = new Uploader_ImgUr_Widget();
|
||||
}
|
||||
|
||||
_ui->stackedWidget->addWidget(_uploaderWidget);
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef DIALOGUPLOADER_H
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "uploader_imgur.h"
|
||||
@ -49,7 +47,7 @@ void Uploader_ImgUr::startUploading()
|
||||
*/
|
||||
QUrl Uploader_ImgUr::apiUrl()
|
||||
{
|
||||
return QUrl("http://api.imgur.com/2/upload");
|
||||
return QUrl("https://api.imgur.com/2/upload");
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef UPLOADER_IMGUR_H
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "uploader_imgur_widget.h"
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef UPLOADER_IMGUR_WIDGET_H
|
||||
|
@ -17,7 +17,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="labTitle">
|
||||
<property name="text">
|
||||
<string>Upload to ImgUr.com</string>
|
||||
<string>Upload to Imgur</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "uploaderconfigwidget_imgur.h"
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef UPLOADERCONFIGWIDGET_IMGUR_H
|
||||
|
@ -40,7 +40,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="labImgurConfDescription">
|
||||
<property name="text">
|
||||
<string>Now is nothing yet</string>
|
||||
<string>No settings available right now</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
|
@ -1,134 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "uploader_mediacrush.h"
|
||||
|
||||
#include <QStringList>
|
||||
#include <QtNetwork/QHttpMultiPart>
|
||||
#include <QtNetwork/QHttpPart>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
Uploader_MediaCrush::Uploader_MediaCrush(const QString& format, QObject* parent): Uploader(parent)
|
||||
{
|
||||
_host = "mediacru.sh";
|
||||
qDebug() << " create MediaCrush uploader";
|
||||
UpdateUploadedStrList();
|
||||
setCurrentFormat(format);
|
||||
}
|
||||
|
||||
Uploader_MediaCrush::~Uploader_MediaCrush()
|
||||
{
|
||||
qDebug() << " kill MediaCrush uploader";
|
||||
}
|
||||
|
||||
/*!
|
||||
* Start upload process
|
||||
*/
|
||||
void Uploader_MediaCrush::startUploading()
|
||||
{
|
||||
createData();
|
||||
createRequest(imageData, apiUrl());
|
||||
|
||||
_request.setRawHeader("Host", _host);
|
||||
Uploader::startUploading();
|
||||
}
|
||||
|
||||
/*!
|
||||
* Set type of uploading image, for generate right direct link on it.
|
||||
*/
|
||||
void Uploader_MediaCrush::setCurrentFormat(const QString& format)
|
||||
{
|
||||
_currentFormat = format.toLatin1();
|
||||
}
|
||||
|
||||
/*!
|
||||
* Return url for upload image
|
||||
*/
|
||||
QUrl Uploader_MediaCrush::apiUrl()
|
||||
{
|
||||
return QUrl("https://mediacru.sh/api/upload/file");
|
||||
}
|
||||
|
||||
/*!
|
||||
* Prepare image data for uploading
|
||||
*/
|
||||
void Uploader_MediaCrush::createData(bool inBase64)
|
||||
{
|
||||
Uploader::createData(inBase64);
|
||||
|
||||
_multipartData = new QHttpMultiPart(QHttpMultiPart::FormDataType);
|
||||
|
||||
QHttpPart imagePart;
|
||||
if (_formatString == "jpg")
|
||||
{
|
||||
imagePart.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("image/jpeg"));
|
||||
}
|
||||
else
|
||||
{
|
||||
imagePart.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("image/" + _formatString));
|
||||
}
|
||||
QByteArray disposition = "form-data; name=\"file\"; filename='"+ _uploadFilename.toLatin1() +"'";
|
||||
imagePart.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant(disposition));
|
||||
imagePart.setBody(imageData);
|
||||
|
||||
_multipartData->append(imagePart);
|
||||
|
||||
imageData.clear();
|
||||
}
|
||||
|
||||
/*!
|
||||
* Process server reply data
|
||||
*/
|
||||
void Uploader_MediaCrush::replyFinished(QNetworkReply* reply)
|
||||
{
|
||||
if (reply->error() == QNetworkReply::NoError)
|
||||
{
|
||||
QByteArray response = reply->readAll();
|
||||
|
||||
if (response.split(':').count() >= 2)
|
||||
{
|
||||
response = response.split(':').at(1);
|
||||
response = response.mid(2, 12);
|
||||
}
|
||||
|
||||
_uploadedStrings[UL_DIRECT_LINK].first = "https://" + _host + "/" + response + "." + _currentFormat;
|
||||
_uploadedStrings[UL_DELETE_URL].first = "https://" + _host + "/" + response + "/delete";
|
||||
|
||||
Q_EMIT uploadDoneStr(_uploadedStrings[UL_DIRECT_LINK].first);
|
||||
Q_EMIT uploadDone();
|
||||
}
|
||||
else
|
||||
{
|
||||
Q_EMIT uploadFail(reply->errorString().toLatin1());
|
||||
}
|
||||
|
||||
reply->deleteLater();
|
||||
}
|
||||
|
||||
void Uploader_MediaCrush::UpdateUploadedStrList()
|
||||
{
|
||||
QStringList nonUsed = QStringList() << UL_BB_CODE << UL_BB_CODE_THUMB << UL_HTML_CODE << UL_HTML_CODE_THUMB;
|
||||
|
||||
for (int i =0; i < nonUsed.count(); ++i)
|
||||
{
|
||||
_uploadedStrings.remove(nonUsed.at(i).toLatin1());
|
||||
}
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
#include "uploader_mediacrush_widget.h"
|
||||
#include "ui_uploader_mediacrush_widget.h"
|
||||
|
||||
Uploader_MediaCrush_Widget::Uploader_MediaCrush_Widget(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::Uploader_MediaCrush_Widget)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
Uploader_MediaCrush_Widget::~Uploader_MediaCrush_Widget()
|
||||
{
|
||||
delete ui;
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
#ifndef UPLOADER_MEDIACRUSH_WIDGET_H
|
||||
#define UPLOADER_MEDIACRUSH_WIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
namespace Ui {
|
||||
class Uploader_MediaCrush_Widget;
|
||||
}
|
||||
|
||||
class Uploader_MediaCrush_Widget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Uploader_MediaCrush_Widget(QWidget *parent = 0);
|
||||
~Uploader_MediaCrush_Widget();
|
||||
|
||||
private:
|
||||
Ui::Uploader_MediaCrush_Widget *ui;
|
||||
};
|
||||
|
||||
#endif // UPLOADER_MEDIACRUSH_WIDGET_H
|
@ -1,44 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Uploader_MediaCrush_Widget</class>
|
||||
<widget class="QWidget" name="Uploader_MediaCrush_Widget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>417</width>
|
||||
<height>203</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="labTitle">
|
||||
<property name="text">
|
||||
<string>Upload to MediaCrush</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>168</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -1,14 +0,0 @@
|
||||
#include "uploaderconfigwidget_mediacrush.h"
|
||||
#include "ui_uploaderconfigwidget_mediacrush.h"
|
||||
|
||||
UploaderConfigWidget_MediaCrush::UploaderConfigWidget_MediaCrush(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::UploaderConfigWidget_MediaCrush)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
UploaderConfigWidget_MediaCrush::~UploaderConfigWidget_MediaCrush()
|
||||
{
|
||||
delete ui;
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
#ifndef UPLOADERCONFIGWIDGET_MEDIACRUSH_H
|
||||
#define UPLOADERCONFIGWIDGET_MEDIACRUSH_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
namespace Ui {
|
||||
class UploaderConfigWidget_MediaCrush;
|
||||
}
|
||||
|
||||
class UploaderConfigWidget_MediaCrush : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit UploaderConfigWidget_MediaCrush(QWidget *parent = 0);
|
||||
~UploaderConfigWidget_MediaCrush();
|
||||
|
||||
private:
|
||||
Ui::UploaderConfigWidget_MediaCrush *ui;
|
||||
};
|
||||
|
||||
#endif // UPLOADERCONFIGWIDGET_MEDIACRUSH_H
|
@ -1,67 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>UploaderConfigWidget_MediaCrush</class>
|
||||
<widget class="QWidget" name="UploaderConfigWidget_MediaCrush">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>320</width>
|
||||
<height>240</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="labTitle">
|
||||
<property name="text">
|
||||
<string>Configuration for mediacru.sh upload</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>87</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labDescription">
|
||||
<property name="text">
|
||||
<string>Now is nothing yet</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>87</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "moduleuploader.h"
|
||||
@ -23,7 +21,6 @@
|
||||
#include "uploaderconfigwidget.h"
|
||||
#include "uploaderconfig.h"
|
||||
#include "imgur/uploader_imgur.h"
|
||||
#include "mediacrush/uploader_mediacrush.h"
|
||||
|
||||
#include "core/core.h"
|
||||
|
||||
@ -64,9 +61,6 @@ void ModuleUploader::init()
|
||||
switch(config.labelsList().indexOf(selectedtHost))
|
||||
{
|
||||
case 0:
|
||||
uploader = new Uploader_MediaCrush(core->config()->getSaveFormat());
|
||||
break;
|
||||
case 1:
|
||||
uploader = new Uploader_ImgUr;
|
||||
break;
|
||||
default:
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef MODULEUPLOADER_H
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "uploader.h"
|
||||
@ -159,11 +157,11 @@ void Uploader::createData(bool inBase64)
|
||||
|
||||
if (inBase64 == false)
|
||||
{
|
||||
imageData = core->getScreen();
|
||||
imageData = core->getScreenData();
|
||||
}
|
||||
else
|
||||
{
|
||||
imageData = core->getScreen().toBase64();
|
||||
imageData = core->getScreenData().toBase64();
|
||||
}
|
||||
core->killTempFile();
|
||||
}
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef UPLOADER_H
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "uploaderconfig.h"
|
||||
@ -28,15 +26,16 @@
|
||||
|
||||
// common defaults
|
||||
#define DEF_AUTO_COPY_RESULT_LIMK false
|
||||
#define DEF_DEFAULT_HOST "MediaCrush"
|
||||
#define DEF_DEFAULT_HOST "Imgur"
|
||||
|
||||
QStringList UploaderConfig::_labelsList = QStringList() << "MediaCrush" << "Imgur";
|
||||
|
||||
QStringList UploaderConfig::_labelsList = QStringList() << "Imgur";
|
||||
|
||||
UploaderConfig::UploaderConfig()
|
||||
{
|
||||
QString configFile = Config::getConfigDir() + QDir::separator() + "uploader.conf";
|
||||
_settings = new QSettings(configFile, QSettings::IniFormat);
|
||||
_groupsList << "mediacru.sh" << "imgur.com";
|
||||
_groupsList << "imgur.com" << "mediacru.sh";
|
||||
}
|
||||
|
||||
UploaderConfig::~UploaderConfig()
|
||||
@ -104,7 +103,7 @@ void UploaderConfig::defaultSettings()
|
||||
_settings->endGroup();
|
||||
|
||||
// imgur.com settings
|
||||
_settings->beginGroup(_groupsList[0]);
|
||||
_settings->beginGroup(_groupsList[1]);
|
||||
_settings->endGroup();
|
||||
}
|
||||
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef UPLOADERCONFIG_H
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "uploaderconfigwidget.h"
|
||||
@ -42,14 +40,14 @@ UploaderConfigWidget::UploaderConfigWidget(QWidget *parent) :
|
||||
|
||||
loadSettings();
|
||||
|
||||
_crush = new UploaderConfigWidget_MediaCrush(this);
|
||||
_imgur = new UploaderConfigWidget_ImgUr(this);
|
||||
|
||||
_ui->stackedHosts->addWidget(_crush);
|
||||
_ui->stackedHosts->addWidget(_imgur);
|
||||
|
||||
void (QComboBox::*hostChanged)(int) = &QComboBox::currentIndexChanged;
|
||||
connect(_ui->cbxHosts, hostChanged, _ui->stackedHosts, &QStackedWidget::setCurrentIndex);
|
||||
|
||||
_ui->stackedHosts->setCurrentIndex(_ui->cbxDefaultHost->currentIndex());
|
||||
}
|
||||
|
||||
UploaderConfigWidget::~UploaderConfigWidget()
|
||||
@ -83,6 +81,7 @@ void UploaderConfigWidget::loadSettings()
|
||||
|
||||
_ui->cbxDefaultHost->setCurrentIndex(index);
|
||||
}
|
||||
_ui->cbxHosts->setCurrentIndex(_ui->cbxDefaultHost->currentIndex());
|
||||
|
||||
_ui->checkAutoCopyMainLink->setChecked(loadValues["autoCopyDirectLink"].toBool());
|
||||
}
|
||||
@ -99,7 +98,6 @@ void UploaderConfigWidget::saveSettings()
|
||||
config.saveSettings("common", savingValues);
|
||||
|
||||
QMetaObject::invokeMethod(_imgur, "saveSettings");
|
||||
|
||||
}
|
||||
|
||||
void UploaderConfigWidget::changeEvent(QEvent *e)
|
||||
|
@ -13,9 +13,7 @@
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef UPLOADERCONFIGWIDGET_H
|
||||
@ -24,7 +22,6 @@
|
||||
#include <QWidget>
|
||||
|
||||
#include "imgur/uploaderconfigwidget_imgur.h"
|
||||
#include "mediacrush/uploaderconfigwidget_mediacrush.h"
|
||||
|
||||
namespace Ui {
|
||||
class UploaderConfigWidget;
|
||||
@ -49,7 +46,6 @@ private:
|
||||
Ui::UploaderConfigWidget *_ui;
|
||||
|
||||
// services widgets
|
||||
UploaderConfigWidget_MediaCrush *_crush;
|
||||
UploaderConfigWidget_ImgUr *_imgur;
|
||||
};
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
<item>
|
||||
<widget class="QTabWidget" name="settings">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="commonSettings">
|
||||
<attribute name="title">
|
||||
|
File diff suppressed because it is too large
Load Diff
1064
translations/extedit_fr_FR.ts
Normal file
1064
translations/extedit_fr_FR.ts
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1064
translations/screengrab_fr_FR.ts
Normal file
1064
translations/screengrab_fr_FR.ts
Normal file
File diff suppressed because it is too large
Load Diff
3
translations/screengrab_it.desktop
Normal file
3
translations/screengrab_it.desktop
Normal file
@ -0,0 +1,3 @@
|
||||
# Translations
|
||||
Name[it]=Cattura schermata
|
||||
Comment[it]=Applicazione per catturare schermate
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user