Compare commits
4 Commits
ubuntu/plu
...
upstream/1
Author | SHA1 | Date | |
---|---|---|---|
|
c177e5784f | ||
|
11f6e30f7c | ||
|
d325fba672 | ||
|
c41701becf |
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +0,0 @@
|
||||
build/
|
||||
*.qm
|
||||
*.kdev4
|
@ -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,6 +20,24 @@ 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_DEV "2.0-beta1")
|
||||
@ -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")
|
||||
|
@ -32,6 +32,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)
|
@ -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>
|
||||
@ -249,7 +249,7 @@ And all those who use ScreenGrab :)
|
||||
<h2>Version history <a href='#main'>To start page</a></h2>
|
||||
<p>
|
||||
<strong>Version 1.2:</strong>
|
||||
</p>
|
||||
</p>
|
||||
<ul>
|
||||
<li>Added ability for autosaving type of the last created screenshot.</li>
|
||||
<li>Some small fixes.</li>
|
||||
@ -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
|
||||
@ -242,7 +241,7 @@ E a todos aqueles que utilizam ScreenGrab :)
|
||||
<h2>Histórico das versões <a href='#main'>Para o início da página</a></h2>
|
||||
<p>
|
||||
<strong>Versão 1.2:</strong>
|
||||
</p>
|
||||
</p>
|
||||
<ul>
|
||||
<li>Added ability for autosaving type of the last created screenshot.</li>
|
||||
<li>Some small fixes.</li>
|
||||
|
BIN
screengrab_de.qm
Normal file
BIN
screengrab_de.qm
Normal file
Binary file not shown.
BIN
screengrab_es_ES.qm
Normal file
BIN
screengrab_es_ES.qm
Normal file
Binary file not shown.
BIN
screengrab_it.qm
Normal file
BIN
screengrab_it.qm
Normal file
Binary file not shown.
BIN
screengrab_pt_BR.qm
Normal file
BIN
screengrab_pt_BR.qm
Normal file
Binary file not shown.
BIN
screengrab_ru.qm
Normal file
BIN
screengrab_ru.qm
Normal file
Binary file not shown.
BIN
screengrab_uk_UA.qm
Normal file
BIN
screengrab_uk_UA.qm
Normal file
Binary file not shown.
@ -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,59 @@
|
||||
#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"
|
||||
|
||||
|
||||
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 +130,6 @@ Config::Config()
|
||||
saveSettings();
|
||||
}
|
||||
|
||||
_imageFormats << "png" << "jpg" << "bmp";
|
||||
_settings->setIniCodec("UTF-8");
|
||||
_scrNum = 0;
|
||||
}
|
||||
@ -183,6 +232,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 +292,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 +353,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();
|
||||
@ -403,6 +472,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 +480,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");
|
||||
@ -440,6 +511,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 +519,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");
|
||||
@ -475,6 +548,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 +556,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);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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,8 @@ 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;
|
||||
|
||||
// class worker with conf data
|
||||
class Config
|
||||
@ -145,6 +144,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 +167,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 +222,9 @@ public:
|
||||
bool getEnableExtView();
|
||||
void setEnableExtView(bool val);
|
||||
|
||||
bool getIncludeCursor();
|
||||
void setIncludeCursor(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()
|
||||
@ -270,7 +273,26 @@ void Core::getActiveWindow()
|
||||
geometry.x(),
|
||||
geometry.y(),
|
||||
geometry.width(),
|
||||
geometry.height());
|
||||
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)
|
||||
@ -377,7 +399,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 +432,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 +509,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 +551,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;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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 "modulemanager.h"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2010 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2010 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2010 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2010 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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"
|
||||
@ -33,16 +31,8 @@ AboutDialog::AboutDialog(QWidget *parent):
|
||||
_ui->setupUi(this);
|
||||
_ui->labAppName->setText(_ui->labAppName->text() + QString(" <b>") + qApp->applicationVersion() + QString("</b>"));
|
||||
|
||||
QString versionInfo;
|
||||
versionInfo = tr("built on ");
|
||||
versionInfo.append(__DATE__);
|
||||
versionInfo.append(" ");
|
||||
versionInfo.append(__TIME__);
|
||||
|
||||
_ui->labQtVer->setText(tr("using Qt ") + qVersion());
|
||||
|
||||
_ui->labVersion->setText(versionInfo);
|
||||
|
||||
QTabBar *tabs = new QTabBar;
|
||||
|
||||
_ui->frame->layout()->addWidget(tabs);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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());
|
||||
|
||||
@ -254,6 +252,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 +260,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());
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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>
|
||||
<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>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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"
|
||||
@ -45,11 +43,11 @@ void Uploader_ImgUr::startUploading()
|
||||
}
|
||||
|
||||
/*!
|
||||
* Return url for upload image
|
||||
* Return url for upload image
|
||||
*/
|
||||
QUrl Uploader_ImgUr::apiUrl()
|
||||
{
|
||||
return QUrl("http://api.imgur.com/2/upload");
|
||||
return QUrl("https://api.imgur.com/2/upload");
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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>
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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();
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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();
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* Copyright (C) 2009 - 2013 by Artem 'DOOMer' Galichkin *
|
||||
* doomer3d@gmail.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@ -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">
|
||||
|
@ -655,21 +655,6 @@ indem Sie die <Esc>-Taste oder die mittlere Maustaste drücken.</translati
|
||||
<translation type="vanished">Keine Konfiguration vorhanden</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>UploaderConfigWidget_MediaCrush</name>
|
||||
<message>
|
||||
<source>Form</source>
|
||||
<translation type="vanished">Formular</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Configuration for mediacru.sh upload</source>
|
||||
<translation type="vanished">Konfiguration für <mediacru.sh></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Now is nothing yet</source>
|
||||
<translation type="vanished">Keine Konfiguration vorhanden</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Uploader_ImgUr_Widget</name>
|
||||
<message>
|
||||
@ -677,17 +662,6 @@ indem Sie die <Esc>-Taste oder die mittlere Maustaste drücken.</translati
|
||||
<translation type="vanished">Nach <ImgUr.com> hochladen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Uploader_MediaCrush_Widget</name>
|
||||
<message>
|
||||
<source>Form</source>
|
||||
<translation type="vanished">Formular</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Upload to MediaCrush</source>
|
||||
<translation type="vanished">Nach <MediaCrush> hochladen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>aboutWidget</name>
|
||||
<message>
|
3
translations/screengrab_it.desktop
Normal file
3
translations/screengrab_it.desktop
Normal file
@ -0,0 +1,3 @@
|
||||
# Translations
|
||||
Comment[it]=Catturare schermate e condividerle in rete
|
||||
GenericName[it]=Cattura schermata
|
@ -6,12 +6,12 @@
|
||||
<message>
|
||||
<location filename="../src/ui/about.cpp" line="37"/>
|
||||
<source>built on </source>
|
||||
<translation>compilato in </translation>
|
||||
<translation>compilato il </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/about.cpp" line="42"/>
|
||||
<source>using Qt </source>
|
||||
<translation>usando QT</translation>
|
||||
<translation>usando le librerie QT</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/about.cpp" line="52"/>
|
||||
@ -26,63 +26,64 @@
|
||||
<message>
|
||||
<location filename="../src/ui/about.cpp" line="122"/>
|
||||
<source>Licensed under the </source>
|
||||
<translation>Rilasciato sotto licensa </translation>
|
||||
<translation>Rilasciato sotto licenza </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/about.cpp" line="115"/>
|
||||
<location filename="../src/ui/about.cpp" line="144"/>
|
||||
<source>E-Mail</source>
|
||||
<translation></translation>
|
||||
<translation>email</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/about.cpp" line="54"/>
|
||||
<source>Help us</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Contribuisci</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/about.cpp" line="118"/>
|
||||
<source>Web site</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Sito web</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/about.cpp" line="126"/>
|
||||
<source>Copyright &copy; 2009-2013, Artem 'DOOMer' Galichkin</source>
|
||||
<translation type="unfinished">Copyright &copy; 2009-2010, Artem 'DOOMer' Galichkin {2009-2012,?} {2009-2013,?}</translation>
|
||||
<translatorcomment>copyright updated to 2015, ok?</translatorcomment>
|
||||
<translation>Copyright &copy; 2009-2015, Artem 'DOOMer' Galichkin </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/about.cpp" line="136"/>
|
||||
<source>What you can do?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Cosa puoi fare?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/about.cpp" line="110"/>
|
||||
<source>is a crossplatform application for fast creating screenshots of your desktop.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>è una applicazione per catturare velocemente schermate per tutte le piattaforme.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/about.cpp" line="112"/>
|
||||
<source>It is a light and powerful application and has been written using the Qt framework, so that you are able to use in Windows and Linux.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>E' una applicazione leggera e e potente ed è stato scritta usando il Qt-framework, così puoi usarla in Windows e Linux</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/about.cpp" line="133"/>
|
||||
<source>You can join us and help us if you want. This is an invitation if you like this application.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Se ti piace questa applicazione puoi aiutarci!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/about.cpp" line="139"/>
|
||||
<source>Translate ScreenGrab to other languages</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Puoi tradurre ScreenGrab in altre lingue</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/about.cpp" line="140"/>
|
||||
<source>Make suggestions for next releases</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Fai proposte per le prossime versioni</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/about.cpp" line="141"/>
|
||||
<source>Report bugs and issues</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Segnala problemi e bug</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/about.cpp" line="148"/>
|
||||
@ -117,7 +118,7 @@
|
||||
<message>
|
||||
<location filename="../src/ui/about.cpp" line="166"/>
|
||||
<source> Spanish translation</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/about.cpp" line="167"/>
|
||||
@ -127,22 +128,22 @@
|
||||
<message>
|
||||
<location filename="../src/ui/about.cpp" line="169"/>
|
||||
<source> Italian translation</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Traduziona italiana</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/about.cpp" line="173"/>
|
||||
<source>Testing:</source>
|
||||
<translation></translation>
|
||||
<translation>Test:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/about.cpp" line="175"/>
|
||||
<source>Dual monitor support and other in Linux</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Supporto per due monitor e altro in Linux</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/about.cpp" line="176"/>
|
||||
<source>Dual monitor support in Linux</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Supporto dual monitor in Linux</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/about.cpp" line="177"/>
|
||||
@ -152,7 +153,7 @@
|
||||
<message>
|
||||
<location filename="../src/ui/about.cpp" line="178"/>
|
||||
<source>old win32-build [Windows Vista]</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation type="unfinished"> win32-build vecchio[Windows Vista]</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/about.cpp" line="179"/>
|
||||
@ -176,12 +177,12 @@
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.cpp" line="222"/>
|
||||
<source>Directory %1 does not exist. Do you want to create it?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>La cartella %1 non esiste. Vuoi crearla?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.cpp" line="329"/>
|
||||
<source>Do you want to reset the settings to the defaults?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Vuoi ripristinare la configurazione iniziale?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.cpp" line="347"/>
|
||||
@ -196,12 +197,12 @@
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.cpp" line="449"/>
|
||||
<source>This key is already used in your system! Please select another.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Questa scorciatoia è già in uso. Seleziona un altra per favore.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.cpp" line="455"/>
|
||||
<source>This key is already used in ScreenGrab! Please select another.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Questa scorciatoia è già usata in ScreenGrab. Seleziona un altra.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.cpp" line="473"/>
|
||||
@ -234,7 +235,7 @@
|
||||
<message>
|
||||
<location filename="../src/core/core.cpp" line="327"/>
|
||||
<source>Name of saved file is copied to the clipboard</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Il nome del file salvato è stato copiato negli appunti</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/core/core.cpp" line="345"/>
|
||||
@ -249,7 +250,7 @@
|
||||
<message>
|
||||
<location filename="../src/core/core.cpp" line="333"/>
|
||||
<source>Path to saved file is copied to the clipboard</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Il percorso del file salvato è stato copiato negli appunti</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/core/core.cpp" line="345"/>
|
||||
@ -296,7 +297,7 @@
|
||||
<message>
|
||||
<location filename="../src/ui/mainwindow.ui" line="112"/>
|
||||
<source>Full screen</source>
|
||||
<translation>Tutto schermo</translation>
|
||||
<translation>Schermo intero</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainwindow.ui" line="117"/>
|
||||
@ -311,12 +312,12 @@
|
||||
<message>
|
||||
<location filename="../src/ui/mainwindow.ui" line="127"/>
|
||||
<source>Previous selection</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Selezione precedente</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainwindow.ui" line="196"/>
|
||||
<source>toolBar</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Barra degli strumenti</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Getting new screenshot</source>
|
||||
@ -415,12 +416,12 @@
|
||||
<message>
|
||||
<location filename="../src/ui/mainwindow.cpp" line="321"/>
|
||||
<source>Screenshot </source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Schermata</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainwindow.cpp" line="325"/>
|
||||
<source>Double click for open screenshot in external default image viewer</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Doppio clic per aprire la cattura in un editor esterno</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainwindow.cpp" line="379"/>
|
||||
@ -507,7 +508,7 @@ un tasto qualsiasi o usando il tasto destro o centrale del mouse.</translation>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.ui" line="421"/>
|
||||
<source>Insert current date and time in file name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Inserisci data e ora nel nome del file</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.ui" line="468"/>
|
||||
@ -522,37 +523,37 @@ un tasto qualsiasi o usando il tasto destro o centrale del mouse.</translation>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.ui" line="337"/>
|
||||
<source>Image quality</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Qualità imagine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.ui" line="346"/>
|
||||
<source>Image quality (1 - small file, 100 - high quality)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Qualità immagine (1 -bassa, 100 massima qualità)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.ui" line="489"/>
|
||||
<source>Allow run multiplies copy of ScreenGrab</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Permetti istanze multiple di ScreenGrab</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.ui" line="502"/>
|
||||
<source>Enable external viewer</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Abilita visualizzatore esterno</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.ui" line="537"/>
|
||||
<source>Show ScreenGrab in the system tray</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Mostra ScreenGrab nel vassoio di sistema</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.ui" line="622"/>
|
||||
<source>Minimize to tray on click close button</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Minimizza nel vassoio di sistema cliccando il pulsante chiudi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.ui" line="625"/>
|
||||
<source>Minimize to tray when closing</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Minimizza nel vassoio alla chiusura</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.ui" line="664"/>
|
||||
@ -582,7 +583,7 @@ un tasto qualsiasi o usando il tasto destro o centrale del mouse.</translation>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.ui" line="697"/>
|
||||
<source>Local shortcuts</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Scorciatoie locali</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.ui" line="701"/>
|
||||
@ -651,12 +652,12 @@ un tasto qualsiasi o usando il tasto destro o centrale del mouse.</translation>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.ui" line="90"/>
|
||||
<source>System tray</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Vassoio</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.ui" line="129"/>
|
||||
<source>Saving</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Salvataggio</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.ui" line="143"/>
|
||||
@ -696,27 +697,27 @@ un tasto qualsiasi o usando il tasto destro o centrale del mouse.</translation>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.ui" line="233"/>
|
||||
<source>Copy file name to the clipboard when saving</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Copia nome del file negli appunti quando salvi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.ui" line="247"/>
|
||||
<source>Do not copy</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Non copiare</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.ui" line="252"/>
|
||||
<source>Copy file name only</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Copia solo il nome del file</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.ui" line="257"/>
|
||||
<source>Copy full file path</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Copia il percorso completo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.ui" line="281"/>
|
||||
<source>Screenshot</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Cattura</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.ui" line="289"/>
|
||||
@ -797,12 +798,12 @@ un tasto qualsiasi o usando il tasto destro o centrale del mouse.</translation>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.ui" line="492"/>
|
||||
<source>Allow multiple instances of ScreenGrab</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Permetti istanze multiple di ScreenGrab</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.ui" line="499"/>
|
||||
<source>Open in external viewer on double click</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Apri la cattura in un visualizzatore esterno con doppio clic</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.ui" line="669"/>
|
||||
@ -812,7 +813,7 @@ un tasto qualsiasi o usando il tasto destro o centrale del mouse.</translation>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.ui" line="726"/>
|
||||
<source>Quit</source>
|
||||
<translation type="unfinished">Esci</translation>
|
||||
<translation>Esci</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/configwidget.ui" line="737"/>
|
@ -652,17 +652,6 @@ any key or using the right or middle mouse buttons.</source>
|
||||
<translation type="vanished">Пока ничего нет</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>UploaderConfigWidget_MediaCrush</name>
|
||||
<message>
|
||||
<source>Configuration for mediacru.sh upload</source>
|
||||
<translation type="vanished">Настройка загрузки для mediacru.sh</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Now is nothing yet</source>
|
||||
<translation type="vanished">Пока ничего нет</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Uploader_ImgUr_Widget</name>
|
||||
<message>
|
||||
@ -670,13 +659,6 @@ any key or using the right or middle mouse buttons.</source>
|
||||
<translation type="vanished">Загрузка на ImgUr.com</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Uploader_MediaCrush_Widget</name>
|
||||
<message>
|
||||
<source>Upload to MediaCrush</source>
|
||||
<translation type="vanished">Загрузить на MediaCrush</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>aboutWidget</name>
|
||||
<message>
|
||||
|
@ -584,13 +584,6 @@ any key or using the right or middle mouse buttons.</source>
|
||||
<translation type="vanished">Ще нічого немає</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>UploaderConfigWidget_MediaCrush</name>
|
||||
<message>
|
||||
<source>Now is nothing yet</source>
|
||||
<translation type="obsolete">Ще нічого немає</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Uploader_ImgUr_Widget</name>
|
||||
<message>
|
||||
|
@ -215,24 +215,6 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>UploaderConfigWidget_MediaCrush</name>
|
||||
<message>
|
||||
<location filename="../src/modules/uploader/mediacrush/uploaderconfigwidget_mediacrush.ui" line="14"/>
|
||||
<source>Form</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/uploader/mediacrush/uploaderconfigwidget_mediacrush.ui" line="20"/>
|
||||
<source>Configuration for mediacru.sh upload</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/uploader/mediacrush/uploaderconfigwidget_mediacrush.ui" line="43"/>
|
||||
<source>Now is nothing yet</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Uploader_ImgUr_Widget</name>
|
||||
<message>
|
||||
@ -241,17 +223,4 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Uploader_MediaCrush_Widget</name>
|
||||
<message>
|
||||
<location filename="../src/modules/uploader/mediacrush/uploader_mediacrush_widget.ui" line="14"/>
|
||||
<source>Form</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/modules/uploader/mediacrush/uploader_mediacrush_widget.ui" line="20"/>
|
||||
<source>Upload to MediaCrush</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
Loading…
x
Reference in New Issue
Block a user