Adding upstream version 1.95_pr1.

Signed-off-by: Andrew Lee (李健秋) <ajqlee@debian.org>
ubuntu/disco upstream/1.95_pr1
Andrew Lee (李健秋) 9 years ago
commit e77d40ab65
No known key found for this signature in database
GPG Key ID: 9D0633E1B6250985

3
.gitignore vendored

@ -0,0 +1,3 @@
build/
*.qm
*.kdev4

@ -0,0 +1,11 @@
Upstream author:
Artem Galichkin <doomer3d@gmail.com>
Contributors:
Jerome Leclanche <jerome@leclan.ch>
Alexander Sokolov <sokoloff.a@gmail.com>
Alf Gaida <agaida@siduction.org>
Ilya87 <yast4ik@gmail.com>
Jonathan Hooverman <jonathan.hooverman@gmail.com>
Paulo Lieuthier <paulolieuthier@gmail.com>

@ -0,0 +1,119 @@
2.0
* Port on Qt5
1.2
* Added ability for autosaving type of the last created screenshot
* Some small fixes
1.1.1
* Fixed wrong 'imgur' uploading result string for bb-code with preview
* Fixed segfault when exist configuration file contains "showTrayIcon=false"
1.1
* added ability to upload to MediaCreush (http://mediacru.sh)
* Option "Always save the window size" replaced by "autosave window size on exit ScreenGrab"
* Reworked main window ui (the order of the buttons)
* Reworked the configuration dialog (some UI elements moved between sections, and increment count of the sections)
1.0
* Fixed dual monitor support
* added XDG_CONFIG_HOME support, by a build option SG_XDG_CONFIG_SUPPORT
* added ability to upload to some image hosting services (imgur.com and imgshack.us)
* added build option for compiling without the upload feature (SG_EXT_UPLOADS build option)
* added "Previous selection" mode (save the last selected area and restore it in the next get area screenshot)
* added ability to edit a screenshot in an external editor
* added option for preview screenshot in default image viewer by double click on screenshot area
* Fixed non-minimize main window on "Exit" shortcut, when using "Minimize to tray" option
* Fixed bug with cutting button text on main window
* Fixed regression with not capturing a screenshot when a second instance of ScreenGrab is running
* fixed bug with not creating the path to autosave screenshots (when it is typed in manually in configuration dialog)
* added build option SG_GLOBALSHORTCUTS for turning on/off build with global shortcuts support
* autoincrement filenames when saving screenshots in manual mode (in one running session)
* added the ability to customise shortcuts to close ScreenGrab
* added ability to run ScreenGrab minimized to tray (or taskbar, if tray is disabled) with "--minimized" command line option
* Added ability to automatically upload the screenshot via the command line "--upload" parameter
0.9.1
* fixed non-switching combo-box "Type of Screeen" when grabbing screenshot from signal by another instance
* fixed incorect grab active window screens in GNOME (when disabled "Allow multiple copies" option and run another instance)
0.9
* added global shortcuts
* added option to enable|disable system tray
* added switch to the already running instance of an application when you start a second instance (non-operating mode to allow multiple instances)
* added autosave first screenshot which has been taken on application start (enabled | disabled optional)
* redesign of the configuration dialog UI
0.8.1
* [Linux] fixed incorrect selection of the default saving format in the KDE 4.4.x save file dialog
* added de_DE translation
0.8
* added command line parameters for grab modes (fullscreen, active window, selection area)
* added BMP support
* added pt_BR translation
* added automatically hiding main window on grab process
* [Linux] fixed grab active window screenshot without decorations
* [Linux] added option "no window decoration"
* added shortcuts for main window buttons
0.6.2 [Linux only]
* fixed non-translated tray menu (closed issue #7)
0.6.1 [Linux only]
* fixed incorrect detection of the system language in some Linux distributions
0.6
* default value of hiding main window changed to true.
* added input template for inserting date-time into the saved filename
* added zoom around mouse cursor in area selection mode
* small modifications of the configuration dialog
* added html help info (English & Russian)
0.5
* added inserting date|time in saving filename [optional]
* added auto saving screenshots in grabbing process [option]
* added option to change the time of displaying tray messages [1 - 10 sec]
* added help info
* added tool tips for the UI elements
* small fixes config file syntax
v0.4
* added grabbing selection screen area
* added ability to copy image files into the clipboard
* added saving the size of the main window on exit [default is turned off]
* halve the memory size occupied by ScreenGrab at startup
* [win32] fixed bug with storing the screengrab.ini file
* change structure of some source code
* change buttons tab order of the main window
* new application icon
* some fixes
v0.3.1
* fixed bug with non-displayed main window icon
v0.3
* main window is now based on ui-file (remaked UI)
* added grabbing active window
* added option to allow running multiple instances of ScreenGrab
* added option to select between minimizing to tray and closing ScreenGrab (by close window button)
v0.2
* added JPEG support
* added options dialog
* added option to select a default directory for saving the files
* added option to select a default filename
* added option to select a default image format
* added saving options into an INI-file
* added i18n support and Russian localisation
* some fixes and changes in the code
* Windows version is now available as installer
v0.1
* first public version
* added system tray icon and menu
* added option to hide ScreenGrab in systray
* added option to block running a second instance of ScreenGrab
v0.0.3
- first working build

@ -0,0 +1,229 @@
cmake_minimum_required(VERSION 2.8.11)
# set project's name
project(screengrab)
find_package(Qt5Widgets 5.2.0 REQUIRED)
find_package(Qt5X11Extras 5.2.0 REQUIRED)
find_package(Qt5Network 5.2.0 REQUIRED)
find_package(KF5WindowSystem REQUIRED)
# for translations
find_package(Qt5LinguistTools REQUIRED)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# long live cmake + qt :)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
include(GNUInstallDirs)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
# add version define
set(SCREENGRAB_VERSION "1.95")
set(SCREENGRAB_VERSION_DEV "2.0-beta1")
# set(DEV_BUILD True)
if(SCREENGRAB_VERSION_DEV)
if(DEV_BUILD)
# search git executable
find_package(Git)
if(GIT_FOUND)
# executable git for check HEAD rev hash
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
OUTPUT_VARIABLE GIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
endif()
set(VERSION "${SCREENGRAB_VERSION} (${SCREENGRAB_VERSION_DEV}-git-${GIT_HASH})")
else()
set(VERSION "${SCREENGRAB_VERSION} (${SCREENGRAB_VERSION_DEV})")
endif()
elseif(NOT SCREENGRAB_VERSION_DEV)
set(VERSION "${SCREENGRAB_VERSION}")
endif(SCREENGRAB_VERSION_DEV)
add_definitions(-DVERSION="${VERSION}")
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
message(STATUS "Build type: " ${CMAKE_BUILD_TYPE})
message(STATUS "Install prefix: " ${CMAKE_INSTALL_PREFIX})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Woverloaded-virtual -Wall -Wextra")
set(SG_LIBDIR "${CMAKE_INSTALL_LIBDIR}/screengrab")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${SG_LIBDIR}")
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_EDIT "Enable ability to edit screenshots in external editor" ON)
option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF)
# Although the names, LXQtTranslateTs and LXQtTranslateDesktop, they don't
# bring any dependency on lxqt.
include(LXQtTranslateTs)
include(LXQtTranslateDesktop)
include(Qt5TranslationLoader)
if(SG_GLOBALSHORTCUTS)
add_definitions( -DSG_GLOBAL_SHORTCUTS="1")
if(SG_USE_SYSTEM_QXT)
# find qxt
find_package(Qxt REQUIRED COMPONENTS QxtCore, QxtGui)
include_directories(${QXT_QXTCORE_INCLUDE_DIR} ${QXT_QXTGUI_INCLUDE_DIR})
endif()
endif(SG_GLOBALSHORTCUTS)
if(SG_EXT_UPLOADS)
add_definitions( -DSG_EXT_UPLOADS="1")
endif()
if(SG_EXT_EDIT)
add_definitions( -DSG_EXT_EDIT="1")
find_package(Qt5Xdg REQUIRED)
include(${QTXDG_USE_FILE})
endif()
message(STATUS "Global shortcuts support: " ${SG_GLOBALSHORTCUTS})
message(STATUS "Upload to MediaCrush and imgur support: " ${SG_EXT_UPLOADS})
message(STATUS "Editing screenshots in external editor support: " ${SG_EXT_EDIT})
message(STATUS "Use system Qxt Library: " ${SG_USE_SYSTEM_QXT})
message(STATUS "Update source translation translations/*.ts files: " ${UPDATE_TRANSLATIONS})
# docs
# CMAKE_INSTALL_FULL_DOCDIR = CMAKE_INSTALL_PREFIX/CMAKE_INSTALL_DATADIR/doc/PROJECT_NAME
message(STATUS "Documentation directory: " ${CMAKE_INSTALL_FULL_DOCDIR})
add_definitions(-DSG_DOCDIR="${CMAKE_INSTALL_FULL_DOCDIR}")
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")
if(SG_EXT_UPLOADS)
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src/modules/uploader")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/modules/uploader")
endif()
if (SG_EXT_EDIT)
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src/modules/extedit")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/modules/extedit")
endif()
set(SCREENGRAB_SRC
src/core/main.cpp
src/core/singleapp.cpp
src/core/core.cpp
src/core/config.cpp
src/core/regionselect.cpp
src/core/shortcutmanager.cpp
src/core/modulemanager.cpp
src/core/ui/configwidget.cpp
src/core/ui/about.cpp
src/core/ui/mainwindow.cpp
)
set(SCREENGRAB_HDR
src/core/singleapp.h
)
set(SCREENGRAB_UI
src/core/ui/configwidget.ui
src/core/ui/aboutwidget.ui
src/core/ui/mainwindow.ui
)
# Qt resource file
set(SCREENGRAB_QRC screengrab.qrc)
qt5_add_resources(QRC_SOURCES ${SCREENGRAB_QRC})
message(STATUS "Generating localize ...")
set(SCREENGRAB_DESKTOP_FILES_IN
screengrab.desktop.in
)
lxqt_translate_ts(SCREENGRAB_QMS
USE_QT5 TRUE
UPDATE_TRANSLATIONS ${UPDATE_TRANSLATIONS}
SOURCES
${SCREENGRAB_SRC}
${SCREENGRAB_UI}
INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/translations"
)
lxqt_translate_desktop(SCREENGRAB_DESKTOP_FILES
SOURCES ${SCREENGRAB_DESKTOP_FILES_IN}
)
qt5_translation_loader(SCREENGRAB_QM_LOADER
"${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT_NAME}/translations"
${PROJECT_NAME}
)
# generating executable
add_executable(screengrab
${SCREENGRAB_SRC}
${SCREENGRAB_UI_H}
${QRC_SOURCES}
${SCREENGRAB_QMS}
${SCREENGRAB_DESKTOP_FILES}
${SCREENGRAB_QM_LOADER}
)
if(SG_GLOBALSHORTCUTS)
if(SG_USE_SYSTEM_QXT)
target_link_libraries(screengrab ${QXT_QXTCORE_LIB_RELEASE} ${QXT_QXTGUI_LIB_RELEASE})
else(SG_USE_SYSTEM_QXT)
target_link_libraries(screengrab qxt)
endif(SG_USE_SYSTEM_QXT)
endif()
if(SG_EXT_UPLOADS)
target_link_libraries(screengrab uploader)
endif()
if(SG_EXT_EDIT)
target_link_libraries(screengrab extedit)
endif()
target_link_libraries(screengrab qkeysequencewidget Qt5::Widgets KF5::WindowSystem)
# make src.tar.gz
add_custom_target(dist @echo create source package)
set(SCREENGRAB_DIST "screengrab-${SCREENGRAB_VERSION}")
add_custom_command(COMMAND cp
ARGS -R ${CMAKE_CURRENT_SOURCE_DIR} "/tmp/${SCREENGRAB_DIST}"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
TARGET dist
)
add_custom_command(COMMAND tar
ARGS cvfz "${CMAKE_CURRENT_BINARY_DIR}/${SCREENGRAB_DIST}.tar.gz" --exclude=*~ --exclude-vcs --exclude=localize/*qm --exclude=*.kdev4 --exclude=build --exclude=create-src.sh --exclude=win32 -C "/tmp" "${SCREENGRAB_DIST}"
WORKING_DIRECTORY "/tmp"
TARGET dist
)
add_custom_command(COMMAND rm
ARGS -rf "/tmp/${SCREENGRAB_DIST}"
WORKING_DIRECTORY "/tmp"
TARGET dist
)
# installing
install(TARGETS screengrab RUNTIME DESTINATION bin)
# install html docs
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/docs/html" DESTINATION "${CMAKE_INSTALL_FULL_DOCDIR}")
# 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)

@ -0,0 +1,280 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS

@ -0,0 +1,61 @@
ScreenGrab
==========
version 2.0-dev
ScreenGrab - A program for fast creating screenshots, and easily publishing them on internet image hosting services. It works on Linux and Windows operating systems. ScreenGrab uses the Qt framework and thus, it is independent from any desktop environment.
Build requirements
------------------
* Qt5 >= 5.2 (Qt 4.x support only 1.x branch)
* CMake >= 2.8.11 (only for building ScreenGrab from sources)
* GCC > 4.5
* [optional] Qxt Library > 0.6 (if you want to build ScreenGrab using your system Qxt version - see the "Build options" section in this file)
Build
-----
To build ScreenGrab from sources, use these commands:
mkdir build
cd build
cmake [BUILD OPTIONS] ../
make
make install
Build options
-------------
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_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".
* **-DQKSW_SHARED** - Enable shared linking with qkeysequencewidget library (in src/common/qksysekwesewidget). Default setting: OFF.
**Build notes:**
* For Debian based Linux distro (Debian Squeezy, Ubuntu 12.04, etc) - if you want to build ScreenGrab using the system version of the Qxt Library, please use this command to run CMake:
cmake -DSG_USE_SYSTEM_QXT=ON -DQXT_QXTCORE_INCLUDE_DIR=/usr/include/qxt/QxtCore -DQXT_QXTGUI_INCLUDE_DIR=/usr/include/qxt -DCMAKE_INSTALL_PREFIX=/usr ../
LICENSE
-------
Screengrab is licensed under the GPL v2. See file LICENSE in docs directory for more information
Contacts
--------
E-mail: doomer3d@gmail.com
Jabber: doomer@jabber.linux.it
Web homepage: http://screengrab.doomer.org/
Copyright (c) 2009-2013, Artem 'DOOMer' Galichkin

@ -0,0 +1,155 @@
#############
## basic FindQxt.cmake
## This is an *EXTREMELY BASIC* cmake find/config file for
## those times you have a cmake project and wish to use
## libQxt.
##
## It should be noted that at the time of writing, that
## I (mschnee) have an extremely limited understanding of the
## way Find*.cmake files work, but I have attempted to
## emulate what FindQt4.cmake and a few others do.
##
## To enable a specific component, set your QXT_USE_${modname}:
## SET(QXT_USE_QXTCORE TRUE)
## SET(QXT_USE_QXTGUI FALSE)
## Currently available components:
## QxtCore, QxtGui, QxtNetwork, QxtWeb, QxtSql
## Auto-including directories are enabled with INCLUDE_DIRECTORIES(), but
## can be accessed if necessary via ${QXT_INCLUDE_DIRS}
##
## To add the libraries to your build, TARGET_LINK_LIBRARIES(), such as...
## TARGET_LINK_LIBRARIES(YourTargetNameHere ${QXT_LIBRARIES})
## ...or..
## TARGET_LINK_LIBRARIES(YourTargetNameHere ${QT_LIBRARIES} ${QXT_LIBRARIES})
################### TODO:
## The purpose of this cmake file is to find what components
## exist, regardless of how libQxt was build or configured, thus
## it should search/find all possible options. As I am not aware
## that any module requires anything special to be used, adding all
## modules to ${QXT_MODULES} below should be sufficient.
## Eventually, there should be version numbers, but
## I am still too unfamiliar with cmake to determine how to do
## version checks and comparisons.
## At the moment, this cmake returns a failure if you
## try to use a component that doesn't exist. I don't know how to
## set up warnings.
## It would be nice having a FindQxt.cmake and a UseQxt.cmake
## file like done for Qt - one to check for everything in advance
##############
###### setup
SET(QXT_MODULES QxtGui QxtWeb QxtZeroConf QxtNetwork QxtSql QxtBerkeley QxtCore)
SET(QXT_FOUND_MODULES)
FOREACH(mod ${QXT_MODULES})
STRING(TOUPPER ${mod} U_MOD)
SET(QXT_${U_MOD}_INCLUDE_DIR NOTFOUND)
SET(QXT_${U_MOD}_LIB_DEBUG NOTFOUND)
SET(QXT_${U_MOD}_LIB_RELEASE NOTFOUND)
SET(QXT_FOUND_${U_MOD} FALSE)
ENDFOREACH(mod)
SET(QXT_QXTGUI_DEPENDSON QxtCore)
SET(QXT_QXTWEB_DEPENDSON QxtCore QxtNetwork)
SET(QXT_QXTZEROCONF_DEPENDSON QxtCore QxtNetwork)
SET(QXT_QXTNETWORK_DEPENDSON QxtCore)
SET(QXT_QXTQSQL_DEPENDSON QxtCore)
SET(QXT_QXTBERKELEY_DEPENDSON QxtCore)
FOREACH(mod ${QXT_MODULES})
STRING(TOUPPER ${mod} U_MOD)
FIND_PATH(QXT_${U_MOD}_INCLUDE_DIR ${mod}
PATH_SUFFIXES ${mod} include/${mod} Qxt/include/${mod} include/Qxt/${mod}
PATHS
~/Library/Frameworks/
/Library/Frameworks/
/sw/
/usr/local/
/usr
/opt/local/
/opt/csw
/opt
"C:\\"
"C:\\Program Files\\"
"C:\\Program Files(x86)\\"
NO_DEFAULT_PATH
)
FIND_LIBRARY(QXT_${U_MOD}_LIB_RELEASE NAME ${mod}
PATH_SUFFIXES Qxt/lib64 Qxt/lib lib64 lib
PATHS
/sw
/usr/local
/usr
/opt/local
/opt/csw
/opt
"C:\\"
"C:\\Program Files"
"C:\\Program Files(x86)"
NO_DEFAULT_PATH
)
FIND_LIBRARY(QXT_${U_MOD}_LIB_DEBUG NAME ${mod}d
PATH_SUFFIXES Qxt/lib64 Qxt/lib lib64 lib
PATHS
/sw
/usr/local
/usr
/opt/local
/opt/csw
/opt
"C:\\"
"C:\\Program Files"
"C:\\Program Files(x86)"
NO_DEFAULT_PATH
)
IF (QXT_${U_MOD}_LIB_RELEASE)
SET(QXT_FOUND_MODULES "${QXT_FOUND_MODULES} ${mod}")
ENDIF (QXT_${U_MOD}_LIB_RELEASE)
IF (QXT_${U_MOD}_LIB_DEBUG)
SET(QXT_FOUND_MODULES "${QXT_FOUND_MODULES} ${mod}")
ENDIF (QXT_${U_MOD}_LIB_DEBUG)
ENDFOREACH(mod)
FOREACH(mod ${QXT_MODULES})
STRING(TOUPPER ${mod} U_MOD)
IF(QXT_${U_MOD}_INCLUDE_DIR AND QXT_${U_MOD}_LIB_RELEASE)
SET(QXT_FOUND_${U_MOD} TRUE)
ENDIF(QXT_${U_MOD}_INCLUDE_DIR AND QXT_${U_MOD}_LIB_RELEASE)
ENDFOREACH(mod)
##### find and include
# To use a Qxt Library....
# SET(QXT_FIND_COMPONENTS QxtCore, QxtGui)
# ...and this will do the rest
IF( QXT_FIND_COMPONENTS )
FOREACH( component ${QXT_FIND_COMPONENTS} )
STRING( TOUPPER ${component} _COMPONENT )
SET(QXT_USE_${_COMPONENT}_COMPONENT TRUE)
ENDFOREACH( component )
ENDIF( QXT_FIND_COMPONENTS )
SET(QXT_LIBRARIES "")
SET(QXT_INCLUDE_DIRS "")
# like FindQt4.cmake, in order of dependence
FOREACH( module ${QXT_MODULES} )
STRING(TOUPPER ${module} U_MOD)
IF(QXT_USE_${U_MOD} OR QXT_DEPENDS_${U_MOD})
IF(QXT_FOUND_${U_MOD})
STRING(REPLACE "QXT" "" qxt_module_def "${U_MOD}")
ADD_DEFINITIONS(-DQXT_${qxt_module_def}_LIB)
SET(QXT_INCLUDE_DIRS ${QXT_INCLUDE_DIRS} ${QXT_${U_MOD}_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${QXT_${U_MOD}_INCLUDE_DIR})
SET(QXT_LIBRARIES ${QXT_LIBRARIES} ${QXT_${U_MOD}_LIB_RELEASE})
ELSE(QXT_FOUND_${U_MOD})
MESSAGE("Could not find Qxt Module ${module}")
RETURN()
ENDIF(QXT_FOUND_${U_MOD})
FOREACH(dep ${QXT_${U_MOD}_DEPENDSON})
STRING(TOUPPER ${dep} U_DEP)
SET(QXT_DEPENDS_${U_DEP} TRUE)
ENDFOREACH(dep)
ENDIF(QXT_USE_${U_MOD} OR QXT_DEPENDS_${U_MOD})
ENDFOREACH(module)
MESSAGE(STATUS "Found Qxt Libraries:${QXT_FOUND_MODULES}")

@ -0,0 +1,107 @@
#=============================================================================
# The lxqt_translate_desktop() function was copied from the the
# LXQt LxQtTranste.cmake
#
# Original Author: Alexander Sokolov <sokoloff.a@gmail.com>
#
# funtion lxqt_translate_desktop(_RESULT
# SOURCES <sources>
# [TRANSLATION_DIR] translation_directory
# )
# Output:
# _RESULT The generated .desktop (.desktop) files
#
# Input:
#
# SOURCES List of input desktop files (.destktop.in) to be translated
# (merged), relative to the CMakeList.txt.
#
# TRANSLATION_DIR Optional path to the directory with the .ts files,
# relative to the CMakeList.txt. Defaults to
# "translations".
#
#=============================================================================
function(lxqt_translate_desktop _RESULT)
# Parse arguments ***************************************
set(oneValueArgs TRANSLATION_DIR)
set(multiValueArgs SOURCES)
cmake_parse_arguments(_ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
# check for unknown arguments
set(_UNPARSED_ARGS ${_ARGS_UNPARSED_ARGUMENTS})
if (NOT ${_UNPARSED_ARGS} STREQUAL "")
MESSAGE(FATAL_ERROR
"Unknown arguments '${_UNPARSED_ARGS}'.\n"
"See lxqt_translate_desktop() documenation for more information.\n"
)
endif()
if (NOT DEFINED _ARGS_SOURCES)
set(${_RESULT} "" PARENT_SCOPE)
return()
else()
set(_sources ${_ARGS_SOURCES})
endif()
if (NOT DEFINED _ARGS_TRANSLATION_DIR)
set(_translationDir "translations")
else()
set(_translationDir ${_ARGS_TRANSLATION_DIR})
endif()
get_filename_component (_translationDir ${_translationDir} ABSOLUTE)
foreach (_inFile ${_sources})
get_filename_component(_inFile ${_inFile} ABSOLUTE)
get_filename_component(_fileName ${_inFile} NAME_WE)
#Extract the real extension ............
get_filename_component(_fileExt ${_inFile} EXT)
string(REPLACE ".in" "" _fileExt ${_fileExt})
#.......................................
set(_outFile "${CMAKE_CURRENT_BINARY_DIR}/${_fileName}${_fileExt}")
file(GLOB _translations
${_translationDir}/${_fileName}_*${_fileExt}
${_translationDir}/local/${_fileName}_*${_fileExt}
)
set(_pattern "'\\[.*]\\s*='")
if (_translations)
add_custom_command(OUTPUT ${_outFile}
COMMAND grep -v "'#TRANSLATIONS_DIR='" ${_inFile} > ${_outFile}
COMMAND grep -h ${_pattern} ${_translations} >> ${_outFile}
COMMENT "Generating ${_fileName}${_fileExt}"
)
else()
add_custom_command(OUTPUT ${_outFile}
COMMAND grep -v "'#TRANSLATIONS_DIR='" ${_inFile} > ${_outFile}
COMMENT "Generating ${_fileName}${_fileExt}"
)
endif()
set(__result ${__result} ${_outFile})
# TX file ***********************************************
set(_txFile "${CMAKE_BINARY_DIR}/tx/${_fileName}${_fileExt}.tx.sh")
string(REPLACE "${CMAKE_SOURCE_DIR}/" "" _tx_translationDir ${_translationDir})
string(REPLACE "${CMAKE_SOURCE_DIR}/" "" _tx_inFile ${_inFile})
string(REPLACE "." "" _fileType ${_fileExt})
file(WRITE ${_txFile}
"[ -f ${_inFile} ] || exit 0\n"
"echo '[lxde-qt.${_fileName}_${_fileType}]'\n"
"echo 'type = DESKTOP'\n"
"echo 'source_lang = en'\n"
"echo 'source_file = ${_tx_inFile}'\n"
"echo 'file_filter = ${_tx_translationDir}/${_fileName}_<lang>${_fileExt}'\n"
"echo ''\n"
)
endforeach()
set(${_RESULT} ${__result} PARENT_SCOPE)
endfunction(lxqt_translate_desktop)

@ -0,0 +1,129 @@
#=============================================================================
# Copyright 2014 Luís Pereira <luis.artur.pereira@gmail.com>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#=============================================================================
#
# funtion lxqt_translate_ts(qmFiles
# [USE_QT5 [Yes | No]]
# [UPDATE_TRANSLATIONS [Yes | No]]
# SOURCES <sources>
# [TEMPLATE] translation_template
# [TRANSLATION_DIR] translation_directory
# [INSTALL_DIR] install_directory
# )
# Output:
# qmFiles The generated compiled translations (.qm) files
#
# Input:
# USE_QT5 Optional flag to choose between Qt4 and Qt5. Defaults to Qt5
#
# UPDATE_TRANSLATIONS Optional flag. Setting it to Yes, extracts and
# compiles the translations. Setting it No, only
# compiles them.
#
# TEMPLATE Optional translations files base name. Defaults to
# ${PROJECT_NAME}. An .ts extensions is added.
#
# TRANSLATION_DIR Optional path to the directory with the .ts files,
# relative to the CMakeList.txt. Defaults to
# "translations".
#
# INSTALL_DIR Optional destination of the file compiled files (qmFiles).
# If not present no installation is performed
# CMake v2.8.3 needed to use the CMakeParseArguments module
cmake_minimum_required(VERSION 2.8.3 FATAL_ERROR)
function(lxqt_translate_ts qmFiles)
set(oneValueArgs USE_QT5 UPDATE_TRANSLATIONS TEMPLATE TRANSLATION_DIR INSTALL_DIR)
set(multiValueArgs SOURCES)
cmake_parse_arguments(TR "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if (NOT DEFINED TR_UPDATE_TRANSLATIONS)
set(TR_UPDATE_TRANSLATIONS "No")
endif()
if (NOT DEFINED TR_USE_QT5)
set(TR_USE_QT5 "Yes")
endif()
if(NOT DEFINED TR_TEMPLATE)
set(TR_TEMPLATE "${PROJECT_NAME}")
endif()
if (NOT DEFINED TR_TRANSLATION_DIR)
set(TR_TRANSLATION_DIR "translations")
endif()
file(GLOB tsFiles "${TR_TRANSLATION_DIR}/${TR_TEMPLATE}_*.ts")
set(templateFile "${TR_TRANSLATION_DIR}/${TR_TEMPLATE}.ts")
if(TR_USE_QT5)
# Qt5
if (TR_UPDATE_TRANSLATIONS)
qt5_create_translation(QMS
${TR_SOURCES}
${templateFile}
OPTIONS -locations absolute
)
qt5_create_translation(QM
${TR_SOURCES}
${tsFiles}
OPTIONS -locations absolute
)
else()
qt5_add_translation(QM ${tsFiles})
endif()
else()
# Qt4
if(TR_UPDATE_TRANSLATIONS)
qt4_create_translation(QMS
${TR_SOURCES}
${templateFile}
OPTIONS -locations absolute
)
qt4_create_translation(QM
${TR_SOURCES}
${tsFiles}
OPTIONS -locations absolute
)
else()
qt4_add_translation(QM ${tsFiles})
endif()
endif()
if(TR_UPDATE_TRANSLATIONS)
add_custom_target("update_${TR_TEMPLATE}_ts" ALL DEPENDS ${QMS})
endif()
if(DEFINED TR_INSTALL_DIR)
install(FILES ${QM} DESTINATION ${TR_INSTALL_DIR})
endif()
set(${qmFiles} ${QM} PARENT_SCOPE)
endfunction()

@ -0,0 +1,49 @@
#=============================================================================
# Copyright 2014 Luís Pereira <luis.artur.pereira@gmail.com>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#=============================================================================
#
# These functions enables "automatic" translation loading in Qt5 apps
# and libs. They generate a .cpp file that takes care of everything. The
# user doesn't have to do anything in the source code.
#
# qt5_translation_loader(<source_files> <translations_dir> <catalog_name>)
#
# Output:
# <source_files> Appends the generated file to this variable.
#
# Input:
# <translations_dir> Full path name to the translations dir.
# <catalog_name> Translation catalog to be loaded.
set(__CURRENT_DIR ${CMAKE_CURRENT_LIST_DIR})
function(qt5_translation_loader source_files translations_dir catalog_name)
configure_file(
${__CURRENT_DIR}/Qt5TranslationLoader.cpp.in
Qt5TranslationLoader.cpp @ONLY
)
set(${source_files} ${${source_files}} ${CMAKE_CURRENT_BINARY_DIR}/Qt5TranslationLoader.cpp PARENT_SCOPE)
endfunction()

@ -0,0 +1,33 @@
/* This file has been generated by the CMake qt_translation_loader().
* It loads Qt application translations.
*
* Attention: All changes will be overwritten!!!
*/
#include <QCoreApplication>
#include <QLocale>
#include <QTranslator>
#include <QLibraryInfo>
static void loadQtTranslation()
{
QString locale = QLocale::system().name();
QTranslator *qtTranslator = new QTranslator(qApp);
if (qtTranslator->load("qt_" + locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath))) {
qApp->installTranslator(qtTranslator);
} else {
delete qtTranslator;
}
QTranslator *appTranslator = new QTranslator(qApp);
if (appTranslator->load(QString("@translations_dir@/@catalog_name@_%1.qm").arg(locale))) {
QCoreApplication::installTranslator(appTranslator);
} else if (locale == QLatin1String("C") ||
locale.startsWith(QLatin1String("en"))) {
// English is the default. It's translated anyway.
delete appTranslator;
}
}
Q_COREAPP_STARTUP_FUNCTION(loadQtTranslation)

@ -0,0 +1,142 @@
/** BASIC */
body {
text-align: justify;
font-family: Georgia, "Times New Roman", Times, serif;
color: #333333;
}
h1, h2, h3 {
text-transform: lowercase;
color: #000099;
}
ul {
margin-left: 0px;
padding-left: 1em;
list-style-position: inside;
}
a {
color: #000099;
}
a:hover {
text-decoration: none;
color: #990000;
}
/** HEADER */
#header {
width: 1000px;
height: 60px;
margin: 0px auto;
}
#header #version {
/* width: 1000px;
height: 60px;
margin: 0px auto; */
font-weight: bolder;
float: left;
margin: 0px;
padding: 35px 0px 0px 10px;
}
#header h1 {
float: left;
margin: 0px;
padding: 20px 0px 0px 0px;
}
#header h2 {
float: right;
margin: 0px;
padding: 27px 0px 0px 0px;
}
/** MENU */
#menu {
width: 1000px;
height: 1.5em;
margin: 0px auto;
border: 1px solid #000099;
}
#menu ul {
margin: 0px;
padding: 0px;
list-style: none;
float:right;
}
#menu li {
display: inline;
}
#menu a {
display: block;
float: left;
padding: 3px 10px;
border-right: 1px solid #000099;
text-decoration: none;
}
#menu a:hover {
background: #000099;
color: #FFFFFF;
}
/** CONTENT */
#content {
width: 1000px;
margin: 0px auto;
}
#content h2 {
font-weight: normal;
}
h2 a {
font-size: 60%;
font-weight: lighter;
}
#left {
float: left;
width: 780px;
}
#left #center{
text-align:center;
}
#right {
float: right;
width: 200px;
}
#right h2{
text-align: right;
}
/** FOOTER */
#footer {
clear: both;
width: 980px;
margin: 0px auto;
padding: 5px 10px;
border: 1px solid #000099;
}
#footer p {
margin: 0px;
padding: 0px;
font-size: x-small;
}

@ -0,0 +1,444 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>ScreenGrab -- Fast creation of screenshots</title>
<link href="../default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<a name='main'></a>
<div id="header">
<h1>ScreenGrab</h1> <div id="version">version 1.0</div>
<!--<h2>By DOOMer</h2>-->
</div>
<div id="menu">
<ul>
<li><a href="#main">Description</a></li>
<li><a href="#usage">Usage</a></li>
<li><a href="#license">License</a></li>
<li><a href="#versions">Version history</a></li>
</ul>
</div>
<div id="content">
<div id="left">
<h2>ScreenGrab - fast creation of screenshots</h2>
<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.
</p>
<p>
Main features:
</p>
<ul>
<li>Supports Windows & Linux</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>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
(from 1 to 90 seconds)</li>
<li>Hide the main window (with recovery) at the time of the screenshot</li>
<li>Ability to minimize ScreenGrab to the system tray, and
control it via a context menu</li>
<li>Getting screenshots using global shortcuts</li>
<li>Auto-save screenshot when captured</li>
<li>Ability to insert the current date and time in the filename when saving it</li>
</ul>
<a name='usage'></a>
<h2>Usage <a href='#main'>To start page</a></h2>
<p>
It is very simple.
</p>
<p>
On the first run ScreenGrab captures the current state of your desktop.
The preview screen is displayed in the main window.
All management of the program can be carried out through the buttons in the main window or in the context menu of ScreenGrab, which can be accessed by a right-mouse-click on the ScreenGrab icon in the notification area of the desktop.
</p>
<p>
Buttons in main window:
</p>
<ul>
<li><b>New Screen</b> [Ctrl+N] -- Take a new screenshot</li>
<li><b>Save Screen</b> [Ctrl+S] -- Write a captured screenshot
on your hard disk (in PNG or JPEG format).</li>
<li><b>Copy Screen</b> [Ctrl+C] -- Copy a screenshot to the clipboard.</li>
<!-- <li><b>Upload</b> - upload screenshots on several image hosting services, currently ScreenGrab supports <a href='http://mediacru.sh/' target='_blank'>mediacru.sh</a>, <a href='imgur.com/' target='_blank'>http://imgur.com</a> and <a href='http://imageshack.us/' target='_blank'>imageshack.us</a>, in the future, the list will be expanded.</li> -->
<li><b>Edit in ...</b> -- Open and edit screenshots in an image editor.
<br />
<br />
<u>NOTE:</u> In the current version for Microsoft Windows only MS Paint is supported.
<br />
<br />
</li>
<li><b>Options</b> [Ctrl+O] -- Show program options window.</li>
<li><b>Help</b> [Ctrl+H] -- Access help and information about ScreenGrab, its developer and license.</li>
<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.
</p>
<p>
Additional controls, located in main window.
</p>
<ul>
<li><b>Delay</b> -- Delay in seconds before grabbing the screen.</li>
<li><b>Type</b> -- Type of grabbing [full screen
or active window]. </li>
</ul>
<p>
<b><u>Main settings:</u></b>
</p>
<ul>
<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>
</ul>
<p>
<b><u>Advanced settings:</u></b>
</p>
<ul>
<li><b>Insert DateTime in filename</b> -- Insert date and time in the filename to be saved
<br />
<br />These expressions may be used for the date part of the format string:
<br />
<table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Parameter</th><th>Output</th></tr></thead>
<tr valign="top" class="odd"><td>d</td><td>Day as number without a leading zero (1 to 31)</td></tr>
<tr valign="top" class="even"><td>dd</td><td>Day as number with a leading zero (01 to 31)</td></tr>
<tr valign="top" class="odd"><td>ddd</td><td>Abbreviated localized day name (e.g. 'Mon' to 'Sun'). </td></tr>
<tr valign="top" class="even"><td>dddd</td><td>Long localized day name (e.g. 'Monday' to 'Sunday').</td></tr>
<tr valign="top" class="odd"><td>M</td><td>Month as number without a leading zero (1-12)</td></tr>
<tr valign="top" class="even"><td>MM</td><td>Month as number with a leading zero (01-12)</td></tr>
<tr valign="top" class="odd"><td>MMM</td><td>Abbreviated localized month name (e.g. 'Jan' to 'Dec'). </td></tr>
<tr valign="top" class="even"><td>MMMM</td><td>Long localized month name (e.g. 'January' to 'December'). </td></tr>
<tr valign="top" class="odd"><td>yy</td><td>Year as two digit number (00-99)</td></tr>
<tr valign="top" class="even"><td>yyyy</td><td>Year as four digit number</td></tr>
</table>
<br />
<br />These expressions may be used for the time part of the format string:
<br />
<table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Parameter</th><th>Output</th></tr></thead>
<tr valign="top" class="odd"><td>h</td><td>Hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)</td></tr>
<tr valign="top" class="even"><td>hh</td><td>Hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)</td></tr>
<tr valign="top" class="odd"><td>H</td><td>Hour without a leading zero (0 to 23, even with AM/PM display)</td></tr>
<tr valign="top" class="even"><td>HH</td><td>Hour with a leading zero (00 to 23, even with AM/PM display)</td></tr>
<tr valign="top" class="odd"><td>m</td><td>Minute without a leading zero (0 to 59)</td></tr>
<tr valign="top" class="even"><td>mm</td><td>Minute with a leading zero (00 to 59)</td></tr>
<tr valign="top" class="odd"><td>s</td><td>Second without a leading zero (0 to 59)</td></tr>
<tr valign="top" class="even"><td>ss</td><td>Second with a leading zero (00 to 59)</td></tr>
<tr valign="top" class="odd"><td>z</td><td>Milliseconds without leading zeroes (0 to 999)</td></tr>
<tr valign="top" class="even"><td>zzz</td><td>Milliseconds with leading zeroes (000 to 999)</td></tr>
<tr valign="top" class="odd"><td>AP or A</td><td>Interpret as an AM/PM time. <i>AP</i> must be either "AM" or "PM".</td></tr>
<tr valign="top" class="even"><td>ap or a</td><td>Interpret as an AM/PM time. <i>ap</i> must be either "am" or "pm".</td></tr>
</table>
<br />
</li>
<li><b>Autosave screen</b> -- Automatically save
the screenshot in the grab process</li>
<li><b>Save first screenshot</b> -- enabled | disabled automatically saves the first screenshot, which is captured on program start</li>
<li><b>Filenames to clipboard on saving</b> -- Send the name of the saved file to the clipboard . You can select these parameters:</li>
<ul>
<li><b>No copy</b> - The name of saved file will not be transferred to the clipboard.</li>
<li><b>Only filename</b> - Send only the file name to the clipboard.</li>
<li><b>Full path to file</b> - Send the full path to the file to the clipboard.</li>
</ul>
<li><b>Allow multiple copies</b> -- Allow run multiple copies of ScreenGrab.</li>
<li><b>Enable external viewer</b> -- Enable or disable the preview of the screenshot in the default image viewer (by double click on screenshot area in the main window).</li>
</ul>
<p>
<b><u>Display settings:</u></b>
</p>
<ul>
<li><b>Save window size on exit</b> -- Save the current size of main window
when exiting ScreenGrab (and restore it at next run)</li>
<li><b>Zoom area around mouse in selection mode</b> -- Display the magnified area around the mouse pointer when receiving a screenshot of a selected area.</li>
</ul>
<p>
<b><u>System tray settings:</u></b>
</p>
<ul>
<li><b>Use tray</b> -- Use the notification area (system tray) of the operating system (desktop environment) for displaying messages and application management.</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
by click on the close window button.</li>
</ul>
<p>
<u><b>Shortcut Settings:</u></b>
</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.
</p>
<p>
Local duplicate actions performed by pressing the button in the main window. They will only work when the ScreenGrab main window is active.
</p>
<p>
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>
</p>
<ul>
<li><b>--fullscreen</b> -- Set the fullscreen mode [default].</li>
<li><b>--active</b> -- Set the active window mode.</li>
<li><b>--region</b> -- Set the screen region select mode.</li>
<li><b>--minimized</b> -- Open ScreenGrab minimized in the tray (or taskbar, if tray is disabled).</li>
<li><b>--upload</b> -- Automatically upload a screenshot to the selected image hosting service and display the direct link to the image after completion.</li>
<li><b>--version</b> -- Display version information [Linux only].</li>
<li><b>--help</b> -- Display command line parameters information [Linux only].</li>
</ul>
<a name='license'></a>
<h2>License <a href='#main'>To start page</a></h2>
<p>
<strong>Copyright:</strong>
</p>
<p>
Artem 'DOOMer' Galichkin <a href=mailto:doomer3d@gmail.com>doomer3d@gmail.com</a>
</p>
<p>
<strong>License:</strong>
</p>
<p>
ScreenGrab is a freeware licensed by <a href=http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
target=_blank>GNU General Public License version 2</a>
</p>
<p>
<strong>Thanks to:</strong>
</p>
<p>
<strong>Translators:</strong>
</p>
<ul>
<li><strong>Marcio Moraes</strong> -- Brazilian Portuguese translation</strong> </li>
<li><strong>Gennadi Motsyo</strong> -- Ukrainian translation</strong> </li>
</ul>
<p>
<strong>Beta-testers:</strong>
</p>
<ul>
<li><strong>Alexantia</strong> </li>
<li><strong>iNight</strong> </li>
</ul>
<p>
And all those who use ScreenGrab :)
</p>
<a name='versions'></a>
<h2>Version history <a href='#main'>To start page</a></h2>
<p>
<strong>Version 1.2:</strong>
</p>
<ul>
<li>Added ability for autosaving type of the last created screenshot.</li>
<li>Some small fixes.</li>
</ul>
<p>
<strong>Version 1.1.1:</strong>
</p>
<ul>
<li>Fixed wrong 'imgur' uploading result string for bb-code with preview.</li>
<li>Fixed segfault when exist configuration file contains "showTrayIcon=false".</li>
</ul>
<p>
<strong>Version 1.1:</strong>
</p>
<ul>
<li>Added ability to upload to MediaCrush (http://mediacru.sh).</li>
<li>Option "Always save the window size" replaced by "autosave window size on exit ScreenGrab".</li>
<li>Reworked main window UI (the order of the buttons).</li>
<li>Reworked the configuration dialog (some UI elements moved between sections, and increment count of the sections).</li>
</ul>
<p>
<strong>Version 1.0:</strong>
</p>
<ul>
<li>Fixed dual monitor support</li>
<li>Added XDG_CONFIG_HOME support, by a build option SG_XDG_CONFIG_SUPPORT</li>
<li>Added ability to upload to some image hosting services (imgur.com and imgshack.us)</li>
<li>Added build option for compiling without the upload feature (SG_EXT_UPLOADS build option)</li>
<li>Added "Previous selection" mode</li>
<li>Added ability to edit a screenshot in an external editor</li>
<li>Added option for preview screenshot in default image viewer by double click on screenshot area</li>
<li>Fixed non-minimize main window on &quot;Exit&quot; shortcut, when using &quot;Minimize to tray&quot; option</li>
<li>Fixed bug with cutting button text on main window</li>
<li>Fixed regression with not capture screenshot when a second instance of ScreenGrab is running</li>
<li>Fixed bug with not creating the path to autosave screenshots (when it is typed in manually in configuration dialog)</li>
<li>Added build option SG_GLOBALSHORTCUTS for turning on/off build with global shortcuts support</li>
<li>Autoincrement filenames when saving screenshots in manual mode (in one running session)</li>
<li>Added the ability to customise shortcuts to close the application</li>
<li>Added ability to run ScreenGrab minimized to tray (or taskbar, if tray is disabled) with "--minimized" command line option</li>
<li>Added ability to automatically upload the screenshot via the command line "--upload" parameter</li>
</ul>
<p>
<strong>Version 0.9.1:</strong>
</p>
<ul>
<li>Fixed non-switching combo-box "Type of Screeen" when grab screenshot from signal by another instance</li>
<li>Fixed incorect grab active window screens in GNOME (when disabled "Allow multiple copies" option and run another instance) </li>
</ul>
<p>
<strong>Version 0.9:</strong>
</p>
<ul>
<li>added global shortcuts </li>
<li>added option for enable|disable system tray </li>
<li>added switch to the already running instance of an application when you start a second instance (non-operating mode to allow multiple instances) </li>
<li>added autosave first screenshot which has been taken on application start (enabled | disabled optional) </li>
<li>redesign config dialog UI </li>
</ul>
<p>
<p>
<strong>Version 0.8.1:</strong>
</p>
<ul>
<li>[Linux] fixed incorrect selection of the default saving format in the KDE 4.4.x save file dialog </li>
<li>added de_DE translation</li>
</ul>
<p>
<strong>Version 0.8:</strong>
</p>
<ul>
<li>added command line parameters
for grab modes (fullscren, active window, selection area) </li>
<li>added BMP support </li>
<li>added Brazilian Portuguese translation </li>
<li>added automatically hiding main window on grab process </li>
<li>[Linux] fixed grab active window screenshot without decorations </li>
<li>[Linux] add option "no window decoration" </li>
<li>added shortcuts for main window buttons </li>
</ul>
<p>
<strong>Version 0.6.2 [Linux only]:</strong>
</p>
<ul>
<li>fixed non-translated tray menu (closed issue #7) </li>
</ul>
<p>
<strong>Version 0.6.1 [Linux only]:</strong>
</p>
<ul>
<li>fixed incorrect detection of the system language in some Linux distributions </li>
</ul>
<p>
<strong>Version 0.6:</strong>
</p>
<ul>
<li>default value of hiding main window changed to true </li>
<li>added input template for inserting date-time into the saved filename </li>
<li>added zoom around mouse cursor in area selection mode </li>
<li>small modifications of the configuration dialog </li>
<li>added html help info (English & Russian) </li>
</ul>
<p>
<strong>Version 0.5:</strong>
</p>
<ul>
<li>added inserting date|time in saving filename [optional] </li>
<li>added auto saving screenshots in grabbing process [option] </li>
<li>added option to change the time of displaying tray messages [1 - 10 sec] </li>
<li>added help info </li>
<li>added tool tips for the UI elements </li>
<li>small fixes config file syntax </li>
</ul>
<p>
<strong>Version 0.4:</strong>
</p>
<ul>
<li>added grabbing selection screen area </li>
<li>added ability to copy image files into the clipboard </li>
<li>added saving size of main window on exit [default is turned off] </li>
<li>halve the memory size occupied by ScreenGrab at startup </li>
<li>[win32] fixed bug with storing the screengrab.ini file </li>
<li>change structure of some source code (work with config data) </li>
<li>change buttons tab order of main window </li>
<li>new application icon </li>
<li>some fixes </li>
</ul>
<p>
<strong>Version 0.3.1:</strong>
</p>
<ul>
<li>fixed bug with non-displayed main window icon </li>
</ul>
<p>
<strong>Version 0.3:</strong>
</p>
<ul>
<li>main window is now based on ui-file (remaked UI) </li>
<li>added grabbing active window </li>
<li>added option to allow running multiple instances of ScreenGrab </li>
<li>added option to select between minimizing to tray and closing
(by close window button).</li>
</ul>
<p>
<strong>Version 0.2:</strong>
</p>
<ul>
<li>added JPEG support</li>
<li>added options dialog</li>
<li>added option to select a default directory for saving the files </li>
<li>added option to select a default filename </li>
<li>added option to select a default image format </li>
<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>
</ul>
<p>x
<strong>Version 0.1:</strong>
</p>
<ul>
<li>first public version</li>
<li>added system tray icon and menu</li>
<li>added option to hide ScreenGrab in systray </li>
<li>added option to block running a second instance of ScreenGrab</li>
</ul>
<p>
<strong>Version 0.0.3:</strong>
</p>
<ul>
<li>first working build with minimal features.</li>
</ul>
</div>
</div>
<div id="footer">
<p>Copyright &copy; 2009 - 2013, <a href="http://mapper.ru/" class="link1">DOOMer</a></p>
</div>
</body>
</html>

@ -0,0 +1,435 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>ScreenGrab -- programa para captura rápida de imagens</title>
<link href="../default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<a name='main'></a>
<div id="header">
<h1>ScreenGrab</h1> <div id="version">versão 1.0</div>
<!--<h2>By DOOMer</h2>-->
</div>
<div id="menu">
<ul>
<li><a href="#main">Descrição</a></li>
<li><a href="#usage">Uso</a></li>
<li><a href="#license">Licença</a></li>
<li><a href="#versions">Histórico das versões</a></li>
</ul>
</div>
<div id="content">
<div id="left">
<h2>ScreenGrab - rápida criação de capturas de telas</h2>
<p>
Esta é uma aplicação multi-plataforma projetada para obter rapidamente capturas de telas.
O ScreenGrab foi criado usando o Framework Qt, graças a qual o programa pode trabalhar no
Microsoft Windows e GNU/Linux.
</p>
<p>
Principais características:
</p>
<ul>
<li>Funciona no Windows &amp; Linux</li>
<li>Obtém captura de telas do desktop</li>
<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>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
(de 1 até 90 segundos)</li>
<li>Ocultando a janela principal (com recuperação) do
ScreenGrab no momento da captura de tela</li>
<li>Habilidade para minimizar o programa para a área de notificação do sistema, e
controlá-lo via menu de contexto</li>
<li>Obtém a captura de tela usando atalhos globais</li>
<li>Salva automaticamente a captura de tela ao ser recebido</li>
<li>Habilidade de inserir data e hora no nome do arquivo e salvar</li>
</ul>
<a name='usage'></a>
<h2>Uso <a href='#main'>Para o início da página</a></h2>
<p>
É muito simples.
</p>
<p>
Na primeira execução do programa, obtém-se o estado atual do seu desktop.
É mostrada a tela atual na janela principal.
Todo o gerenciamento do programa pode ser realizado
através dos botões ou pelo menu de contexto na área de notificação do desktop.
</p>
<p>
Botões na janela principal:
</p>
<ul>
<li><b>Nova tela</b> [Ctrl+N] -- obtém nova captura de tela.</li>
<li><b>Salvar tela</b> [Ctrl+S] -- salva a captura da tela obtida no disco rígido (no formato PNG ou JPEG).</li>
<li><b>Copiar tela</b> [Ctrl+C] -- copia tela para a área de transferência.</li>
<li><b>Upload</b> - upload screenshots on several image hosting services, currently ScreenGrab supports <a href='http://mediacru.sh/' target='_blank'>mediacru.sh</a>, <a href='http://imgur.com/' target='_blank'>imgur.com</a> and <a href='http://imageshack.us/' target='_blank'>imageshack.us</a>, in the future, the list will be expanded.</li>
<li><b>Edit in ...</b> - the ability to open (and edit) screenshots in an image editor.
<br />
<br />
<u>NOTE:</u> In the current version for Microsoft Windows only MS Paint is supported.
</li>
<li><b>Opções</b> [Ctrl+O] -- mostra a janela de opções do programa.</li>
<li><b>Ajuda</b> [Ctrl+H] -- exibe informações de ajuda e exibe informações sobre o ScreenGrab, desenvolvedor e licença.</li>
<li><b>Sair</b> [Ctrl+Q] -- sai do programa.</li>
</ul>
<p>
Estes botões também estão disponíveis no menu do programa na área de notficação do sistema.
</p>
<p>
Controles adicionais, localizado na janela principal.
</p>
<ul>
<li><b>Atraso</b> -- atrasa em segundos antes de capturar a tela.</li>
<li><b>Tipo</b> -- tipo de obtenção [tela cheia
ou janela ativa]. </li>
</ul>
<p>
<b><u>Configurações principais:</u></b>
</p>
<ul>
<li><b>Diretório padrão</b> -- diretório padrão para salvar as capturas de telas.</li>
<li><b>Nome do arquivo padrão</b> -- nome do arquivo salvo por padrão.</li>
<li><b>Formato</b> -- padrão do formato da imagem salva (você pode selecionar outro formato ao salvar).</li>
<li><b>Nenhuma decoração da janela</b> -- captura a janela ativa sem as decoraçãos da janela (only for linux version).</li>
</ul>
<p>
<b><u>Configurações avançadas:</u></b>
</p>
<ul>
<li><b>Inserir Data/Hora no nome do arquivo</b> -- inseri data e hora no nome do arquivo salvo.
<br />
<br />Estas expressões podem ser utilizadas como parte dos caracteres do formato da data::
<br />
<table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Saída das</th><th>expressões</th></tr></thead>
<tr valign="top" class="odd"><td>d</td><td>o dia como número sem um zero à esquerda (1 a 31)</td></tr>
<tr valign="top" class="even"><td>dd</td><td>o dia como número com um zero à esquerda (01 a 31)</td></tr>
<tr valign="top" class="odd"><td>ddd</td><td>o nome abreviado do dia localizado. (ex. 'Seg' a 'Dog')</td></tr>
<tr valign="top" class="even"><td>dddd</td><td>o nome longo do dia localizado (ex. 'Segunda' a 'Domingo')</td></tr>
<tr valign="top" class="odd"><td>M</td><td>o mês como número sem um zero à esquerda (1-12)</td></tr>
<tr valign="top" class="even"><td>MM</td><td>o mês como número com um zero à esquerda (01-12)</td></tr>
<tr valign="top" class="odd"><td>MMM</td><td>o nome abrevido do mês localizado (ex. 'Jan' a 'Dez')</td></tr>
<tr valign="top" class="even"><td>MMMM</td><td>o nome longo do mês localizado (ex. 'Janeiro' a 'Dezembro')</td></tr>
<tr valign="top" class="odd"><td>yy</td><td>o ano como número de dois dígitos (00-99)</td></tr>
<tr valign="top" class="even"><td>yyyy</td><td>o ano como número de quatro dígitos</td></tr>
</table>
<br />
<br />Estas exepressões podem ser utilizadas como parte dos caracteres do formato da hora::
<br /><br />
<table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Saída das</th><th>expressões</th></tr></thead>
<tr valign="top" class="odd"><td>h</td><td>a hora sem um zero à esquerda (0 a 23 ou 1 a 12 se AM/PM for exibido)</td></tr>
<tr valign="top" class="even"><td>hh</td><td>a hora com um zero à esquerda (00 a 23 ou 01 a 12 se AM/PM for exibido)</td></tr>
<tr valign="top" class="odd"><td>H</td><td>a hora sem um zero à esquerda (0 a 23, até quando AM/PM for exibido)</td></tr>
<tr valign="top" class="even"><td>HH</td><td>a hora com um zero à esquerda (00 a 23, até quando AM/PM for exibido)</td></tr>
<tr valign="top" class="odd"><td>m</td><td>o minuto sem um zero à esquerda (0 a 59)</td></tr>
<tr valign="top" class="even"><td>mm</td><td>o minuto com um zero à esquerda (00 a 59)</td></tr>
<tr valign="top" class="odd"><td>s</td><td>o segunddo sem um zero à esquerda (0 a 59)</td></tr>
<tr valign="top" class="even"><td>ss</td><td>o segundo com um zero à esquerda (00 a 59)</td></tr>
<tr valign="top" class="odd"><td>z</td><td>os milisegundos sem unz zeros à esquerda (0 a 999)</td></tr>
<tr valign="top" class="even"><td>zzz</td><td>os milisegundos com unz zeros à esquerda (000 a 999)</td></tr>
<tr valign="top" class="odd"><td>AP ou A</td><td>interpreta com uma hora AM/PM. <i>AP</i> deve ser um "AM" or "PM"</td></tr>
<tr valign="top" class="even"><td>ap ou a</td><td>interpreta com uma hora AM/PM. <i>ap</i> deve ser um "am" ou "pm"</td></tr>
</table>
<br />
</li>
<li><b>Auto-salvar tela</b> -- salva automaticamente capturas de telas no processo de captura.</li>
<li><b>Salvar a primeira captura de tela</b> -- habilitado | desabilitado automaticamente ao salvar a primeira captura de tela, que se obtém ao executar o programa.</li>
<li><b>Filenames to clipboard on saving</b> - send to the clipboard name of the saved file. You can select these params:</li>
<ul>
<li><b>No copy</b> - the name of saved file will not be transferred to the clipboard.</li>
<li><b>Only filename</b> - send to the clipboard only the file name.</li>
<li><b>Full path to file</b> - send to the clipboard full path to the file.</li>
</ul>
<li><b>Permitir múltiplas instâncias</b> -- permite executar múltiplas instâncias do ScreenGrab.</li>
<li><b>Enable external viewer</b> -- enable or disable ability for preview screenshot in default image viewer (by double click on screenshot area in main window).</li>
</ul>
<p>
<b><u>Exibir configurações:</u></b>
</p>
<ul>
<li><b>Salvar o tamanho da janela ao sair</b> -- salva o tamanho da janela principal ao sair (e restaura na próxima execução).</li>
<li><b>Zoom da área ao redor do mouse no modo de seleção</b> -- a capacidade de exibir a área ampliada em torno do ponteiro do mouse ao receber uma tela de área selecionada.</li>
</ul>
<p>
<b><u>Configurações da área de notificação dos sistema:</u></b>
</p>
<ul>
<li><b>Usar a área de notificação</b> -- usar a área de notificação (system tray) do sistema operacional (ambiente de trabalho) para mostrar as mensagens e gerenciar o programa.
<li><b>Mensagens na área de notificação</b> -- modo de exibir as mensagens na área de notificação ao tirar|salvar os eventos. Pode ser "nenhum" ou "ocultar" ou "sempre".</li>
<li><b>Tempo de exibição das mensagens na área de notificação</b> -- tempo em que as mensagens são exibidas.</li>
<li><b>Fechar para área de notificação</b> -- minimiza a janela principal para a área de notificação ao clicar no botão fechar da janela.</li>
</ul>
<p>
<u><b>configurações dos atalhos:</u></b>
</p>
<p>
Na aba "Atalhos" na janela opções, você pode definir teclas de atalho para o acesso rápido das funções do programa. Existem dois tipos de combinações de teclas usadas no Screengrab - local e global.
</p>
<p>
Local duplica as ações executadas ao pressionar o botão na janela principal. Eles só funcionam quando a janela principal do Screengrab está ativa.
</p>
<p>
Atalhos globais podem ser usados para se obter uma nova captura de tela, ao trabalhar com outra aplicação no seu sistema operacional.
</p>
<p>
<u><b>Parâmetros da linha de comando:</u></b>
</p>
<ul>
<li><b>--fullscreen</b> -- define o modo tela cheia [padrão].</li>
<li><b>--active</b> -- define o modo janela ativa.</li>
<li><b>--region</b> -- define o modo selecionar área da tela.</li>
<li><b>--minimized</b> -- run in minimized to the tray (or taskar, if tray is disabled).</li>
<li><b>--upload</b> -- automatically uploading screenshot on selected image hosting. And display after it direct link to image.</li>
<li><b>--version</b> -- exibe informações da versão {somente linux].</li>
<li><b>--help</b> -- mostra informações dos parâmetros de linha de comando {somente linux].</li>
</ul>
<a name='license'></a>
<h2>Licença <a href='#main'>Para o início da página</a></h2>
<p>
<strong>Copyright:</strong>
</p>
<p>
Artem 'DOOMer' Galichkin <a href=mailto:doomer3d@gmail.com>doomer3d@gmail.com</a>
</p>
<p>
<strong>Licença:</strong>
</p>
<p>
ScreenGrab é um freeware licenciado sob os termos da <a href=http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
target=_blank>Licença Pública Geral GNU versão 2</a>
</p>
<p>
<strong>Agradecimentos aos:</strong>:
</p>
<p>
<strong>Tradutores:</strong>
</p>
<ul>
<li><strong>Márcio Moraes</strong> -- Tradução para o Português do Brasil</strong> </li>
<li><strong>Gennadi Motsyo</strong> -- Tradução para o Ucraniano</strong> </li>
</ul>
<p>
<strong>Beta-testers:</strong>
<ul>
<li><strong>Alexantia</strong> </li>
<li><strong>iNight</strong> </li>
</ul>
<p>
E a todos aqueles que utilizam ScreenGrab :)
</p>
<a name='versions'></a>
<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>
<ul>
<li>Added ability for autosaving type of the last created screenshot.</li>
<li>Some small fixes.</li>
</ul>
<p>
<strong>Version 1.1.1:</strong>
</p>
<ul>
<li>Fixed wrong 'imgur' uploading result string for bb-code with preview.</li>
<li>Fixed segfault when exist configuration file contains "showTrayIcon=false".</li>
</ul>
<p>
<strong>Version 1.1:</strong>
</p>
<ul>
<li>Added ability to upload to MediaCrush (http://mediacru.sh).</li>
<li>Option "Always save the window size" replaced by "autosave window size on exit ScreenGrab".</li>
<li>Reworked main window UI (the order of the buttons).</li>
<li>Reworked the configuration dialog (some UI elements moved between sections, and increment count of the sections).</li>
</ul>
<p>
<strong>Versão 1.0:</strong>
</p>
<ul>
<li>Fixed dual monitor support</li>
<li>Added XDG_CONFIG_HOME support, by a build option SG_XDG_CONFIG_SUPPORT</li>
<li>Added ability to upload to some image hosts (imgur.com and imgshack.us)</li>
<li>Added build option for compile without upload feature (SG_EXT_UPLOADS bulld option)</li>
<li>Added "Previous selection" mode</li>
<li>Added ability to edit screenshot in external editor</li>
<li>Added option for preview screenshot in default image viewer by double click on screenshot area</li>
<li>Fixed non-minimize main window on &quot;Exit&quot; shortcut, when use &quot;Minimize to tray&quot; option</li>
<li>Fixed bug with cut button text on mainwindow</li>
<li>Fixed regression with not capture screenshot when second instance running</li>
<li>Fixed bug with not create path to autosave screenshots (when it is typed manually in configuration dialog)</li>
<li>Added build option SG_GLOBALSHORTCUTS for turn on/off build with global shortcuts support</li>
<li>Autoincrement filenames when saving screenshots in manual mode (in one running session)</li>
<li>Added the ability to customize shortcut to close the application</li>
<li>Added ability to run in minimized to tray (or taskar, if tray is disabled) with "--minimized" comand line option</li>
<li>Added ability to automatically upload the screenshot via the command line "--upload" param</li>
</ul>
<p>
<strong>Versão 0.9.1:</strong>
</p>
<ul>
<li>Corrigido a não-mudança da caixa de combinação "Tipo de Screeen" quando obtido a captura de tela a partir de um sinal por outra instância do programa.</li>
<li>Corrigida a incorreta captura de tela da janela ativa no GNOME (quando desativada a opção "Permitir múltiplas cópias" e executar outra instância do programa).</li>
</ul>
<p>
<strong>Versão 0.9:</strong>
</p>
<ul>
<li>adicionados atalhos globais. </li>
<li>adicionado a opção habilitar|desabilitar na área de notificação do sistema. </li>
<li>adicionado alternar para a instância já em execução do programa quando você iniciar uma segunda instância (modo de operação não permitir múltiplas instâncias). </li>
<li>adicionado salvar automaticmente a primeira captura de tela que foi obtida no início do programa (ocional habilitar | desabilitar). </li>
<li>redesenhada a interface do diálogo de configuração. </li>
</ul>
<p>
<p>
<strong>Versão 0.8.1:</strong>
</p>
<ul>
<li>[Linux] corrigido a incorreta seleção padrão ao salvar o formato no KDE 4.4.x no diálogo salvar arquivo. </li>
<li>adicionada a tradução de_DE. </li>
</ul>
<p>
<p>
<strong>Versão 0.8:</strong>
</p>
<ul>
<li>adicionado parâmetros de linha de comando
para obtenção dos modos (tela cheia, janela ativa, área da seleção). </li>
<li>adicionado o suporte a BMP. </li>
<li>adicionado a tradução para o Português do Brasil. </li>
<li>adicionado ocultando automaticamente janela principal no processo de captura. </li>
<li>{linux] corrigido obtenção da captura da janela sem decorações. </li>
<li>[linux] adicionado opção "sem decoração da janela". </li>
<li>adicionado atalhos para os botões da janela principal. </li>
</ul>
<p>
<strong>Versão 0.6.2 [Somente Linux]:</strong>
</p>
<ul>
<li>corrigido o não traduzido menu da área de notificação (publicação fechada #7). </li>
</ul>
<p>
<strong>Versão 0.6.1 [Somente Linux]:</strong>
</p>
<ul>
<li>corrido a incorreta detecção do idioma do sistema em algumas distribuições Linux. </li>
</ul>
<p>
<strong>Versão 0.6:</strong>
</p>
<ul>
<li>o valor padrão de "ocultar janela principal" foi alterado para true (ativado).</li>
<li>adicionado entrada modelo para inserir data-hora no nome do arquivo salvo.</li>
<li>adicionado zoom ao redor do cursor do mouse no modo de seleção de área.</li>
<li>pequena moficaição no diálogo de configuração.</li>
<li>adicionado ajuda html em (inglês & russo).</li>
</ul>
<p>
<strong>Versão 0.5:</strong>
</p>
<ul>
<li>adicionado inserir data|hora ao salvar nome do arquivo [opcional].</li>
<li>adicionado auto salvar telas no processo de obtenção [opção].</li>
<li>adicionado alterar tempo de exibição das mensagenas na área de notificação [1 - 10 src].</li>
<li>adicionado informações de ajuda.</li>
<li>adicionado dicas de ferramentas para os elementos UI.</li>
<li>pequenas correções na sintaxe do arquivo de configuração.</li>
</ul>
<p>
<strong>Versão 0.4:</strong>
</p>
<ul>
<li>adicionado obter região de uma área selecionada.</li>
<li>adicionado copiar para a área de transferência.</li>
<li>adicionado salvar tamanho da janela principal ao sair [padrão está desabilitado].</li>
<li>decrementado em 2 tempos os volumes ocupados pela memória ao iniciar.</li>
<li>[win32] falha corrigida com a localização de screengrab.ini.</li>
<li>alterada estrutura de algumas linhas do código fonte (para trabalhar com configuração de data).</li>
<li>alterada a ordem da aba dos botões da janela principal.</li>
<li>novo ícone do programa.</li>
<li>algumas correções.</li>
</ul>
<p>
<strong>Versão 0.3.1:</strong>
</p>
<ul>
<li>corrigida falha com a não exibição do ícone da janela principal.</li>
</ul>
<p>
<strong>Versão 0.3:</strong>
</p>
<ul>
<li>janela principal agora baseada no arquivo UI (recriado UI).</li>
<li>adicionado captura da janela ativa.</li>
<li>adicionado opção para permitir múltiplas instâncias do ScreenGrab.</li>
<li>adicionado opção para selecionar entre minimiizar no área de notificação e fechar (botão fechar da janela).</li>
</ul>
<p>
<strong>Versão 0.2:</strong>
</p>
<ul>
<li>adicionado suporte a JPEG.</li>
<li>adicionado diálogo de opções.</li>
<li>adicionado configurações ao salvar diretório, nome do arquivo e formato da imagem por padrão.</li>
<li>adicionado opções de salvar no arquivo INI.</li>
<li>adicionado suporte a i18n e localização Russa.</li>
<li>algumas correções e alterações no código.</li>
<li>disponível agora com um instalador (Windows) e pacotes deb (ubuntu 9.04).</li>
</ul>
<p>
<strong>Versão 0.1:</strong>
</p>
<ul>
<li>primeira versão pública.</li>
<li>adicionado ícone e menu na área de notificação do sistema.</li>
<li>adicionado ocultar na área de notificação do sistema.</li>
<li>adicionado o bloqueio de uma segunda instância do programa.</li>
</ul>
<p>
<strong>Versão 0.0.3:</strong>
</p>
<ul>
<li>primeira construção trabalhada com recursos mínimos.</li>
</ul>
</div>
</div>
<div id="footer">
<p>Copyright &copy; 2009 - 2013, <a href="http://mapper.ru/" class="link1">DOOMer</a></p>
</div>
</body>
</html>

@ -0,0 +1,487 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>ScreenGrab -- программа для быстрого создания скриншотов</title>
<link href="../default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<a name='main'></a>
<div id="header">
<h1>ScreenGrab</h1> <div id="version">версия 1.0</div>
<!--<h2>By DOOMer</h2>-->
</div>
<div id="menu">
<ul>
<li><a href="#main">Описание</a></li>
<li><a href="#usage">Использование</a></li>
<li><a href="#license">Лицензия</a></li>
<li><a href="#versions">История версий</a></li>
</ul>
</div>
<div id="content">
<div id="left">
<h2>ScreenGrab - быстрое создание скриншотов</h2>
<p>
Данная программа является кроссплатформенным приложением,
предназначенным для быстрого получения снимков экрана
(скриншотов) .
ScreenGrab создана с использованием фреймворка Qt, за счёт
которого
достигается работоспособность приложения в операционных
системах Microsoft Windows и GNU/Linux.
</p>
<p>
Основные возможности программы:
</p>
<ul>
<li>Работа в операционных систмах Windows и Linux</li>
<li>Получение снимков рабочего стола</li>
<li>Получение снимков отдельного активного окна</li>
<li>Получение снимков выделенной области экрана</li>
<li>Копирование скриншотов в буфер обмена</li>
<li>Сохранение полученных изображений в файлы форматов PNG, PEG или BMP</li>
<li>Возможность просмотра и редактирования скриншота во внешнем редакторе</li>
<li>Ввозможность загрузки скриншотов на несколько хостингов изображений (на данный момент mediacru.sh и imgur.com)</li>
<li>Возможность установки задержки при получении скриншотов
(от 1 до 90 секнд)</li>
<li>Скрытие главного окна (с последующим восстановлением)
ScreenGrab в момент
получения скриншота</li>
<li>Возможность сворачивания приложения в системный трей, и
управление через контекстное меню</li>
<li>Получение скриншотов при помощи глобальных клавиш быстрого доступа</li>
<li>Автоматическое сохранение скриншотов при их получении</li>
<li>Возможность вставки текущей даты и времени в имя сохраняемого файла</li>
</ul>
<a name='usage'></a>
<h2>Использование <a href='#main'>В начало</a></h2>
<p>
Все очень просто.
</p>
<p>
При первом запуске программы, вы получаете снимок
текущего состояния вшего рабочего стола. Вы можете увидеть это в
окне программы.
Все дальнейшее управление программой может быть осуществлено
через кнопки
или контекстное меню в области уведомлений рабочего стола.
</p>
<p>
Назначение кнопок окна программы.
</p>
<ul>
<li><b>Новый снимок</b> [Ctrl+N] -- получение нового скриншота</li>
<li><b>Сохранить</b> [Ctrl+S] -- запись полученного снимка на жесткий
диск,
в виде графического файла.</li>
<li><b>Копировать</b> [Ctrl+C] -- Копирование скриншота в буфер обмена.</li>
<li><b>Опубликовать</b> - загрузить полученный скриншот на один из поддерживаемых хостингов изображений. На данный момент поддерживаются <a href='http://mediacru.sh/' target='_blank'>mediacru.sh</a>, <a href='http://imgur.com/' target='_blank'>imgur.com</a> и <a href='http://imageshack.us/' target='_blank'>imageshack.us</a>, в дальнейшем список будет расширен</li>
<li><b>Открыть в ...</b> - возможность открытия (и редактирования) полученного скриншота в одном из установленных в системе приложений для работы с изображениями.
<br />
<u>Заимечание:</u> В версии для Microsoft Windows поддерживается только Microsoft Paint.
</li>
<li><b>Настройки</b> [Ctrl+O] -- настрйоки программы </li>
<li><b>Справка</b> [Ctrl+H] -- отображение справочной информации и вывод окна с информацией о
разработчике и лицензии</li>
<li><b>Выход</b> [Ctrl+Q] -- выход из программы (при закрытии через
"крестик" в верхнем правом углу,
программа всего лишь свернётся в убласть
уведомлений)</li>
</ul>
<p>
Все это также продублировано в контекстном меню приложения.
</p>
<p>
Дополнительные элементы управления приложением, расположенный в
главном окне.
</p>
<ul>
<li><b>Задержка</b> -- величина задержки (в секундах)
перед получением нового снимка экрана.</li>
<li><b>Тип</b> -- выбор типа скриншота (полный экран,
снимок отдельного активного окна или выделенная область экрана). </li>
</ul>
<p>
<b><u>Основные параметры:</u></b>
</p>
<p>
Основные параметры разделены на две вкладки:
</p>
<ul>
<li><b>Каталог по умолчанию</b> -- директория для сохранения
файлов,
открываемая в окне сохранения файлов.</li>
<li><b>Имя файла по умолчанию</b> -- исходное имя файла при
сохранении..</li>
<li><b>Формат</b> -- формат изображения,
который будет автоматически выбираться при сохранении.
Возможность выбра другого формата при сохранении </li>
<li><b>Без декораций окна</b> -- получение скриншота активного окна без рамки и строки заголовка (только для Linux-версии).</li>
<li><b>Копировать имя сохранённого файла в буфер обмена</b> - передача в буфер обмена имени сохраняемого файла. Можно выбрать следующие варианты:</li>
<ul>
<li><b>Не копировать</b> - имя сохранённого файла не будет передано в буфер обмена.</li>
<li><b>Только имя файла</b> - передать в буфер обмена только имя файла.</li>
<li><b>Весь путь к файлу</b> - передать в буфер обмена полный путь к файлу.</li>
</ul>
</ul>
<p>
<b><u>Основные параметры:</u></b>
</p>
<p>
<u><b>Расширенные параметры:</u></b>
</p>
<ul>
<li><b>Дата и время в имени файла</b> -- возможность автоматическойй
вставки текущей даты и времени в имя сохраняемого файла
<br />
<br />Эти выражения могут быть использованы для форматирования вывода даты:
<br />
<table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Выражение</th><th>Вывод</th></tr></thead>
<tr valign="top" class="odd"><td>d</td><td>the day as number without a leading zero (1 to 31)</td></tr>
<tr valign="top" class="even"><td>dd</td><td>день в виде цифр, с нулем в начале, если требуется (01-31)</td></tr>
<tr valign="top" class="odd"><td>ddd</td><td>название для в сокращенном виде (напр. 'Пн' или 'Вс'). </td></tr>
<tr valign="top" class="even"><td>dddd</td><td>полное название дня (напр. 'Понедельник').</td></tr>
<tr valign="top" class="odd"><td>M</td><td>месяц в виде цифр, без нуля в начале (1-12)</td></tr>
<tr valign="top" class="even"><td>MM</td><td>месяц в виде цифр, с нулем в начале, если требуется (01-12)</td></tr>
<tr valign="top" class="odd"><td>MMM</td><td>название месяца в сокращенном виде (напр. 'Янв'). </td></tr>
<tr valign="top" class="even"><td>MMMM</td><td>полное название месяца (e.g. 'Январь'). </td></tr>
<tr valign="top" class="odd"><td>yy</td><td>год в виде двух цифр (00-99)</td></tr>
<tr valign="top" class="even"><td>yyyy</td><td>год в виде четырех цифр (0000-9999)</td></tr>
</table>
<br />Эти выражения могут быть использованы для форматирования вывода времени:
<br /><br />
<table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Выражение</th><th>Вывод</th></tr></thead>
<tr valign="top" class="odd"><td>h</td><td>the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)</td></tr>
<tr valign="top" class="even"><td>hh</td><td>the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)</td></tr>
<tr valign="top" class="odd"><td>H</td><td>the hour without a leading zero (0 to 23, even with AM/PM display)</td></tr>
<tr valign="top" class="even"><td>HH</td><td>the hour with a leading zero (00 to 23, even with AM/PM display)</td></tr>
<tr valign="top" class="odd"><td>m</td><td>the minute without a leading zero (0 to 59)</td></tr>
<tr valign="top" class="even"><td>mm</td><td>the minute with a leading zero (00 to 59)</td></tr>
<tr valign="top" class="odd"><td>s</td><td>the second without a leading zero (0 to 59)</td></tr>
<tr valign="top" class="even"><td>ss</td><td>the second with a leading zero (00 to 59)</td></tr>
<tr valign="top" class="odd"><td>z</td><td>the milliseconds without leading zeroes (0 to 999)</td></tr>
<tr valign="top" class="even"><td>zzz</td><td>the milliseconds with leading zeroes (000 to 999)</td></tr>
<tr valign="top" class="odd"><td>AP or A</td><td>interpret as an AM/PM time. <i>AP</i> must be either "AM" or "PM".</td></tr>
<tr valign="top" class="even"><td>ap or a</td><td>Interpret as an AM/PM time. <i>ap</i> must be either "am" or "pm".</td></tr>
</table>
<br />
</li>
<li><b>Автосохранение скриншотов</b> -- автоматическое сохранение
скриншотов при их получении (можно совмещать с предыдущей настройкой) </li>
<li><b>Сохранять первый скриншот</b> -- возможность автоматического сохранения скриншота, получаемого при запуске приложения </li>
<li><b>Несколько копий программы</b> -- возможность
запуска нескольких экземпляров ScreenGrab одновременно.</li>
<li><b>Enable external viewer</b> -- включить или выключить просмотр скриншота во внешней программе просмотра графических файлов (двойным кликом по скриншоту в клавном окне).</li>
</ul>
<p>
<u><b>Параметры отображения приложения:</u></b>
</p>
<ul>
<li><b>Сохранять размеры окна при выходе</b> -- сохранение размеров основного окна при выходе, с восстановлением при последующем запуске.</li>
<li><b>Масштабирование области курсора в режиме выбора</b> -- возможность отображения увеличенной области вокруг курсора мыши при получении скриншота выбранной области экрана.</li>
</ul>
<p>
<u><b>Параметры использования области уведомлений (трей):</u></b>
</p>
<ul>
<li><b>Использовать трей</b> -- возможность использования области уведомлений операционной системы (десктопного окружения) для отображения сообщений и управления приложением.</li>
<li><b>Всплывающие уведомления</b> -- режим отображения
всплывющих уведомлений. Имеет три вида - отображать всегда, отображать
только при свёрнутом главном окне и не отображаить никогда.</li>
<li><b>Время отображения уведомлений</b> -- время (в секундах), в
течении которого будут отображяться всплывающие уведомления </li>
<li><b>Сворачивать в область уедомлений</b> -- сворачивание
прпограммы в область уведомлений (трей) при назатии на кнопку закрытия (ту
что в правом верхнем углу окна).</li>
</ul>
<p>
<u><b>Комбинации клавиш:</u></b>
</p>
<p>
На вкладке "Комбинации клавиш" в окне настроек вы можете установить сочетания клавиш для быстрого доступа к основным функциям приложения. Существует два вида комбинаций клавиш, используемых в screenGrab -- локальные и глобальные.
</p>
<p>
Локальные дублируют действия выполняемые при нажатии на кнопки в главном окне приложения. Они работают только когда окно ScreenGrab является активным.
</p>
<p>
Глобальные комбинации клавиш позволяют воспользоваться функцией получения нового скриншота при работе с другим приложением в вашей операционной системе.
</p>
<p>
<u><b>Параметры командной строки:</u></b>
</p>
<ul>
<li><b>--fullscreen</b> -- скриншот всего экрана [по умолчанию].</li>
<li><b>--active</b> -- скриншот активного окна.</li>
<li><b>--region</b> -- скриншот выделенной области экрана.</li>
<li><b>--minimized</b> -- запуск с автоматическим сворачиванием в трей (или на панель задач, если тподдержка трея выключена).</li>
<li><b>--upload</b> -- автоматическая загрузка скриншота на выбраный в настрйоках хостинг изображений. И отображение прямой ссылки на изображение после завершения загрузки.</li>
<li><b>--version</b> -- вывод информации о версии ScreenGrab {только linux].</li>
<li><b>--help</b> -- вывод информации о параметрах командной строки {только linux].</li>
</ul>
<a name='license'></a>
<h2>Лицензия <a href='#main'>В начало</a></h2>
<p>
<strong>Авторские права:</strong>
</p>
<p>
Артём 'DOOMer' Галичкин <a href=mailto:doomer3d@gmail.com>doomer3d@gmail.com</a>
</p>
<p>
<strong>Лицензия:</strong>
</p>
<p>
Программа ScreenGrab распространяется бесплатно по условиям <a href=http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
target=_blank>GNU General Public License version 2</a>
</p>
<p>
<strong>Благодарности</strong>:
</p>
<p>
<strong>Локализации:</strong>
</p>
<ul>
<li><strong>Márcio Moraes</strong> -- Бразильская Португальская локализация </li>
<li><strong>Геннадий Моцьо</strong> -- Украинская локализация </li>
</ul>
<p>
<strong>Бета-тестеры</strong>
</p>
<ul>
<li><strong>Alexantia</strong> </li>
<li><strong>iNight</strong> </li>
</ul>
<p>
А также всем тем, кто использует ScreenGrab :)
</p>
<a name='versions'></a>
<h2>История версий <a href='#main'>В начало</a></h2>
<p>
<strong>версия 1.2:</strong>
</p>
<ul>
<li>Добавлена возможность запоминания типа последнего сделанного скриншота.</li>
<li>Несколько небольших исправлений.</li>
</ul>
<p>
<strong>Версия 1.1.1:</strong>
</p>
<ul>
<li>Исправлена неправильная строка bb-ода с превью скриншота, загружаемого на 'imgur'.</li>
<li>справлено аварийное завершение приложения при наличии в конфигурационном файле параметра "showTrayIcon=false".</li>
</ul>
<p>
<strong>Версия 1.1:</strong>
</p>
<ul>
<li>Добавлена возможность автоматической загрузки скриншота на MediaCreush (http://mediacru.sh).</li>
<li>Опция "Всегда сохранять размер окна" заменена на "Автодобавление размера окна при выходе из ScreenGrab".</li>
<li>Перервботан интерфейс главного окна (изменен некоторые кнопки).</li>
<li>Переработан диалог настроек (уменьшено число секций и некоторые настройки были перемещены между секциями).</li>
</ul>
<p>
<strong>Версия 1.0:</strong>
</p>
<ul>
<li>Исправлены баги с поддержкой двух мониторов в Linux.</li>
<li>Добавлена поддержка XDG_CONFIG_HOME (конфигурационные файлы теперь хранятся в ~/.config/screengrab/), отключается опцией сборки SG_XDG_CONFIG_SUPPORT</li>
<li>Добавлена возможность загрузки скриншотов на несколько хостингов (на данный момент imgur.com and imgshack.us, в дальнейшем список будет расширен)</li>
<li>Добавлена возможность сборки без модуля загрузки скриншотов в интернет (опция сборки SG_EXT_UPLOADS)</li>
<li>Добавлен режим "Ранее выбранная область"</li>
<li>Добавлена возможность редактирования скриншота во внешнем редакторе</li>
<li>Добавлена опция просмотра скриншота во внешней программе просмотра графических файлов (двойным кликом по скриншоту)</li>
<li>Исправлена ошибка сворачивания главного окна при использовани шортката &quot;Exit&quot;, если включена опция &quot;Сворачивать в область уведомлений&quot;</li>
<li>Исправлен баг с невлезанием некоторых локализаованных надписей на кнопки в главном окне.</li>
<li>Исправлена регрессия с неполучениемм скриншота при запуске второго экземпляра приложения.</li>
<li>Исправлена ошибка несоздавания несуществоввашего ранее каталога для автосохранения скриншотов (при ручном вводе имени каталога в диалоге натроек)</li>
<li>Добавлена опция сборки SG_GLOBALSHORTCUTS для возможности сборки без поддержки глобальных горячих клавиш</li>
<li>Автодобавление номеров скриншотов при сохранении, если файл с выбранным именем уже существет в данном каталоге.</li>
<li>Возможность изменить комбинацию клавиш для действия &quot;выход&quot;</li>
<li>Возможность запуска с автоматическим сворачиванием в трей (или на панель задач, если тподдержка трея выключена) при помощи параметра командной строки "--minimized"</li>
<li>Добавлена возможность автоматической загрузки скриншота на выбранный в настройках хотсинг изображений (парметр командной строки "--upload")</li>
</ul>
<p>
<strong>Версия 0.9.1:</strong>
</p>
<ul>
<li>Исправлено не-переключение типа скриншота (в GUI) при снятии скриншота по сигналу от другого экземпляра приложения (запущенного при выключенной опции "Несколько копий приложения").</li>
<li>Исправлено некорректное получение скриншота активного окна в среде GNOME (при выключенной опции "Несколько копий приложения" и запуске второго экземпляра ScreenGrab)..</li>
</ul>
<p>
<strong>Версия 0.9:</strong>
</p>
<ul>
<li>Добавлены глобальные клавиши быстрого доступа. </li>
<li>Добавлена возможность отключения трея. </li>
<li>Дабвлено активирование узе запущенной копии ScreenGrab при попытке запуска второго экземаляра приложения (при отключенной опции "Несколько копий программы"). </li>
<li>Добавлено автосохранение первого скриншота, получаемого при старте приложения (в виде опции)). </li>
<li>Изменен дизайн диалога настроек. </li>
</ul>
<p>
<p>
<strong>Версия 0.8.1:</strong>
</p>
<ul>
<li>[Linux] Исправлен некорректный выболр формата сохраняемого файла в KDE 4.4. и выше </li>
<li>Добавлена немецкая локализация</li>
</ul>
<p>
<strong>Версия 0.8:</strong>
</p>
<ul>
<li>Добавлены параметры командной строки для установки режима получения скриншотов
(весь экран, активное окно, область экрана). </li>
<li>Добавлена поддержка формата BMP. </li>
<li>Добавлена Бразильская Португальская локализация. </li>
<li>Окно программы теперь автоматически скрывается в процессе получения скриншота. </li>
<li>{linux] Исправлено не совсем корректно получение скриншотов активного окна. </li>
<li>[linux] Добавлен параметр "без декораций окна". </li>
<li>Добавлены "горячие клавиши" для кнопок главного окна. </li>
</ul>
<p>
<strong>Версия 0.6.2 [Linux only]:</strong>
</p>
<ul>
<li>Исправлена некорректная загрузка локализации для меню области уведомлений. </li>
</ul>
<p>
<strong>Version 0.6.1 [Linux only]:</strong>
</p>
<ul>
<li>Исправлено некорректное определение системной локали в некоторых Linux-дистрибутивах.. </li>
</ul>
<p>
<strong>Версия 0.6:</strong>
</p>
<ul>
<li>Параметр "скрывать главное окно" по умолчанию теперь включен. </li>
<li>Добавлена возможность редактировать шаблон даты И времени,
вставляемых в имя сохраняемого файла.</li>
<li>Добавлено мастабирование экранной области вокруг курсора
в режиме "область экрана".</li>
<li>Немного улучшен внешний вид диалога настроек..</li>
<li>Добавлена справочная информация в html-формате (на английском и русском языках).</li>
</ul>
<p>
<strong>Версия 0.5:</strong>
</p>
<ul>
<li>Добавлена возможность автосохранения скриншотов. </li>
<li> Добавлена возможность вставки текущей даты и времени в имя сохраняемог файла.</li>
<li>Добавлена возможность изменения времени отображения всплывающих уведомлений (1 - 10 секунд).</li>
<li>Добавлена возможность просмотра справочной информации по использованию программы.</li>
<li>Добавлены всплывающие подсказки (tool tips) ко всем элементам пользовательского интерфейса .</li>
<li>Несколько мелких исправлений в коде и конфигурационном файле.</li>
</ul>
<p>
<strong>Версия 0.4:</strong>
</p>
<ul>
<li>Добавлена вохзможность захвата выделенной области экрана. </li>
<li> Добавлена возможность копирования скриншотов в буфер обмена.</li>
<li>Возможность сохранения текущих размеров окна приложения
при выходе (по умолчанию выключено).</li>
<li>Уменьшен объём оперативной памяти, занимаемой при запуске.</li>
<li>[Win32] Исправлен баг с размещением конфигурационного файла.</li>
<li>Немного оптимизирован код работы с конфигурационными параметрами.</li>
<li>Оптимизирован процесс работы с главным окном при помощи клавиатуры.</li>
<li>Новая иконка приложения.</li>
<li>Несколько мелких исправлений.</li>
</ul>
<p>
<strong>Версия 0.3.1:</strong>
</p>
<ul>
<li>Устранён баг с неотображением иконки приложения в
заголовке главного окна </li>
</ul>
<p>
<strong>Версия 0.3:</strong>
</p>
<ul>
<li>Полностью переработан интерфейс главного кона,
программмный код которого отделен от основного класса приложения. </li>
<li> Несколько других изменений в интерфейсе
пользователя.</li>
<li>Добавлена возможность получения скриншота
отдельного активного окна.</li>
<li>Добавлена опция включения возможность запуска
нескольких копий ScreenGrab.</li>
<li>Добавлена возможность выбора между сворачиванием в
область уведомлений и закрытие программы (при нажатии кнопки закрытия
окна).</li>
</ul>
<p>
<strong>Версия 0.2:</strong>
</p>
<ul>
<li>Сохранение в формат JPEG.</li>
<li>Добавлен диалог настроек.</li>
<li>Добавлены параметры для каталога сохраняемых файлов,
дефолтного
имени файла и предпочитаемого формата. </li>
<li> Сохранение настроек в INI-файл</li>
<li>Добавлена поддержка интернационализации и
ru-lang-package.</li>
<li>Немного изменений и фиксов в стурктуре кода.</li>
<li>Инстялятор для Windows-версии + пакеты для Ubuntu
9.04.</li>
</ul>
<p>x
<strong>Версия 0.1:</strong>
</p>
<ul>
<li>Первая публичная версия.</li>
<li>Добавлена иконка в убластиуведомлений и контекстное
меню.</li>
<li>Возможность скрытия окна программы в область
уведомлений. </li>
<li>Запуск только одного экземпляра приложения</li>
</ul>
<p>
<strong>Версия 0.0.3:</strong>
</p>
<ul>
<li>Первая работоспособная версия с минимальной
функциональностью.</li>
</ul>
</div>
</div>
<div id="footer">
<p>Copyright &copy; 2009 - 2013, <a href="http://mapper.ru/" class="link1">DOOMer</a></p>
</div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 764 B

@ -0,0 +1,12 @@
[Desktop Entry]
Name=ScreenGrab
Comment=Screen capture
GenericName=Screen Capture Program
Exec=screengrab
Icon=screengrab
Terminal=false
Type=Application
Categories=Graphics;RasterGraphics;Qt;
X-KDE-StartupNotify=false
#TRANSLATIONS_DIR=translations

@ -0,0 +1,6 @@
<RCC>
<qresource prefix="/res" >
<file>img/trayicon.png</file>
<file>img/logo.png</file>
</qresource>
</RCC>

@ -0,0 +1,31 @@
cmake_minimum_required(VERSION 2.8.11)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
include_directories(${Qt5Widgets_INCLUDE_DIRS})
add_definitions(${Qt5Widgets_DEFINITIONS})
OPTION (QKSW_SHARED "Use QKeysequenseWidget as shared library" OFF)
set (QKSW_SRC
src/qkeysequencewidget.cpp)
set (QKSW_HDR
src/qkeysequencewidget.h
src/qkeysequencewidget_p.h)
set (QKSW_QRC
qkeysequencewidget.qrc)
qt5_add_resources(QKSW_QRC ${QKSW_QRC})
if(QKSW_SHARED)
add_definitions(-DIS_SHARED="true")
add_library(qkeysequencewidget SHARED ${QKSW_SRC} ${QKSW_QRC})
set_property(TARGET qkeysequencewidget PROPERTY SOVERSION 1.0.0)
INSTALL (TARGETS qkeysequencewidget DESTINATION ${SG_LIBDIR})
else(QKSW_SHARED)
add_library(qkeysequencewidget STATIC ${QKSW_SRC} ${QKSW_QRC})
endif(QKSW_SHARED)
target_link_libraries(qkeysequencewidget Qt5::Widgets)

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

@ -0,0 +1,7 @@
INCLUDEPATH += $$PWD/src
DEPENDPATH += $$PWD/src
SOURCES += $$PWD/src/qkeysequencewidget.cpp
HEADERS += $$PWD/src/qkeysequencewidget.h \
$$PWD/src/qkeysequencewidget_p.h
RESOURCES += $$PWD/qkeysequencewidget.qrc

@ -0,0 +1,5 @@
<RCC>
<qresource prefix="/">
<file>img/delete_32.png</file>
</qresource>
</RCC>

@ -0,0 +1,578 @@
/******************************************************************************
Copyright (c) 2010, Artem Galichkin <doomer3d@gmail.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the <organization> nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/
#include <QEvent>
#include <QKeyEvent>
#include <QIcon>
#include "qkeysequencewidget_p.h"
#include "qkeysequencewidget.h"
/*!
Creates a QKeySequenceWidget object wuth \a parent and empty \a keySequence
*/
QKeySequenceWidget::QKeySequenceWidget(QWidget *parent) :
QWidget(parent), d_ptr(new QKeySequenceWidgetPrivate())
{
Q_D(QKeySequenceWidget);
d->q_ptr = this;
d->init(QKeySequence(), QString());
_connectingSlots();
}
/*!
Creates a QKeySequenceWidget object wuth \a parent and keysequence \a keySequence
and string for \a noneString
*/
QKeySequenceWidget::QKeySequenceWidget(QKeySequence seq, QString noneString, QWidget *parent) :
QWidget(parent), d_ptr(new QKeySequenceWidgetPrivate())
{
Q_D(QKeySequenceWidget);
d->q_ptr = this;
d->init(seq, noneString);
_connectingSlots();
}
/*!
Creates a QKeySequenceWidget object wuth \a parent and keysequence \a keySequence
*/
QKeySequenceWidget::QKeySequenceWidget(QKeySequence seq, QWidget *parent) :
QWidget(parent), d_ptr(new QKeySequenceWidgetPrivate())
{
Q_D(QKeySequenceWidget);
d->q_ptr = this;
d->init(seq, QString());
_connectingSlots();
}
/*!
Creates a QKeySequenceWidget object wuth \a parent and string for \a noneString
*/
QKeySequenceWidget::QKeySequenceWidget(QString noneString, QWidget *parent) :
QWidget(parent), d_ptr(new QKeySequenceWidgetPrivate())
{
Q_D(QKeySequenceWidget);
d->q_ptr = this;
d->init(QKeySequence(), noneString);
_connectingSlots();
}
/*!
Destroy a QKeySequenceWidget object
*/
QKeySequenceWidget::~QKeySequenceWidget()
{
delete d_ptr;
}
QSize QKeySequenceWidget::sizeHint() const
{
return d_ptr->shortcutButton->sizeHint();
}
/*!
Setting tooltip text to sequence button
\param tip Text string
*/
void QKeySequenceWidget::setToolTip(const QString &tip)
{
d_ptr->setToolTip(tip);
}
/*!
Setting mode of Clear Buttorn display.
\param show Position of clear button \a ClearButtornShow
\sa clearButtonShow
*/
void QKeySequenceWidget::setClearButtonShow(QKeySequenceWidget::ClearButtonShow show)
{
d_ptr->showClearButton = show;
d_ptr->updateView();
}
/*!
Return mode of clear button dosplay.
\param show Display mode of clear button (NoShow, ShowLeft or ShorRight)
\sa setClearButtonShow
*/
QKeySequenceWidget::ClearButtonShow QKeySequenceWidget::clearButtonShow() const
{
return static_cast<QKeySequenceWidget::ClearButtonShow>(d_ptr->showClearButton);
}
/*!
Set the key sequence.
\param key Key sequence
\sa clearKeySequence
*/
void QKeySequenceWidget::setKeySequence(const QKeySequence& key)
{
if (d_ptr->isRecording == false)
{
d_ptr->oldSequence = d_ptr->currentSequence;
}
d_ptr->currentSequence = key;
d_ptr->doneRecording();
}
/*!
Get current key sequence.
\return Current key sequence
\sa setKeySequence
\sa clearKeySequence
*/
QKeySequence QKeySequenceWidget::keySequence() const
{
return d_ptr->currentSequence;
}
/*!
Clear key sequence.
\sa setKeySequence
*/
void QKeySequenceWidget::clearKeySequence()
{
d_ptr->clearSequence();
}
/*!
* Start process capturing key sequence.
* This slot is designed for software process capturing key sequence.
*/
void QKeySequenceWidget::captureKeySequence()
{
d_ptr->startRecording();
}
/*!
Set string for display when key sequence is undefined.
\param text Text string
\sa noneText
*/
void QKeySequenceWidget::setNoneText(const QString text)
{
d_ptr->noneSequenceText = text;
d_ptr->updateDisplayShortcut();
}
/*!
Get string for display when key sequence is undefined.
\return Text string
\sa setNoneText
*/
QString QKeySequenceWidget::noneText() const
{
return d_ptr->noneSequenceText;
}
/*!
Set custom icon for clear buttom.
\param icon QIcon object
\sa clearButtonIcon
*/
void QKeySequenceWidget::setClearButtonIcon(const QIcon &icon)
{
d_ptr->clearButton->setIcon(icon);
}
/*!
Get clear buttom icon.
\return QIcon object
\sa setClearButtonIcon
*/
QIcon QKeySequenceWidget::clearButtonIcon() const
{
return d_ptr->clearButton->icon();
}
// connection internal signals & slots
void QKeySequenceWidget::_connectingSlots()
{
// connect signals to slots
connect(d_ptr->clearButton, SIGNAL(clicked()), this,
SLOT(clearKeySequence()));
connect(&d_ptr->modifierlessTimeout, SIGNAL(timeout()), this, SLOT(doneRecording()));
connect(d_func()->shortcutButton, SIGNAL(clicked()), this, SLOT(captureKeySequence()));
}
// Private class implementation
QKeySequenceWidgetPrivate::QKeySequenceWidgetPrivate()
: layout(NULL), clearButton(NULL), shortcutButton(NULL)
{
Q_Q(QKeySequenceWidget);
Q_UNUSED(q);
}
QKeySequenceWidgetPrivate::~QKeySequenceWidgetPrivate()
{
}
void QKeySequenceWidgetPrivate::init(const QKeySequence keySeq, const QString noneStr)
{
Q_Q(QKeySequenceWidget);
Q_UNUSED(q);
layout = new QHBoxLayout(q_func());
layout->setMargin(0);
layout->setSpacing(1);
clearButton = new QToolButton(q_func());
clearButton->setText("x");
layout->addWidget(clearButton);
shortcutButton = new QShortcutButton(this, q_func());
if (noneStr.isNull() == true)
{
noneSequenceText = "...";
}
else
{
noneSequenceText = noneStr;
}
q_ptr->clearKeySequence();
currentSequence = keySeq;
oldSequence = currentSequence;
shortcutButton->setFocusPolicy(Qt::StrongFocus);
layout->addWidget(shortcutButton);
showClearButton = QKeySequenceWidget::ShowRight;
clearButton->setIcon(QIcon(":/img/delete_32.png"));
// unfocused clear button afyer created (small hack)
clearButton->setFocusPolicy(Qt::NoFocus);
// update ui
updateDisplayShortcut();
updateView();
}
// set tooltip only for seqyence button
void QKeySequenceWidgetPrivate::setToolTip(const QString &tip)
{
shortcutButton->setToolTip(tip);
clearButton->setToolTip("");
}
// update the location of widgets
void QKeySequenceWidgetPrivate::updateView()
{
switch(showClearButton)
{
case QKeySequenceWidget::ShowLeft:
clearButton->setVisible(true);
layout->setDirection(QBoxLayout::LeftToRight);
break;
case QKeySequenceWidget::ShowRight:
clearButton->setVisible(true);
layout->setDirection(QBoxLayout::RightToLeft);
break;
case QKeySequenceWidget::NoShow:
clearButton->setVisible(false);
break;
default:
layout->setDirection(QBoxLayout::LeftToRight);
}
}
void QKeySequenceWidgetPrivate::startRecording()
{
numKey = 0;
modifierKeys = 0;
oldSequence = currentSequence;
currentSequence = QKeySequence();
isRecording = true;
shortcutButton->setDown(true);
shortcutButton->grabKeyboard();
if (!QWidget::keyboardGrabber())
{
qWarning() << "Failed to grab the keyboard! Most likely qt's nograb option is active";
}
// update Shortcut display
updateDisplayShortcut();
}
void QKeySequenceWidgetPrivate::doneRecording()
{
modifierlessTimeout.stop();
if (isRecording == true)
{
emit q_ptr->keySequenceAccepted(currentSequence);
}
else
{
if (oldSequence.isEmpty() != true)
{
emit q_ptr->keySequenceChanged(currentSequence);
}
}
isRecording = false;
shortcutButton->releaseKeyboard();
shortcutButton->setDown(false);
// if sequence is not changed
if (currentSequence == oldSequence)
{
// update Shortcut display
updateDisplayShortcut();
return;
}
// update Shortcut display
updateDisplayShortcut();
}
inline void QKeySequenceWidgetPrivate::cancelRecording()
{
currentSequence = oldSequence;
doneRecording();
}
inline void QKeySequenceWidgetPrivate::clearSequence()
{
q_ptr->setKeySequence(QKeySequence());
emit q_ptr->keySequenceCleared();
}
inline void QKeySequenceWidgetPrivate::controlModifierlessTimout()
{
if (numKey != 0 && !modifierKeys)
{
// No modifier key pressed currently. Start the timout
modifierlessTimeout.start(600);
}
else
{
// A modifier is pressed. Stop the timeout
modifierlessTimeout.stop();
}
}
inline void QKeySequenceWidgetPrivate::keyNotSupported()
{
Q_EMIT q_ptr->keyNotSupported();
}
void QKeySequenceWidgetPrivate::updateDisplayShortcut()
{
// empty string if no non-modifier was pressed
QString str = currentSequence.toString(QKeySequence::NativeText);
str.replace('&', QLatin1String("&&")); // TODO -- check it
if (isRecording == true)
{
if (modifierKeys)
{
if (str.isEmpty() == false)
str.append(",");
if ((modifierKeys & Qt::META) )
str += "Meta + ";
if ((modifierKeys & Qt::CTRL) )
str += "Ctrl + ";
if ((modifierKeys & Qt::ALT) )
str += "Alt + ";
if ((modifierKeys & Qt::SHIFT) )
str += "Shift + ";
}
// make it clear that input is still going on
str.append("...");
}
// if is noting
if (str.isEmpty() == true)
{
str = noneSequenceText;
}
shortcutButton->setText(str);
}
// QKeySequenceButton implementation
QSize QShortcutButton::sizeHint() const
{
return QPushButton::sizeHint();
}
bool QShortcutButton::event(QEvent *e)
{
if (d->isRecording == true && e->type() == QEvent::KeyPress)
{
keyPressEvent(static_cast<QKeyEvent*>(e));
return true;
}
if (d->isRecording && e->type() == QEvent::ShortcutOverride)
{
e->accept();
return true;
}
if (d->isRecording == true && e->type() == QEvent::FocusOut)
{
d->cancelRecording();
return true;
}
return QPushButton::event(e);
}
void QShortcutButton::keyPressEvent(QKeyEvent *keyEvent)
{
int keyQt = keyEvent->key();
// Qt sometimes returns garbage keycodes, I observed -1,
// if it doesn't know a key.
// We cannot do anything useful with those (several keys have -1,
// indistinguishable)
// and QKeySequence.toString() will also yield a garbage string.
if (keyQt == -1)
{
// keu moy supported in Qt
d->cancelRecording();
d->keyNotSupported();
}
//get modifiers key
uint newModifiers = keyEvent->modifiers() & (Qt::SHIFT | Qt::CTRL | Qt::ALT
| Qt::META);
// block autostart capturing on key_return or key space press
if (d->isRecording == false && (keyQt == Qt::Key_Return || keyQt == Qt::Key_Space))
{
return;
}
// We get events even if recording isn't active.
if (d->isRecording == false)
{
return QPushButton::keyPressEvent(keyEvent);
}
keyEvent->accept();
d->modifierKeys = newModifiers;
// switching key type
switch(keyQt)
{
case Qt::Key_AltGr: //or else we get unicode salad
return;
case Qt::Key_Shift:
case Qt::Key_Control:
case Qt::Key_Alt:
case Qt::Key_Meta:
case Qt::Key_Menu: //unused (yes, but why?)
// TODO - check it key
d->controlModifierlessTimout();
d->updateDisplayShortcut();
break;
default:
{
}
// We now have a valid key press.
if (keyQt)
{
if ((keyQt == Qt::Key_Backtab) && (d->modifierKeys & Qt::SHIFT))
{
keyQt = Qt::Key_Tab | d->modifierKeys;
}
else //if (d->isShiftAsModifierAllowed(keyQt))
{
keyQt |= d->modifierKeys;
}
if (d->numKey == 0)
{
d->currentSequence = QKeySequence(keyQt);
}
d->numKey++; // increment nuber of pressed keys
if (d->numKey >= 4)
{
d->doneRecording();
return;
}
d->controlModifierlessTimout();
d->updateDisplayShortcut();
}
}
}
void QShortcutButton::keyReleaseEvent(QKeyEvent *keyEvent)
{
if (keyEvent->key() == -1)
{
// ignore garbage, see keyPressEvent()
return;
}
// if not recording mode
if (d->isRecording == false)
{
return QPushButton::keyReleaseEvent(keyEvent);
}
keyEvent->accept();
uint newModifiers = keyEvent->modifiers() & (Qt::SHIFT | Qt::CTRL | Qt::ALT | Qt::META);
// if a modifier that belongs to the shortcut was released...
if ((newModifiers & d->modifierKeys) < d->modifierKeys)
{
d->modifierKeys = newModifiers;
d->controlModifierlessTimout();
d->updateDisplayShortcut();
}
}

@ -0,0 +1,127 @@
/******************************************************************************
Copyright (c) 2010, Artem Galichkin <doomer3d@gmail.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the <organization> nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/
#ifndef QKEYSEQUENCEWIDGET_H
#define QKEYSEQUENCEWIDGET_H
#include "qkeysequencewidget_p.h"
#include <QWidget>
#include <QIcon>
#if defined IS_SHARED
#define QKSW_EXPORT Q_DECL_EXPORT
#else
#define QKSW_EXPORT Q_DECL_IMPORT
#endif
class QKeySequenceWidgetPrivate;
/*!
\class QKeySequenceWidget
\brief The QKeySequenceWidget is a widget to input a QKeySequence.
This widget lets the user choose a QKeySequence, which is usually used as a
shortcut key. The recording is initiated by calling captureKeySequence() or
the user clicking into the widget.
\code
// create new QKeySequenceWidget with empty sequence
QKeySequenceWidget *keyWidget = new QKeySequenceWidget;
// Set sequence as "Ctrl+Alt+Space"
keyWidget->setJeySequence(QKeySequence("Ctrl+Alt+Space"));
// set clear button position is left
setClearButtonShow(QKeySequenceWidget::ShowLeft);
// set cutom clear button icon
setClearButtonIcon(QIcon("/path/to/icon.png"));
// connecting keySequenceChanged signal to slot
connect(keyWidget, SIGNAL(keySequenceChanged(QKeySequence)), this, SLOT(slotKeySequenceChanged(QKeySequence)));
\endcode
*/
class QKSW_EXPORT QKeySequenceWidget : public QWidget
{
Q_OBJECT
Q_DECLARE_PRIVATE(QKeySequenceWidget);
Q_PRIVATE_SLOT(d_func(), void doneRecording())
Q_PROPERTY(QKeySequence keySequence READ keySequence WRITE setKeySequence)
Q_PROPERTY(QKeySequenceWidget::ClearButtonShow clearButton READ clearButtonShow WRITE setClearButtonShow)
Q_PROPERTY(QString noneText READ noneText WRITE setNoneText)
Q_PROPERTY(QIcon clearButtonIcon READ clearButtonIcon WRITE setClearButtonIcon)
private:
QKeySequenceWidgetPrivate * const d_ptr;
void _connectingSlots();
public:
explicit QKeySequenceWidget(QWidget *parent = 0);
explicit QKeySequenceWidget(QKeySequence seq, QWidget *parent = 0);
explicit QKeySequenceWidget(QString noneString, QWidget *parent = 0);
explicit QKeySequenceWidget(QKeySequence seq, QString noneString, QWidget *parent = 0);
virtual ~QKeySequenceWidget();
QSize sizeHint() const;
void setToolTip(const QString &tip);
QKeySequence keySequence() const;
QString noneText() const;
QIcon clearButtonIcon() const;
/*!
\brief Modes of sohow ClearButton
*/
enum ClearButton {
NoShow = 0x00, /**< Hide ClearButton */
ShowLeft = 0x01, /**< ClearButton isow is left */
ShowRight = 0x02 /**< ClearButton isow is left */
};
Q_DECLARE_FLAGS(ClearButtonShow, ClearButton);
Q_FLAGS(ClearButtonShow)
QKeySequenceWidget::ClearButtonShow clearButtonShow() const;
Q_SIGNALS:
void keySequenceChanged(const QKeySequence &seq);
void keySequenceAccepted(const QKeySequence &seq);
void keySequenceCleared();
void keyNotSupported();
public Q_SLOTS:
void setKeySequence(const QKeySequence &key);
void clearKeySequence();
void setNoneText(const QString text);
void setClearButtonIcon(const QIcon& icon);
void setClearButtonShow(QKeySequenceWidget::ClearButtonShow show);
void captureKeySequence();
};
#endif // QKEYSEQUENCEWIDGET_H

@ -0,0 +1,120 @@
/******************************************************************************
Copyright (c) 2010, Artem Galichkin <doomer3d@gmail.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the <organization> nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/
#ifndef QKEYSEQUENCEWIDGET_P_H
#define QKEYSEQUENCEWIDGET_P_H
#include <QKeySequence>
#include <QHBoxLayout>
#include <QToolButton>
#include <QPushButton>
#include <QTimer>
#include <QDebug>
#include <QIcon>
#include "qkeysequencewidget.h"
class QShortcutButton;
class QKeySequenceWidget;
class QKeySequenceWidgetPrivate // : public QObject
{
//Q_OBJECT
Q_DECLARE_PUBLIC(QKeySequenceWidget);
public:
QKeySequenceWidget * q_ptr;
QKeySequenceWidgetPrivate();
virtual ~QKeySequenceWidgetPrivate();
void init(const QKeySequence keySeq, const QString noneStr);
void updateView();
void startRecording();
void doneRecording();
inline void cancelRecording();
inline void clearSequence();
inline void controlModifierlessTimout();
inline void keyNotSupported();
void updateDisplayShortcut();
// members
QKeySequence currentSequence;
QKeySequence oldSequence;
QString noneSequenceText;
QTimer modifierlessTimeout;
quint32 numKey;
quint32 modifierKeys;
void setToolTip(const QString& tip);
QHBoxLayout *layout;
QToolButton *clearButton;
QShortcutButton *shortcutButton;
int showClearButton;
bool isRecording;
};
class QShortcutButton : public QPushButton
{
Q_OBJECT
public:
explicit QShortcutButton(QKeySequenceWidgetPrivate *p, QWidget *parent = 0)
: QPushButton(parent)
, d(p)
{
setMinimumWidth(QPushButton::minimumWidth());
QPushButton::setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
}
virtual ~QShortcutButton()
{
}
virtual QSize sizeHint() const;
protected:
// Reimplemented for internal reasons.
virtual bool event(QEvent *e);
virtual void keyPressEvent(QKeyEvent *keyEvent);
virtual void keyReleaseEvent(QKeyEvent *keyEvent);
private:
QKeySequenceWidgetPrivate * const d;
};
#endif // QKEYSEQUENCEWIDGET_P_H

@ -0,0 +1,535 @@
/***************************************************************************
* 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 "src/core/config.h"
#include "core.h"
#include <QApplication>
#include <QStandardPaths>
#include <QDir>
#include <QFile>
#include <QLocale>
#include <QVector>
#include <QDebug>
#define CONFIG_FILE_DIR "screengrab"
#define CONFIG_FILE_NAME "screengrab.conf"
#define KEY_SAVEDIR "defDir"
#define KEY_SAVENAME "defFilename"
#define KEY_SAVEFORMAT "defImgFormat"
#define KEY_DELAY_DEF "defDelay"
#define KEY_DELAY "delay"
#define KEY_IMG_QUALITY "imageQuality"
#define KEY_FILENAMEDATE "insDateTimeInFilename"
#define KEY_DATETIME_TPL "templateDateTime"
#define KEY_FILENAME_TO_CLB "CopyFilenameToClipboard"
#define KEY_AUTOSAVE "autoSave"
#define KEY_AUTOSAVE_FIRST "autoSaveFirst"
#define KEY_SHOW_TRAY "showTrayIcon"
#define KEY_CLOSE_INTRAY "closeInTray"
#define KEY_TRAYMESSAGES "trayMessages"
#define KEY_WND_WIDTH "windowWidth"
#define KEY_WND_HEIGHT "windowHeight"
#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"
Config* Config::ptrInstance = 0;
// constructor
Config::Config()
{
_settings = new QSettings(getConfigFile(), QSettings::IniFormat);
_shortcuts = new ShortcutManager(_settings);
// check existing config file
if (!QFile::exists(getConfigFile()))
{
// creating conf file from set defaults
QFile cf(getConfigFile());
if (cf.open(QIODevice::WriteOnly))
{
cf.close();
}
setDefaultSettings();
saveSettings();
}
_imageFormats << "png" << "jpg" << "bmp";
_settings->setIniCodec("UTF-8");
_scrNum = 0;
}
Config::~Config()
{
delete _shortcuts;
delete _settings;
}
Config* Config::instance()
{
if (!ptrInstance)
ptrInstance = new Config;
return ptrInstance;
}
void Config::setValue(const QString &key, QVariant val)
{
_confData[key] = val;
}
QVariant Config::value(const QString &key)
{
return _confData[key];
}
void Config::killInstance()
{
if (ptrInstance)
{
delete ptrInstance;
ptrInstance = 0;
}
}
QString Config::getConfigFile()
{
return getConfigDir() + QDir::separator() + CONFIG_FILE_NAME;
}
QString Config::getConfigDir()
{
QString dir = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation);
dir += QDir::separator();
dir += CONFIG_FILE_DIR;
QDir qdir(dir);
if (!qdir.exists())
qdir.mkpath(dir);
return dir;
}
// public methods
QString Config::getScrNumStr()
{
QString str = QString::number(_scrNum);
if (_scrNum < 10)
str.prepend("0");
return str;
}
int Config::getScrNum() const
{
return _scrNum;
}
void Config::increaseScrNum()
{
_scrNum++;
}
void Config::resetScrNum()
{
_scrNum = 0;
}
void Config::updateLastSaveDate()
{
_dateLastSaving = QDateTime::currentDateTime();
}
QDateTime Config::getLastSaveDate() const
{
return _dateLastSaving;
}
bool Config::getEnableExtView()
{
return value(KEY_ENABLE_EXT_VIEWER).toBool();
}
void Config::setEnableExtView(bool val)
{
setValue(KEY_ENABLE_EXT_VIEWER, val);
}
QString Config::getSaveDir()
{
return value(KEY_SAVEDIR).toString();
}
void Config::setSaveDir(QString path)
{
setValue(KEY_SAVEDIR, path);
}
QString Config::getSaveFileName()
{
return value(KEY_SAVENAME).toString();
}
void Config::setSaveFileName(QString fileName)
{
setValue(KEY_SAVENAME, fileName);
}
QString Config::getSaveFormat()
{
return value(KEY_SAVEFORMAT).toString();
}
void Config::setSaveFormat(QString format)
{
setValue(KEY_SAVEFORMAT, format);
}
quint8 Config::getDefDelay()
{
return value(KEY_DELAY_DEF).toInt();
}
void Config::setDefDelay(quint8 sec)
{
setValue(KEY_DELAY_DEF, sec);
}
quint8 Config::getDelay()
{
return value(KEY_DELAY).toInt();
}
void Config::setDelay(quint8 sec)
{
setValue(KEY_DELAY, sec);
}
quint8 Config::getAutoCopyFilenameOnSaving()
{
return value(KEY_FILENAME_TO_CLB).toInt();
}
void Config::setAutoCopyFilenameOnSaving(quint8 val)
{
setValue(KEY_FILENAME_TO_CLB, val);
}
quint8 Config::getTrayMessages()
{
return value(KEY_TRAYMESSAGES).toInt();
}
void Config::setTrayMessages(quint8 type)
{
setValue(KEY_TRAYMESSAGES, type);
}
bool Config::getAllowMultipleInstance()
{
return value(KEY_ALLOW_COPIES).toBool();
}
void Config::setAllowMultipleInstance(bool val)
{
setValue(KEY_ALLOW_COPIES, val);
}
bool Config::getCloseInTray()
{
return value(KEY_CLOSE_INTRAY).toBool();
}
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();
}
void Config::setTimeTrayMess(int sec)
{
setValue(KEY_TIME_NOTIFY, sec);
}
QSize Config::getRestoredWndSize()
{
QSize wndSize(value(KEY_WND_WIDTH).toInt(), value(KEY_WND_HEIGHT).toInt());
return wndSize;
}
void Config::setRestoredWndSize(int w, int h)
{
setValue(KEY_WND_WIDTH, w);
setValue(KEY_WND_HEIGHT, h);
}
bool Config::getDateTimeInFilename()
{
return value(KEY_FILENAMEDATE).toBool();
}
void Config::setDateTimeInFilename(bool val)
{
setValue(KEY_FILENAMEDATE, val);
}
bool Config::getAutoSave()
{
return value(KEY_AUTOSAVE).toBool();
}
void Config::setAutoSave(bool val)
{
setValue(KEY_AUTOSAVE, val);
}
quint8 Config::getImageQuality()
{
return value(KEY_IMG_QUALITY).toInt();
}
void Config::setImageQuality(quint8 qualuty)
{
setValue(KEY_IMG_QUALITY, qualuty);
}
bool Config::getAutoSaveFirst()
{
return value(KEY_AUTOSAVE_FIRST).toBool();
}
void Config::setAutoSaveFirst(bool val)
{
setValue(KEY_AUTOSAVE_FIRST, val);
}
QString Config::getDateTimeTpl()
{
return value(KEY_DATETIME_TPL).toString();
}
void Config::setDateTimeTpl(QString tpl)
{
setValue(KEY_DATETIME_TPL, tpl);
}
bool Config::getZoomAroundMouse()
{
return value(KEY_ZOOMBOX).toBool();
}
void Config::setZoomAroundMouse(bool val)
{
setValue(KEY_ZOOMBOX, val);
}
bool Config::getShowTrayIcon()
{
return value(KEY_SHOW_TRAY).toBool();
}
void Config::setShowTrayIcon(bool val)
{
setValue(KEY_SHOW_TRAY, val);
}
bool Config::getNoDecoration()
{
return value(KEY_NODECOR).toBool();
}
void Config::setNoDecoration(bool val)
{
setValue(KEY_NODECOR, val);
}
void Config::saveWndSize()
{
// saving size
_settings->beginGroup("Display");
_settings->setValue(KEY_WND_WIDTH, getRestoredWndSize().width());
_settings->setValue(KEY_WND_HEIGHT, getRestoredWndSize().height());
_settings->endGroup();
}
// load all settings from conf file
void Config::loadSettings()
{
_settings->beginGroup("Base");
setSaveDir(_settings->value(KEY_SAVEDIR, getDirNameDefault()).toString() );
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());
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());
setAutoSave(_settings->value(KEY_AUTOSAVE, DEF_AUTO_SAVE).toBool());
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());
_settings->endGroup();
_settings->beginGroup("Display");
setTrayMessages(_settings->value(KEY_TRAYMESSAGES, DEF_TRAY_MESS_TYPE).toInt());
setTimeTrayMess(_settings->value(KEY_TIME_NOTIFY, DEF_TIME_TRAY_MESS).toInt( ));
setZoomAroundMouse(_settings->value(KEY_ZOOMBOX, DEF_ZOOM_AROUND_MOUSE).toBool());
// TODO - make set windows size without hardcode values
setRestoredWndSize(_settings->value(KEY_WND_WIDTH, DEF_WND_WIDTH).toInt(),
_settings->value(KEY_WND_HEIGHT, DEF_WND_HEIGHT).toInt());
setShowTrayIcon(_settings->value(KEY_SHOW_TRAY, DEF_SHOW_TRAY).toBool());
_settings->endGroup();
_settings->beginGroup("System");
setCloseInTray(_settings->value(KEY_CLOSE_INTRAY, DEF_CLOSE_IN_TRAY).toBool());
setAllowMultipleInstance(_settings->value(KEY_ALLOW_COPIES, DEF_ALLOW_COPIES).toBool());
setEnableExtView(_settings->value(KEY_ENABLE_EXT_VIEWER, DEF_ENABLE_EXT_VIEWER).toBool());
_settings->endGroup();
setDelay(getDefDelay());
_shortcuts->loadSettings();
}
void Config::saveSettings()
{
_settings->beginGroup("Base");
_settings->setValue(KEY_SAVEDIR, getSaveDir());
_settings->setValue(KEY_SAVENAME, getSaveFileName());
_settings->setValue(KEY_SAVEFORMAT, getSaveFormat());
_settings->setValue(KEY_DELAY, getDefDelay());
_settings->setValue(KEY_FILENAME_TO_CLB, getAutoCopyFilenameOnSaving());
_settings->setValue(KEY_FILENAMEDATE, getDateTimeInFilename());
_settings->setValue(KEY_DATETIME_TPL, getDateTimeTpl());
_settings->setValue(KEY_AUTOSAVE, getAutoSave());
_settings->setValue(KEY_AUTOSAVE_FIRST, getAutoSaveFirst());
_settings->setValue(KEY_IMG_QUALITY, getImageQuality());
_settings->setValue(KEY_NODECOR, getNoDecoration());
_settings->endGroup();
_settings->beginGroup("Display");
_settings->setValue(KEY_TRAYMESSAGES, getTrayMessages());
_settings->setValue(KEY_TIME_NOTIFY, getTimeTrayMess());
_settings->setValue(KEY_ZOOMBOX, getZoomAroundMouse());
_settings->setValue(KEY_SHOW_TRAY, getShowTrayIcon());
_settings->endGroup();
saveWndSize();
_settings->beginGroup("System");
_settings->setValue(KEY_CLOSE_INTRAY, getCloseInTray());
_settings->setValue(KEY_ALLOW_COPIES, getAllowMultipleInstance());
_settings->setValue(KEY_ENABLE_EXT_VIEWER, getEnableExtView());
_settings->endGroup();
_shortcuts->saveSettings();
resetScrNum();
}
// set default values
void Config::setDefaultSettings()
{
setSaveDir(getDirNameDefault());
setSaveFileName(DEF_SAVE_NAME);
setSaveFormat(DEF_SAVE_FORMAT);
setDefDelay(DEF_DELAY);
setImageQuality(DEF_IMG_QUALITY);
setDateTimeInFilename(DEF_DATETIME_FILENAME);
setDateTimeTpl(DEF_DATETIME_TPL);
setAutoCopyFilenameOnSaving(DEF_FILENAME_TO_CLB);
setAutoSave(DEF_AUTO_SAVE);
setAutoSaveFirst(DEF_AUTO_SAVE_FIRST);
setTrayMessages(DEF_TRAY_MESS_TYPE);
setZoomAroundMouse(DEF_ZOOM_AROUND_MOUSE);
setCloseInTray(DEF_CLOSE_IN_TRAY);
setTimeTrayMess(DEF_TIME_TRAY_MESS);
setAllowMultipleInstance(DEF_ALLOW_COPIES);
// TODO - make set windows size without hardcode values
// setRestoredWndSize(DEF_WND_WIDTH, DEF_WND_HEIGHT);
setShowTrayIcon(DEF_SHOW_TRAY);
setEnableExtView(DEF_ENABLE_EXT_VIEWER);
_shortcuts->setDefaultSettings();
setNoDecoration(DEF_X11_NODECOR);
setDelay(DEF_DELAY);
quint8 countModules = Core::instance()->modules()->count();
for (int i = 0; i < countModules; ++i)
Core::instance()->modules()->getModule(i)->defaultSettings();
}
// get defaukt directory path
QString Config::getDirNameDefault()
{
return QDir::homePath()+QDir::separator();
}
// get id of default save format
int Config::getDefaultFormatID()
{
return _imageFormats.indexOf(getSaveFormat());
}
QString Config::getSysLang()
{
QByteArray lang = qgetenv("LC_ALL");
if (lang.isEmpty())
lang = qgetenv("LC_MESSAGES");
if (lang.isEmpty())
lang = qgetenv("LANG");
if (!lang.isEmpty())
return QLocale (lang).name();
else
return QLocale::system().name();
}
ShortcutManager* Config::shortcuts()
{
return _shortcuts;
}

@ -0,0 +1,260 @@
/***************************************************************************
* 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. *
***************************************************************************/
#ifndef CONFIG_H
#define CONFIG_H
#include "shortcutmanager.h"
#include <QSettings>
#include <QString>
#include <QSize>
#include <QHash>
#include <QVariant>
#include <QDateTime>
// default values const
const QString DEF_SAVE_NAME = "screen";
const QString DEF_SAVE_FORMAT = "png";
const quint8 DEF_DELAY = 0;
const bool DEF_X11_NODECOR = false;
const quint8 DEF_TRAY_MESS_TYPE = 1;
const quint8 DEF_FILENAME_TO_CLB = 0;
const quint8 DEF_IMG_QUALITY = 80;
const bool DEF_CLOSE_IN_TRAY = false;
const bool DEF_ALLOW_COPIES = true;
const bool DEF_ZOOM_AROUND_MOUSE = false;
// TODO - make set windows size without hardcode values
const int DEF_WND_WIDTH = 480;
const int DEF_WND_HEIGHT = 281;
const int DEF_TIME_TRAY_MESS = 5;
const bool DEF_DATETIME_FILENAME = false;
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;
// class worker with conf data
class Config
{
public:
// type of shortcut
enum Type {
globalShortcut = 0,
localShortcut = 1
};
Q_DECLARE_FLAGS(ShortcutType, Type)
// definition of shortcut
enum Actions {
shortcutFullScreen = 0,
shortcutActiveWnd = 1,
shortcutAreaSelect = 2,
shortcutNew = 3,
shortcutSave = 4,
shortcutCopy = 5,
shortcutOptions = 6,
shortcutHelp = 7,
shortcutClose = 8
};
Q_DECLARE_FLAGS(ShortcutAction, Actions)
enum AutoCopyFilename {
nameToClipboardOff = 0,
nameToClipboardFile = 1,
nameToClipboardPath = 2
};
Q_DECLARE_FLAGS(FilenameToClipboard, AutoCopyFilename)
/**
* Get current instance of configuration object
* @return Pointer on created object
*/
static Config* instance();
/**
* Destroy current Config object
*/
static void killInstance();
~Config();
/**
* @brief Gets the configuration file for screengrab. It's
* inside the folder returned by getConfigDir().
*/
static QString getConfigFile();
/**
* @brief Gets the directory where to save the configuration files.
* Does not end with '/'.
*/
static QString getConfigDir();
/**
* Load configuration data from conf file
*/
void loadSettings();
/**
* Save configuration data to conf file
*/
void saveSettings();
/**
* Reset configuration data from default values
*/
void setDefaultSettings();
// save dir
QString getSaveDir();
void setSaveDir(QString path);
// filename default
QString getSaveFileName();
void setSaveFileName(QString fileName);
// save format str
QString getSaveFormat();
void setSaveFormat(QString format);
// default delay
quint8 getDefDelay();
void setDefDelay(quint8 sec);
quint8 getDelay();
void setDelay(quint8 sec);
quint8 getAutoCopyFilenameOnSaving();
void setAutoCopyFilenameOnSaving(quint8 val);
// trayMessages
quint8 getTrayMessages();
void setTrayMessages(quint8 type);
// allow multiple copies
bool getAllowMultipleInstance();
void setAllowMultipleInstance(bool val);
// closing in tray
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);
bool getDateTimeInFilename();
void setDateTimeInFilename(bool val);
// auto save screenshot
bool getAutoSave();
void setAutoSave(bool val);
// umage qualuty
quint8 getImageQuality();
void setImageQuality(quint8 qualuty);
// aoutosave first screenshot
bool getAutoSaveFirst();
void setAutoSaveFirst(bool val);
// size wnd
QSize getRestoredWndSize();
void setRestoredWndSize(int w, int h);
void saveWndSize();
// get default image save format
int getDefaultFormatID();
QString getDirNameDefault();
// datetime template
QString getDateTimeTpl();
void setDateTimeTpl(QString tpl);
// zoom aroundd mouse
bool getZoomAroundMouse();
void setZoomAroundMouse(bool val);
// show tray icon option
bool getShowTrayIcon();
void setShowTrayIcon(bool val);
// no decoration of window
bool getNoDecoration();
void setNoDecoration(bool val);
QString getScrNumStr();
int getScrNum() const;
void increaseScrNum();
void resetScrNum();
void updateLastSaveDate();
QDateTime getLastSaveDate() const;
bool getEnableExtView();
void setEnableExtView(bool val);
static QString getSysLang();
ShortcutManager* shortcuts();
private:
Config();
Config(const Config &);
Config& operator=(const Config& );
static Config *ptrInstance;
/**
* Return value on configuration parameter
*
* @param String of name key
* @return QVariant value of configuration parameter
*/
QVariant value(const QString &key);
/**
* Set value on configuration parameter
*
* @param String of name key
* @param String of saved value
*/
void setValue(const QString& key, QVariant val);
QSettings *_settings;
QHash<QString, QVariant> _confData;
ShortcutManager *_shortcuts;
QVector<QString> _imageFormats;
int _scrNum; // screen num in session
QDateTime _dateLastSaving;
};
#endif // CONFIG_H

@ -0,0 +1,548 @@
/***************************************************************************
* 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 <QMutex>
#include <QWaitCondition>
#include <QApplication>
#include <QDesktopWidget>
#include <QScreen>
#include <QChar>
#include <QBuffer>
#include <QFile>
#include <QDir>
#include <QUuid>
#include <QDebug>
#include "core/core.h"
#include <KF5/KWindowSystem/KWindowSystem>
#ifdef SG_EXT_UPLOADS
#include "modules/uploader/moduleuploader.h"
#endif
Core* Core::corePtr = 0;
Core::Core()
{
qRegisterMetaType<StateNotifyMessage>("StateNotifyMessage");
_conf = Config::instance();
_conf->loadSettings();
_pixelMap = new QPixmap;
_selector = 0;
_firstScreen = true;
_cmdLine.setApplicationDescription("ScreenGrab " + tr("is a crossplatform application for fast creating screenshots of your desktop."));
_cmdLine.addHelpOption();
_cmdLine.addVersionOption();
QCommandLineOption optFullScreen(QStringList() << "f" << "fullscreen", tr("Take a fullscreen screenshot"));
_cmdLine.addOption(optFullScreen);
_screenTypeOpts.append(optFullScreen);
QCommandLineOption optActiveWnd(QStringList() << "a" << "active", tr("Take a screenshot of the active window"));
_cmdLine.addOption(optActiveWnd);
_screenTypeOpts.append(optActiveWnd);
QCommandLineOption optSelectedRect(QStringList() << "r" << "region", tr("Take a screenshot of a selection of the screen"));
_cmdLine.addOption(optSelectedRect);
_screenTypeOpts.append(optSelectedRect);
QCommandLineOption optRunMinimized(QStringList() << "m" << "minimized", tr("Run the application with a hidden main window"));
_cmdLine.addOption(optRunMinimized);
sleep(250);
_wnd = NULL;
}
Core::Core(const Core& ): QObject()
{
}
Core& Core::operator=(const Core &)
{
return *this;
}
Core* Core::instance()
{
if (!corePtr)
corePtr = new Core;
return corePtr;
}
Core::~Core()
{
delete _pixelMap;
_conf->killInstance();
}
void Core::initWindow(const QString& ipcMessage)
{
if (!_wnd) {
_wnd = new MainWindow;
_wnd->setConfig(_conf);
_wnd->updateModulesActions(_modules.generateModulesActions());
_wnd->updateModulesenus(_modules.generateModulesMenus());
screenShot(true); // first screenshot
_wnd->resize(_conf->getRestoredWndSize());
if (_wnd) {
if (runAsMinimized())
{
if (_wnd->isTrayed())
_wnd->windowHideShow();
else
_wnd->showMinimized();
} else
_wnd->show();
}
} else {
_wnd->showWindow(ipcMessage);
screenShot();
}
}
void Core::sleep(int msec)
{
QMutex mutex;
mutex.lock();
QWaitCondition pause;
pause.wait(&mutex, msec); // def 240
mutex.unlock();
}
void Core::coreQuit()
{
_conf->setRestoredWndSize(_wnd->width(), _wnd->height());
_conf->saveWndSize();
if (_wnd) {
_wnd->close();
}
if (corePtr)
{
delete corePtr;
corePtr = NULL;
}
qApp->quit();
}
void Core::setScreen()
{
_wnd->hideToShot();
// new code experimental
if (_conf->getDelay() == 0)
QTimer::singleShot(200, this, SLOT(screenShot()));
else
QTimer::singleShot(1000 * _conf->getDelay(), this, SLOT(screenShot()));
}
// get screenshot
void Core::screenShot(bool first)
{
sleep(400); // delay for hide "fade effect" bug in the KWin with compositing
_firstScreen = first;
// Update date last crenshot, if it is a first screen
if (_firstScreen)
_conf->updateLastSaveDate();
switch(_conf->getTypeScreen())
{
case 0:
{
const QList<QScreen *> screens = qApp->screens();
const QDesktopWidget *desktop = QApplication::desktop();
const int screenNum = desktop->screenNumber(QCursor::pos());
*_pixelMap = screens[screenNum]->grabWindow(desktop->winId());
checkAutoSave(first);
_wnd->updatePixmap(_pixelMap);
break;
}
case 1:
{
getActiveWindow();
checkAutoSave(first);
_wnd->updatePixmap(_pixelMap);
break;
}
case 2:
{
_selector = new RegionSelect(_conf);
connect(_selector, &RegionSelect::processDone, this, &Core::regionGrabbed);
break;
}
case 3:
{
_selector = new RegionSelect(_conf, _lastSelectedArea);
connect(_selector, &RegionSelect::processDone, this, &Core::regionGrabbed);
break;
}
default:
*_pixelMap = QPixmap::grabWindow(QApplication::desktop()->winId());
break;
}
_wnd->updatePixmap(_pixelMap);
_wnd->restoreFromShot();
}
void Core::checkAutoSave(bool first)
{
if (_conf->getAutoSave())
{
// hack
if (first)
{
if (_conf->getAutoSaveFirst())
QTimer::singleShot(600, this, SLOT(autoSave()));
}
else
autoSave();
}
else
{
if (!first)
{
StateNotifyMessage message(tr("New screen"), tr("New screen is getted!"));
_wnd->showTrayMessage(message.header, message.message);
}
}
}
void Core::getActiveWindow()
{
const QList<QScreen *> screens = qApp->screens();
const QDesktopWidget *desktop = QApplication::desktop();
const int screenNum = desktop->screenNumber(QCursor::pos());
WId wnd = KWindowSystem::activeWindow();
if (!wnd)
{
*_pixelMap = screens[screenNum]->grabWindow(desktop->winId());
exit(1);
}
// no decorations option is selected
if (_conf->getNoDecoration())
{
*_pixelMap = screens[screenNum]->grabWindow(wnd);
return;
}
KWindowInfo info(wnd, NET::XAWMState | NET::WMFrameExtents);
if (info.mappingState() != NET::Visible)
qWarning() << "Window not visible";
QRect geometry = info.frameGeometry();
*_pixelMap = screens[screenNum]->grabWindow(QApplication::desktop()->winId(),
geometry.x(),
geometry.y(),
geometry.width(),
geometry.height());
}
QString Core::getSaveFilePath(QString format)
{
QString initPath;
do
{
if (_conf->getDateTimeInFilename())
initPath = _conf->getSaveDir() + _conf->getSaveFileName() + "-" + getDateTimeFileName() + "." + format;
else
{
if (_conf->getScrNum() != 0)
initPath = _conf->getSaveDir() + _conf->getSaveFileName() + _conf->getScrNumStr() + "." + format;
else
initPath = _conf->getSaveDir() + _conf->getSaveFileName() + "." + format;
}
} while (checkExsistFile(initPath));
return initPath;
}
bool Core::checkExsistFile(QString path)
{
bool exist = QFile::exists(path);
if (exist)
_conf->increaseScrNum();
return exist;
}
QString Core::getDateTimeFileName()
{
QString currentDateTime = QDateTime::currentDateTime().toString(_conf->getDateTimeTpl());
if (currentDateTime == _conf->getLastSaveDate().toString(_conf->getDateTimeTpl()) && _conf->getScrNum() != 0)
currentDateTime += "-" + _conf->getScrNumStr();
else
_conf->resetScrNum();
return currentDateTime;
}
Config *Core::config()
{
return _conf;
}
void Core::updatePixmap()
{
if (QFile::exists(_tempFilename))
{
_pixelMap->load(_tempFilename, "png");
_wnd->updatePixmap(_pixelMap);
}
}
QString Core::getTempFilename(const QString& format)
{
_tempFilename = QUuid::createUuid().toString();
int size = _tempFilename.size() - 2;
_tempFilename = _tempFilename.mid(1, size).left(8);
_tempFilename = QDir::tempPath() + QDir::separator() + "screenshot-" + _tempFilename + "." + format;
return _tempFilename;
}
void Core::killTempFile()
{
if (QFile::exists(_tempFilename))
{
QFile::remove(_tempFilename);
_tempFilename.clear();
}
}
bool Core::writeScreen(QString& fileName, QString& format, bool tmpScreen)
{
// adding extension format
if (!fileName.contains("." + format))
fileName.append("." + format);
// saving temp file (for uploader module)
if (tmpScreen)
{
if (!fileName.isEmpty())
return _pixelMap->save(fileName, format.toLatin1(), _conf->getImageQuality());
else
return false;
}
// writing file
bool saved = false;
if (!fileName.isEmpty())
{
if (format == "jpg")
saved = _pixelMap->save(fileName,format.toLatin1(), _conf->getImageQuality());
else
saved = _pixelMap->save(fileName,format.toLatin1(), -1);
if (saved)
{
StateNotifyMessage message(tr("Saved"), tr("Saved to ") + fileName);
message.message = message.message + copyFileNameToCliipboard(fileName);
_conf->updateLastSaveDate();
_wnd->showTrayMessage(message.header, message.message);
}
else
qWarning() << "Error saving file " << fileName;
}
return saved;
}
QString Core::copyFileNameToCliipboard(QString file)
{
QString retString = "";
switch (_conf->getAutoCopyFilenameOnSaving())
{
case Config::nameToClipboardFile:
{
file = file.section('/', -1);
QApplication::clipboard()->setText(file);
retString = QChar(QChar::LineSeparator) + tr("Name of saved file is copied to the clipboard");
break;
}
case Config::nameToClipboardPath:
{
QApplication::clipboard()->setText(file);
retString = QChar(QChar::LineSeparator) + tr("Path to saved file is copied to the clipboard");
break;
}
default:
break;
}
return retString;
}
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);
}
void Core::openInExtViewer()
{
if (_conf->getEnableExtView())
{
QString format = _conf->getSaveFormat();
if (format.isEmpty())
format = "png";
QString tempFileName = getTempFilename(format);
writeScreen(tempFileName, format, true);
QString exec;
exec = "xdg-open";
QStringList args;
args << tempFileName;
QProcess *execProcess = new QProcess(this);
void (QProcess:: *signal)(int, QProcess::ExitStatus) = &QProcess::finished;
connect(execProcess, signal, this, &Core::closeExtViewer);
execProcess->start(exec, args);
}
}
void Core::closeExtViewer(int, QProcess::ExitStatus)
{
sender()->deleteLater();
killTempFile();
}
ModuleManager* Core::modules()
{
return &_modules;
}
void Core::addCmdLineOption(const QCommandLineOption& option)
{
_cmdLine.addOption(option);
}
bool Core::checkCmdLineOption(const QCommandLineOption& option)
{
return _cmdLine.isSet(option);
}
bool Core::checkCmdLineOptions(const QStringList &options)
{
for (int i = 0; i < options.count(); ++i)
if (_cmdLine.isSet(options.at(i)))
return true;
return false;
}
void Core::processCmdLineOpts(const QStringList& arguments)
{
_cmdLine.process(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);
#ifdef SG_EXT_UPLOADS
/// FIXMA - In module interface need add the mthod for geting module cmdLine options
const QString UPLOAD_CMD_PARAM = "upload";
const QString UPLOAD_CMD_PARAM_SHORT = "u";
QCommandLineOption u(QStringList() << UPLOAD_CMD_PARAM_SHORT << UPLOAD_CMD_PARAM);
if (_cmdLine.isSet(u)) {
ModuleUploader *uploader = static_cast<ModuleUploader*>(_modules.getModule(MOD_UPLOADER));
connect(uploader, &ModuleUploader::uploadCompleteWithQuit, qApp, &QApplication::quit);
uploader->init();
} else
initWindow();
#endif
}
bool Core::runAsMinimized()
{
return (_cmdLine.isSet("minimized") || _cmdLine.isSet("m"));
}
void Core::autoSave()
{
QString format = _conf->getSaveFormat();
QString fileName = getSaveFilePath(format);
writeScreen(fileName, format);
}
QString Core::getVersionPrintable()
{
QString str = "ScreenGrab: " + qApp->applicationVersion() + QString("\n");
str += "Qt: " + QString(qVersion()) + QString("\n");
return str;
}
QPixmap* Core::getPixmap()
{
return _pixelMap;
}
QByteArray Core::getScreen()
{
QByteArray bytes;
QBuffer buffer(&bytes);
buffer.open(QIODevice::WriteOnly);
_pixelMap->save(&buffer, _conf->getSaveFormat().toLatin1());
return bytes;
}
void Core::regionGrabbed(bool grabbed)
{
if (grabbed)
{
*_pixelMap = _selector->getSelection();
int x = _selector->getSelectionStartPos().x();
int y = _selector->getSelectionStartPos().y();
int w = _pixelMap->rect().width();
int h = _pixelMap->rect().height();
_lastSelectedArea.setRect(x, y, w, h);
checkAutoSave();
}
_wnd->updatePixmap(_pixelMap);
_selector->deleteLater();
}

@ -0,0 +1,142 @@
/***************************************************************************
* 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. *
***************************************************************************/
#ifndef SCREENGRAB_H
#define SCREENGRAB_H
#ifndef STR_PROC
#define STR_PROC "screengrab-qt"
#endif
#include "config.h"
#include "regionselect.h"
#include "modulemanager.h"
#include "ui/mainwindow.h"
#include <QObject>
#include <QTimer>
#include <QPixmap>
#include <QClipboard>
#include <QTime>
#include <QByteArray>
#include <QRect>
#include <QProcess>
#include <QX11Info>
#include <QCommandLineParser>
#include <QCommandLineOption>
#include <QDebug>
struct StateNotifyMessage {
QString header;
QString message;
StateNotifyMessage()
{
header = "";
message = "";
};
StateNotifyMessage(QString h, QString m)
{
header = h;
message = m;
};
};
class Core : public QObject
{
Q_OBJECT
public Q_SLOTS:
void coreQuit();
void setScreen();
void screenShot(bool first = false);
void autoSave();
public:
static Core* instance();
~Core();
void initWindow(const QString& ipcMessage = QString());
void sleep(int msec = 350);
static QString getVersionPrintable();
QPixmap* getPixmap();
QByteArray getScreen();
void updatePixmap();
QString getTempFilename(const QString& format);
void killTempFile();
bool writeScreen(QString& fileName, QString& format, bool tmpScreen = false);
void copyScreen();
void openInExtViewer();
ModuleManager* modules();
void addCmdLineOption(const QCommandLineOption& option);
bool checkCmdLineOption(const QCommandLineOption& option);
bool checkCmdLineOptions(const QStringList& options);
void processCmdLineOpts(const QStringList& arguments);
bool runAsMinimized();
QString getSaveFilePath(QString format);
QString getDateTimeFileName();
Config* config();
private:
Core();
Core(const Core &);
Core& operator=(const Core &);
static Core *corePtr;
void checkAutoSave(bool first = false);
void getActiveWindow();
bool checkExsistFile(QString path);
QString copyFileNameToCliipboard(QString file);
QPixmap *_pixelMap; // pixel map
RegionSelect *_selector; // region grabber widget
QRect _lastSelectedArea;
QCommandLineParser _cmdLine;
ModuleManager _modules;
QString _tempFilename;
Config *_conf;
MainWindow *_wnd;
bool _hided;
bool _firstScreen;
QList<QCommandLineOption> _screenTypeOpts;
private Q_SLOTS:
void regionGrabbed(bool grabbed);
void closeExtViewer(int exitCode, QProcess::ExitStatus exitStatus);
};
#endif // SCREENGRAB_H

@ -0,0 +1,45 @@
/***************************************************************************
* 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 "singleapp.h"
#include "core/core.h"
#include "ui/mainwindow.h"
#include <QDebug>
int main(int argc, char *argv[])
{
SingleApp scr(argc, argv, VERSION);
scr.setApplicationVersion(VERSION);
Core *ScreenGrab = Core::instance();
ScreenGrab->modules()->initModules();
ScreenGrab->processCmdLineOpts(scr.arguments());
QObject::connect(&scr, &SingleApp::messageReceived, ScreenGrab, &Core::initWindow);
if (!ScreenGrab->config()->getAllowMultipleInstance() && scr.isRunning())
{
QString type = QString::number(ScreenGrab->config()->getTypeScreen());
scr.sendMessage("screengrab --type=" + type);
return 0;
}
return scr.exec();
}

@ -0,0 +1,120 @@
/***************************************************************************
* 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 "modulemanager.h"
#ifdef SG_EXT_UPLOADS
#include "src/modules/uploader/moduleuploader.h"
#endif
#ifdef SG_EXT_EDIT
#include "src/modules/extedit/moduleextedit.h"
#endif
#include <QDebug>
ModuleManager::ModuleManager()
{
_modules = new ModuleList_t();
}
void ModuleManager::initModules()
{
#ifdef SG_EXT_UPLOADS
ModuleUploader *uploader = new ModuleUploader();
_modules->insert(MOD_UPLOADER , uploader);
#endif
#ifdef SG_EXT_EDIT
ModuleExtEdit *extedit = new ModuleExtEdit();
_modules->insert(MOD_EXT_EDIT.data(), extedit);
#endif
}
AbstractModule* ModuleManager::getModule(const QByteArray& name)
{
if (_modules->contains(name))
return _modules->value(name);
return 0;
}
AbstractModule* ModuleManager::getModule(const quint8 numid)
{
if (numid < _modules->count())
{
QByteArray key = _modules->keys().at(numid);
return _modules->value(key);
}
return 0;
}
QList<QMenu*> ModuleManager::generateModulesMenus(QStringList modules)
{
QList<QMenu*> list;
if (modules.isEmpty() == true)
{
for (int i =0; i < _modules->keys().count(); ++i)
{
QMenu *menu = _modules->value(_modules->keys().at(i))->initModuleMenu();
list.append(menu);
}
}
else
{
for (int i = 0; i < modules.count(); ++i)
{
QByteArray currentKey = modules.at(i).toLatin1();
QMenu *menu = _modules->value(currentKey)->initModuleMenu();
list.append(menu);
}
}
return list;
}
QList<QAction*> ModuleManager::generateModulesActions(QStringList modules)
{
QList<QAction*> list;
if (modules.isEmpty())
{
for (int i =0; i < _modules->keys().count(); ++i)
{
QAction *action = _modules->value(_modules->keys().at(i))->initModuleAction();
list.append(action);
}
}
else
{
for (int i = 0; i < modules.count(); ++i)
{
QByteArray currentKey = modules.at(i).toLatin1();
QAction *action = _modules->value(currentKey)->initModuleAction();
list.append(action);
}
}
return list;
}
quint8 ModuleManager::count()
{
return _modules->count();
}

@ -0,0 +1,53 @@
/***************************************************************************
* 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. *
***************************************************************************/
#ifndef MODULEMANAGER_H
#define MODULEMANAGER_H
#include "modules/abstractmodule.h"
#include <QByteArray>
#include <QHash>
#include <QMap>
#include <QMenu>
#include <QAction>
const QByteArray MOD_UPLOADER = "uploader";
const QByteArray MOD_EXT_EDIT = "extedit";
typedef QMap<QByteArray, AbstractModule*> ModuleList_t;
class ModuleManager
{
public:
ModuleManager();
void initModules();
AbstractModule* getModule(const QByteArray& name);
AbstractModule* getModule(const quint8 numid);
QList<QMenu*> generateModulesMenus(QStringList modules = QStringList());
QList<QAction*> generateModulesActions(QStringList modules = QStringList());
quint8 count();
private:
ModuleList_t *_modules;
};
#endif // MODULEMANAGER_H

@ -0,0 +1,231 @@
/***************************************************************************
* 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 "src/core/regionselect.h"
#include <QDesktopWidget>
#include <QApplication>
#include <QScreen>
RegionSelect::RegionSelect(Config *mainconf, QWidget *parent)
:QWidget(parent)
{
_conf = mainconf;
sharedInit();
move(0, 0);
drawBackGround();
_processSelection = false;
show();
grabKeyboard();
grabMouse();
}
RegionSelect::RegionSelect(Config* mainconf, const QRect& lastRect, QWidget* parent)
: QWidget(parent)
{
_conf = mainconf;
sharedInit();
_selectRect = lastRect;
move(0, 0);
drawBackGround();
_processSelection = false;
show();
grabKeyboard();
grabMouse();
}
RegionSelect::~RegionSelect()
{
_conf = NULL;
delete _conf;
}
void RegionSelect::sharedInit()
{
setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint);
setWindowState(Qt::WindowFullScreen);
setCursor(Qt::CrossCursor);
_sizeDesktop = QApplication::desktop()->size();
resize(_sizeDesktop);
const QList<QScreen *> screens = qApp->screens();
const QDesktopWidget *desktop = QApplication::desktop();
const int screenNum = desktop->screenNumber(QCursor::pos());
if (screenNum < screens.count()) {
_desktopPixmapBkg = screens[screenNum]->grabWindow(desktop->winId());
}
_desktopPixmapClr = _desktopPixmapBkg;
}
void RegionSelect::paintEvent(QPaintEvent *event)
{
Q_UNUSED(event)
QPainter painter(this);
painter.drawPixmap(QPoint(0, 0), _desktopPixmapBkg);
drawRectSelection(painter);
}
void RegionSelect::mousePressEvent(QMouseEvent* event)
{
if (event->button() != Qt::LeftButton)
return;
_selStartPoint = event->pos();
_processSelection = true;
}
void RegionSelect::mouseReleaseEvent(QMouseEvent* event)
{
_selEndPoint = event->pos();
_processSelection = false;
}
void RegionSelect::mouseDoubleClickEvent(QMouseEvent* event)
{
if (event->button() != Qt::LeftButton)
return;
Q_EMIT processDone(true);
}
void RegionSelect::mouseMoveEvent(QMouseEvent *event)
{
if (_processSelection)
{
_selEndPoint = event->pos();
_selectRect = QRect(_selStartPoint, _selEndPoint).normalized();
update();
}
}
void RegionSelect::keyPressEvent(QKeyEvent* event)
{
// canceled select screen area
if (event->key() == Qt::Key_Escape)
Q_EMIT processDone(false);
// canceled select screen area
else if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return)
Q_EMIT processDone(true);
else
event->ignore();
}
void RegionSelect::drawBackGround()
{
// create painter on pixelmap of desktop
QPainter painter(&_desktopPixmapBkg);
// set painter brush on 85% transparency
painter.setBrush(QBrush(QColor(0, 0, 0, 85), Qt::SolidPattern));
// draw rect of desktop size in poainter
painter.drawRect(QApplication::desktop()->rect());
QRect txtRect = QApplication::desktop()->screenGeometry(QApplication::desktop()->primaryScreen());
QString txtTip = QApplication::tr("Use your mouse to draw a rectangle to screenshot or exit pressing\nany key or using the right or middle mouse buttons.");
txtRect.setHeight(qRound((float) (txtRect.height() / 10))); // rounded val of text rect height
painter.setPen(QPen(Qt::red)); // ste message rect border color
painter.setBrush(QBrush(QColor(255, 255, 255, 180), Qt::SolidPattern));
QRect txtBgRect = painter.boundingRect(txtRect, Qt::AlignCenter, txtTip);
// set height & width of bkg rect
txtBgRect.setX(txtBgRect.x() - 6);
txtBgRect.setY(txtBgRect.y() - 4);
txtBgRect.setWidth(txtBgRect.width() + 12);
txtBgRect.setHeight(txtBgRect.height() + 8);
painter.drawRect(txtBgRect);
// Draw the text
painter.setPen(QPen(Qt::black)); // black color pen
painter.drawText(txtBgRect, Qt::AlignCenter, txtTip);
// set bkg to pallette widget
QPalette newPalette = palette();
newPalette.setBrush(QPalette::Window, QBrush(_desktopPixmapBkg));
setPalette(newPalette);
}
void RegionSelect::drawRectSelection(QPainter &painter)
{
painter.drawPixmap(_selectRect, _desktopPixmapClr, _selectRect);
painter.setPen(QPen(QBrush(QColor(0, 0, 0, 255)), 2));
painter.drawRect(_selectRect);
QString txtSize = QApplication::tr("%1 x %2 pixels ").arg(_selectRect.width()).arg(_selectRect.height());
painter.drawText(_selectRect, Qt::AlignBottom | Qt::AlignRight, txtSize);
if (!_selEndPoint.isNull() && _conf->getZoomAroundMouse())
{
const quint8 zoomSide = 200;
// create magnifer coords
QPoint zoomStart = _selEndPoint;
zoomStart -= QPoint(zoomSide/5, zoomSide/5); // 40, 40
QPoint zoomEnd = _selEndPoint;
zoomEnd += QPoint(zoomSide/5, zoomSide/5);
// creating rect area for magnifer
QRect zoomRect = QRect(zoomStart, zoomEnd);
QPixmap zoomPixmap = _desktopPixmapClr.copy(zoomRect).scaled(QSize(zoomSide, zoomSide), Qt::KeepAspectRatio);
QPainter zoomPainer(&zoomPixmap); // create painter from pixmap maignifer
zoomPainer.setPen(QPen(QBrush(QColor(255, 0, 0, 180)), 2));
zoomPainer.drawRect(zoomPixmap.rect()); // draw
zoomPainer.drawText(zoomPixmap.rect().center() - QPoint(4, -4), "+");
// position for drawing preview
QPoint zoomCenter = _selectRect.bottomRight();
if (zoomCenter.x() + zoomSide > _desktopPixmapClr.rect().width()
|| zoomCenter.y() + zoomSide > _desktopPixmapClr.rect().height())
zoomCenter -= QPoint(zoomSide, zoomSide);
painter.drawPixmap(zoomCenter, zoomPixmap);
}
}
QPixmap RegionSelect::getSelection()
{
QPixmap sel;
sel = _desktopPixmapClr.copy(_selectRect);
return sel;
}
QPoint RegionSelect::getSelectionStartPos()
{
return _selectRect.topLeft();
}

@ -0,0 +1,77 @@
/***************************************************************************
* 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. *
***************************************************************************/
#ifndef REGIONSELECT_H
#define REGIONSELECT_H
#include "config.h"
//#include <QDialog>
#include <QWidget>
#include <QMouseEvent>
#include <QPainter>
#include <QPixmap>
#include <QSize>
#include <QPoint>
// class RegionSelect : public QDialog
class RegionSelect : public QWidget
{
Q_OBJECT
public:
RegionSelect(Config *mainconf, QWidget *parent = 0);
RegionSelect(Config *mainconf, const QRect& lastRect, QWidget *parent = 0);
virtual ~RegionSelect();
QPixmap getSelection();
QPoint getSelectionStartPos();
protected:
void paintEvent(QPaintEvent *event);
void mousePressEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
void mouseDoubleClickEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void keyPressEvent(QKeyEvent *event);
Q_SIGNALS:
void processDone(bool grabbed);
private:
QRect _selectRect;
QSize _sizeDesktop;
QPoint _selStartPoint;
QPoint _selEndPoint;
bool _processSelection;
QPixmap _desktopPixmapBkg;
QPixmap _desktopPixmapClr;
void sharedInit();
void drawBackGround();
void drawRectSelection(QPainter &painter);
Config *_conf;
};
#endif // REGIONSELECT_H

@ -0,0 +1,149 @@
/***************************************************************************
* 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 "shortcutmanager.h"
#include "src/core/config.h"
const QString DEF_SHORTCUT_NEW = "Ctrl+N";
const QString DEF_SHORTCUT_SAVE = "Ctrl+S";
const QString DEF_SHORTCUT_COPY = "Ctrl+C";
const QString DEF_SHORTCUT_OPT = "Ctrl+P";
const QString DEF_SHORTCUT_HELP = "F1";
const QString DEF_SHORTCUT_CLOSE = "Esc";
const QString DEF_SHORTCUT_FULL = "";
const QString DEF_SHORTCUT_ACTW = "";
const QString DEF_SHORTCUT_AREA = "";
const QString KEY_SHORTCUT_FULL = "FullScreen";
const QString KEY_SHORTCUT_ACTW = "ActiveWindow";
const QString KEY_SHORTCUT_AREA = "AreaSelection";
const QString KEY_SHORTCUT_NEW = "NewScreen";
const QString KEY_SHORTCUT_SAVE = "SaveScreen";
const QString KEY_SHORTCUT_COPY = "CopyScreen";
const QString KEY_SHORTCUT_OPT = "Options";
const QString KEY_SHORTCUT_HELP = "Help";
const QString KEY_SHORTCUT_CLOSE = "Close";
ShortcutManager::ShortcutManager(QSettings *settings) :
_shortcutSettings(new QSettings)
{
_shortcutSettings = settings;
for (int i = Config::shortcutFullScreen; i <= Config::shortcutClose; ++i)
_listShortcuts << Shortcut();
}
ShortcutManager::~ShortcutManager()
{
_shortcutSettings = NULL;
delete _shortcutSettings;
}
void ShortcutManager::loadSettings()
{
_shortcutSettings->beginGroup("LocalShortcuts");
setShortcut(_shortcutSettings->value(KEY_SHORTCUT_NEW, DEF_SHORTCUT_NEW).toString(),
Config::shortcutNew, Config::localShortcut);
setShortcut(_shortcutSettings->value(KEY_SHORTCUT_SAVE, DEF_SHORTCUT_SAVE).toString(),
Config::shortcutSave, Config::localShortcut);
setShortcut(_shortcutSettings->value(KEY_SHORTCUT_COPY, DEF_SHORTCUT_COPY).toString(),
Config::shortcutCopy, Config::localShortcut);
setShortcut(_shortcutSettings->value(KEY_SHORTCUT_OPT, DEF_SHORTCUT_OPT).toString(),
Config::shortcutOptions, Config::localShortcut);
setShortcut(_shortcutSettings->value(KEY_SHORTCUT_HELP, DEF_SHORTCUT_HELP).toString(),
Config::shortcutHelp, Config::localShortcut);
setShortcut(_shortcutSettings->value(KEY_SHORTCUT_CLOSE, DEF_SHORTCUT_CLOSE).toString(),
Config::shortcutClose, Config::localShortcut);
_shortcutSettings->endGroup();
_shortcutSettings->beginGroup("GlobalShortcuts");
setShortcut(_shortcutSettings->value(KEY_SHORTCUT_FULL, DEF_SHORTCUT_FULL).toString(),
Config::shortcutFullScreen, Config::globalShortcut);
setShortcut(_shortcutSettings->value(KEY_SHORTCUT_ACTW, DEF_SHORTCUT_ACTW).toString(),
Config::shortcutActiveWnd, Config::globalShortcut);
setShortcut(_shortcutSettings->value(KEY_SHORTCUT_AREA, DEF_SHORTCUT_AREA).toString(),
Config::shortcutAreaSelect, Config::globalShortcut);
_shortcutSettings->endGroup();
}
void ShortcutManager::saveSettings()
{
_shortcutSettings->beginGroup("LocalShortcuts");
_shortcutSettings->setValue(KEY_SHORTCUT_NEW, getShortcut(Config::shortcutNew));
_shortcutSettings->setValue(KEY_SHORTCUT_SAVE, getShortcut(Config::shortcutSave));
_shortcutSettings->setValue(KEY_SHORTCUT_COPY, getShortcut(Config::shortcutCopy));
_shortcutSettings->setValue(KEY_SHORTCUT_OPT, getShortcut(Config::shortcutOptions));
_shortcutSettings->setValue(KEY_SHORTCUT_HELP, getShortcut(Config::shortcutHelp));
_shortcutSettings->setValue(KEY_SHORTCUT_CLOSE, getShortcut(Config::shortcutClose));
_shortcutSettings->endGroup();
_shortcutSettings->beginGroup("GlobalShortcuts");
_shortcutSettings->setValue(KEY_SHORTCUT_FULL, getShortcut(Config::shortcutFullScreen));
_shortcutSettings->setValue(KEY_SHORTCUT_ACTW, getShortcut(Config::shortcutActiveWnd));
_shortcutSettings->setValue(KEY_SHORTCUT_AREA, getShortcut(Config::shortcutAreaSelect));
_shortcutSettings->endGroup();
}
void ShortcutManager::setDefaultSettings()
{
setShortcut(DEF_SHORTCUT_NEW,Config::shortcutNew, Config::localShortcut);
setShortcut(DEF_SHORTCUT_SAVE,Config::shortcutSave, Config::localShortcut);
setShortcut(DEF_SHORTCUT_COPY,Config::shortcutCopy, Config::localShortcut);
setShortcut(DEF_SHORTCUT_OPT,Config::shortcutOptions, Config::localShortcut);
setShortcut(DEF_SHORTCUT_HELP,Config::shortcutHelp, Config::localShortcut);
setShortcut(DEF_SHORTCUT_CLOSE,Config::shortcutClose, Config::localShortcut);
setShortcut(DEF_SHORTCUT_FULL,Config::shortcutFullScreen, Config::globalShortcut);
setShortcut(DEF_SHORTCUT_ACTW,Config::shortcutActiveWnd, Config::globalShortcut);
setShortcut(DEF_SHORTCUT_AREA,Config::shortcutAreaSelect, Config::globalShortcut);
}
void ShortcutManager::setShortcut(QString key, int action, int type)
{
_listShortcuts[action].key = key;
_listShortcuts[action].action = action;
_listShortcuts[action].type = type;
}
QKeySequence ShortcutManager::getShortcut(int action)
{
return QKeySequence(_listShortcuts[action].key);;
}
int ShortcutManager::getShortcutType(int action)
{
return _listShortcuts[action].type;
}
QStringList ShortcutManager::getShortcutsList(int type)
{
QStringList retList;
for (int i = Config::shortcutFullScreen; i <= Config::shortcutClose; ++i)
{
if (_listShortcuts[i].type == type)
{
if (!_listShortcuts[i].key.isNull())
retList << _listShortcuts[i].key;
else
retList << QString("");
}
}
return retList;
}

@ -0,0 +1,66 @@
/***************************************************************************
* 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. *
***************************************************************************/
#ifndef SHORTCUTMANAGER_H
#define SHORTCUTMANAGER_H
#include <QSettings>
#include <QVector>
#include <QStringList>
#include <QKeySequence>
struct Shortcut {
QString key;
int type;
int action;
Shortcut() {};
Shortcut(QString k, int t, int a)
{
key = k;
type = t;
action = a;
}
};
Q_DECLARE_METATYPE(Shortcut)
typedef QVector<Shortcut> ShortcutList;
class ShortcutManager
{
public:
ShortcutManager(QSettings *settings);
~ShortcutManager();
void loadSettings();
void saveSettings();
void setDefaultSettings();
void setShortcut(QString key, int action, int type);
QKeySequence getShortcut(int action);
int getShortcutType(int action);
QStringList getShortcutsList(int type);
private:
ShortcutList _listShortcuts;
QSettings *_shortcutSettings;
};
#endif // SHORTCUTMANAGER_H

@ -0,0 +1,105 @@
/***************************************************************************
* 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, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include <QTimer>
#include <QByteArray>
#include <QLocalSocket>
#include "singleapp.h"
/*!
Creates of sungle application object
\param argc Nuber of command line arguments
\param argv Array of command line argwuments
\param uniqueKey String key fo unicue shared data indefier
*/
SingleApp::SingleApp(int& argc, char* argv[], const QString keyString) : QApplication(argc, argv), uniqueKey(keyString)
{
sharedMemory.setKey(uniqueKey);
if (sharedMemory.attach())
runned = true;
else
{
runned = false;
// create shared memory.
if (!sharedMemory.create(1))
{
qDebug("Unable to create single instance.");
return;
}
// create local server and listen to incomming messages from other instances.
localServer = new QLocalServer(this);
connect(localServer, SIGNAL(newConnection()), this, SLOT(receiveMessage()));
localServer->listen(uniqueKey);
}
}
// public slots.
void SingleApp::receiveMessage()
{
QLocalSocket *localSocket = localServer->nextPendingConnection();
if (!localSocket->waitForReadyRead(timeout))
{
qDebug("%s", qPrintable(localSocket->errorString().toLatin1()));
return;
}
QByteArray byteArray = localSocket->readAll();
QString message = QString::fromUtf8(byteArray.constData());
emit messageReceived(message);
localSocket->disconnectFromServer();
}
// public functions.
/*!
Checking instance application
\return bool Return tue is another instance running
*/
bool SingleApp::isRunning()
{
return runned;
}
/*1
Sending message to another running instance of application
\param message String dended message
\tryitn bool Return status ofsending message process
*/
bool SingleApp::sendMessage(const QString &message)
{
if (!runned)
return false;
QLocalSocket localSocket(this);
localSocket.connectToServer(uniqueKey, QIODevice::WriteOnly);
if (!localSocket.waitForConnected(timeout))
{
qDebug("%s",qPrintable(localSocket.errorString().toLatin1()));
return false;
}
localSocket.write(message.toUtf8());
if (!localSocket.waitForBytesWritten(timeout))
{
qDebug("%s",qPrintable(localSocket.errorString().toLatin1()));
return false;
}
localSocket.disconnectFromServer();
return true;
}

@ -0,0 +1,52 @@
/***************************************************************************
* 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, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef SINGLEAPP_H
#define SINGLEAPP_H
#include <QApplication>
#include <QSharedMemory>
#include <QLocalServer>
class SingleApp : public QApplication
{
Q_OBJECT
public:
SingleApp(int &argc, char *argv[], const QString keyString);
bool isRunning();
bool sendMessage(const QString &message);
public Q_SLOTS:
void receiveMessage();
Q_SIGNALS:
void messageReceived(const QString& message);
private:
bool runned;
QString uniqueKey;
QSharedMemory sharedMemory;
QLocalServer *localServer;
static const int timeout = 1000;
};
#endif // SINGLEAPP_H

@ -0,0 +1,188 @@
/***************************************************************************
* 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 "about.h"
#include "ui_aboutwidget.h"
#include "../core.h"
#include <QDesktopServices>
AboutDialog::AboutDialog(QWidget *parent):
QDialog(parent),
_ui(new Ui::aboutWidget)
{
setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint | Qt::WindowSystemMenuHint);
_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);
_ui->frame->layout()->addWidget(_ui->txtArea);
tabs->setFixedHeight(24);
tabs->insertTab(0, tr("About"));
tabs->insertTab(1, tr("Thanks"));
tabs->insertTab(2, tr("Help us"));
connect(tabs, &QTabBar::currentChanged, this, &AboutDialog::changeTab);
_ui->txtArea->setHtml(tabAbout());
}
AboutDialog::~AboutDialog()
{
delete _ui;
}
void AboutDialog::changeTab(int tabIndex)
{
// trnder text info
switch(tabIndex)
{
case 0:
_ui->txtArea->setHtml(tabAbout());
break;
case 1:
_ui->txtArea->setHtml(tabThanks());
break;
case 2:
_ui->txtArea->setHtml(tabHelpUs());
break;
default:
_ui->txtArea->setHtml(tabAbout());
}
}
void AboutDialog::changeEvent(QEvent *e)
{
QDialog::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
_ui->retranslateUi(this);
break;
default:
break;
}
}
void AboutDialog::on_butAboutQt_clicked()
{
qApp->aboutQt();
}
void AboutDialog::on_butClose_clicked()
{
accept();
}
QString AboutDialog::tabAbout()
{
QString str;
str += "<b>ScreenGrab</b> ";
str += tr("is a crossplatform application for fast creating screenshots of your desktop.");
str += "<br><br>";
str += tr("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.");
str += "<br><br>";
str += tr("E-Mail")+" - ";
str += "<a href=mailto:doomer3d@gmail.com>doomer3d@gmail.com</a>";
str += "<br>";
str += tr("Web site")+" - ";
str += "<a href=http://screengrab.doomer.org>http://screengrab.doomer.org/</a>";
str += "<br><br>";
str += tr("Licensed under the ");
str += " <a href=http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>GPL v2</a>";
str += "<br><br>";
str += tr("Copyright &copy; 2009-2013, Artem 'DOOMer' Galichkin");
return str;
}
QString AboutDialog::tabHelpUs()
{
QString str;
str += tr("You can join us and help us if you want. This is an invitation if you like this application.");
str += "<br><br>";
str += tr("What you can do?");
str += "<ul>";
str += "<li>" + tr("Translate ScreenGrab to other languages") + "</li>";
str += "<li>" + tr("Make suggestions for next releases") + "</li>";
str += "<li>" + tr("Report bugs and issues") + "</li>";
str += "</ul>";
str += tr("E-Mail");
str += "<br>";
str += "<a href=mailto:doomer3d@gmail.com>mailto:doomer3d@gmail.com</a>";
str += "<br><br>";
str += tr("Bug tracker");
str += "<br>";
str += "<a href=https://github.com/DOOMer/screengrab/issues>https://github.com/DOOMer/screengrab/issues/</a>";
return str;
}
QString AboutDialog::tabThanks()
{
QString str;
str += "<b>" + tr("Translate:") + "</b>";
str += "<br>";
str += tr(" Brazilian Portuguese translation") + "<br>";
str += tr("Marcio Moraes") + " &lt;marciopanto@gmail.com&gt;<br>";
str += "<br>";
str += tr(" Ukrainian translation") + "<br>";
str += tr("Gennadi Motsyo") + " &lt;drool@altlinux.ru&gt;<br>";
str += "<br>";
str += tr(" Spanish translation") + "<br>";
str += tr("Burjans L García D") + " &lt;burjans@gmail.com&gt;<br>";
str += "<br>";
str += tr(" Italian translation") + "<br>";
str += "speps &lt;dreamspepser@yahoo.it&gt;<br>";
str += "<br>";
str += "<b>" + tr("Testing:") + "</b>";
str += "<br>";
str += "Jerome Leclanche - " + tr("Dual monitor support and other in Linux") + "<br>";
str += "Alexander Sokolov - " + tr("Dual monitor support in Linux") + "<br>";
str += "Alexantia - " + tr("win32-build [Windows XP and 7]") + "<br>";
str += "iNight - " + tr("old win32-build [Windows Vista]") + "<br>";
str += "burjans - " + tr("win32-build [Windows 7]") + "<br>";
return str;
}
void AboutDialog::on_txtArea_anchorClicked(QUrl url)
{
QDesktopServices::openUrl(url);
}

@ -0,0 +1,57 @@
/***************************************************************************
* 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. *
***************************************************************************/
#ifndef ABOUT_H
#define ABOUT_H
#include <QDialog>
#include <QTabBar>
#include <QUrl>
namespace Ui {
class aboutWidget;
}
class AboutDialog : public QDialog {
Q_OBJECT
public:
explicit AboutDialog(QWidget *parent = 0);
~AboutDialog();
protected:
void changeEvent(QEvent *e);
private:
Ui::aboutWidget *_ui;
QTabBar *_tabs;
private slots:
void on_txtArea_anchorClicked(QUrl );
void changeTab(int tabIndex);
void on_butClose_clicked();
void on_butAboutQt_clicked();
QString tabAbout();
QString tabHelpUs();
QString tabThanks();
};
#endif // ABOUT_H

@ -0,0 +1,167 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>aboutWidget</class>
<widget class="QDialog" name="aboutWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>559</width>
<height>314</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>559</width>
<height>314</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="windowTitle">
<string notr="true">About ScreenGrab</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../../screengrab.qrc">:/res/img/logo.png</pixmap>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="labAppName">
<property name="text">
<string notr="true">&lt;b&gt;ScreenGrab&lt;/b&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labVersion">
<property name="text">
<string notr="true"/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labQtVer">
<property name="text">
<string notr="true"/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<widget class="QFrame" name="frame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="_2">
<item>
<widget class="QTextBrowser" name="txtArea">
<property name="openExternalLinks">
<bool>false</bool>
</property>
<property name="openLinks">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QPushButton" name="butAboutQt">
<property name="minimumSize">
<size>
<width>112</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>About Qt</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<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="QPushButton" name="butClose">
<property name="minimumSize">
<size>
<width>112</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Close</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources>
<include location="../../screengrab.qrc"/>
<include location="../../screengrab.qrc"/>
</resources>
<connections/>
</ui>

@ -0,0 +1,521 @@
/***************************************************************************
* 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 <QKeyEvent>
#include "configwidget.h"
#include "ui_configwidget.h"
#include "../core.h"
#ifdef SG_GLOBAL_SHORTCUTS
#include <QxtGui/QxtGlobalShortcut>
#endif
#include <QDir>
#include <QFileDialog>
#include <QMessageBox>
#include <QTreeWidgetItem>
#include <QTreeWidgetItemIterator>
ConfigDialog::ConfigDialog(QWidget *parent) :
QDialog(parent),
_ui(new Ui::configwidget)
{
_ui->setupUi(this);
conf = Config::instance();
connect(_ui->butSaveOpt, &QPushButton::clicked, this, &ConfigDialog::saveSettings);
connect(_ui->buttonBrowse, &QPushButton::clicked, this, &ConfigDialog::selectDir);
connect(_ui->butRestoreOpt, &QPushButton::clicked, this, &ConfigDialog::restoreDefaults);
connect(_ui->checkIncDate, &QCheckBox::toggled, this, &ConfigDialog::setVisibleDateTplEdit);
connect(_ui->keyWidget, &QKeySequenceWidget::keySequenceAccepted, this, &ConfigDialog::acceptShortcut);
connect(_ui->keyWidget, &QKeySequenceWidget::keyNotSupported, this, &ConfigDialog::keyNotSupported);
connect(_ui->checkAutoSave, &QCheckBox::toggled, this, &ConfigDialog::setVisibleAutoSaveFirst);
connect(_ui->butCancel, &QPushButton::clicked, this, &ConfigDialog::reject);
connect(_ui->treeKeys, &QTreeWidget::expanded, _ui->treeKeys, &QTreeWidget::clearSelection);
connect(_ui->treeKeys, &QTreeWidget::collapsed, this, &ConfigDialog::collapsTreeKeys);
connect(_ui->checkShowTray, &QCheckBox::toggled, this, &ConfigDialog::toggleCheckShowTray);
connect(_ui->editDateTmeTpl, &QLineEdit::textEdited, this, &ConfigDialog::editDateTmeTpl);
void (QSpinBox::*delayChange)(int) = &QSpinBox::valueChanged;
connect(_ui->defDelay, delayChange, this, &ConfigDialog::changeDefDelay);
void (QSpinBox::*timeToTray)(int) = &QSpinBox::valueChanged;
connect(_ui->timeTrayMess, timeToTray, this, &ConfigDialog::changeTimeTrayMess);
void (QComboBox::*trayMessType)(int) = &QComboBox::currentIndexChanged;
connect(_ui->cbxTrayMsg, trayMessType, this, &ConfigDialog::changeTrayMsgType);
connect(_ui->treeKeys, &QTreeWidget::doubleClicked, this, &ConfigDialog::doubleclickTreeKeys);
connect(_ui->treeKeys, &QTreeWidget::activated, this, &ConfigDialog::doubleclickTreeKeys);
connect(_ui->treeKeys->selectionModel(), &QItemSelectionModel::currentChanged,
this, &ConfigDialog::currentItemChanged);
connect(_ui->keyWidget, &QKeySequenceWidget::keySequenceCleared, this, &ConfigDialog::clearShrtcut);
connect(_ui->listWidget, &QListWidget::currentRowChanged, _ui->stackedWidget, &QStackedWidget::setCurrentIndex);
connect(_ui->slideImgQuality, &QSlider::valueChanged, this, &ConfigDialog::changeImgQualituSlider);
void (QComboBox::*formatChabge)(int) = &QComboBox::currentIndexChanged;
connect(_ui->cbxFormat, formatChabge, this, &ConfigDialog::changeFormatType);
loadSettings();
changeDefDelay(conf->getDefDelay());
setVisibleDateTplEdit(conf->getDateTimeInFilename());
setVisibleAutoSaveFirst(conf->getAutoSave());
_ui->listWidget->setCurrentRow(0);
_ui->tabMain->setCurrentIndex(0);
editDateTmeTpl(conf->getDateTimeTpl());
_ui->treeKeys->expandAll();
_ui->treeKeys->header()->setSectionResizeMode(QHeaderView::Stretch);
// adding shortcut values in treewidge
int action = 0;
QTreeWidgetItemIterator iter(_ui->treeKeys);
while (*iter)
{
if ((*iter)->parent() != NULL)
{
(*iter)->setData(1, Qt::DisplayRole, conf->shortcuts()->getShortcut(action));
#ifndef SG_GLOBAL_SHORTCUTS
if (conf->shortcuts()->getShortcutType(action) == Config::globalShortcut)
(*iter)->setHidden(true);
#endif
++action;
}
else
{
#ifndef SG_GLOBAL_SHORTCUTS
int numGlobalShortcuts = conf->shortcuts()->getShortcutsList(Config::globalShortcut).count();
if ((*iter)->childCount() == numGlobalShortcuts)
(*iter)->setHidden(true);
#endif
}
++iter;
}
// set false visibility to edit hokey controls
_ui->labUsedShortcut->setVisible(false);
_ui->keyWidget->setVisible(false);
// Load config widgets for modules
quint8 countModules = Core::instance()->modules()->count();
for (int i = 0; i < countModules; ++i)
{
AbstractModule* currentModule = Core::instance()->modules()->getModule(i);
if (currentModule->initConfigWidget() != 0)
{
_ui->listWidget->addItem(currentModule->moduleName());
QWidget *currentModWidget = currentModule->initConfigWidget();
_ui->stackedWidget->addWidget(currentModWidget);
_moduleWidgetNames << currentModWidget->objectName();
}
}
}
ConfigDialog::~ConfigDialog()
{
delete _ui;
conf = NULL;
delete conf;
}
void ConfigDialog::loadSettings()
{
// main tab
_ui->editDir->setText(conf->getSaveDir());
_ui->editFileName->setText(conf->getSaveFileName());
_ui->cbxFormat->addItem("png");
_ui->cbxFormat->addItem("jpg");
_ui->cbxFormat->addItem("bmp");
_ui->cbxFormat->setCurrentIndex(conf->getDefaultFormatID());
_ui->defDelay->setValue(conf->getDefDelay());
_ui->checkIncDate->setChecked(conf->getDateTimeInFilename());
_ui->editDateTmeTpl->setText(conf->getDateTimeTpl());
_ui->cbxCopyFileName->setCurrentIndex(conf->getAutoCopyFilenameOnSaving());
// display tab
_ui->cbxTrayMsg->setCurrentIndex(conf->getTrayMessages());
changeTrayMsgType(_ui->cbxTrayMsg->currentIndex());
_ui->timeTrayMess->setValue(conf->getTimeTrayMess());
_ui->checkAutoSave->setChecked(conf->getAutoSave());;
_ui->checkAutoSaveFirst->setChecked(conf->getAutoSaveFirst());;
_ui->checkZommMouseArea->setChecked(conf->getZoomAroundMouse());
// integration tab
_ui->checkInTray->setChecked(conf->getCloseInTray());
_ui->checkAllowCopies->setChecked(conf->getAllowMultipleInstance());
_ui->checkNoDecorX11->setChecked(conf->getNoDecoration());
_ui->checkShowTray->setChecked(conf->getShowTrayIcon());
toggleCheckShowTray(conf->getShowTrayIcon());
_ui->slideImgQuality->setValue(conf->getImageQuality());
_ui->cbxEnableExtView->setChecked(conf->getEnableExtView());
}
void ConfigDialog::changeEvent(QEvent *e)
{
QWidget::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
_ui->retranslateUi(this);
break;
default:
break;
}
}
void ConfigDialog::setVisibleAutoSaveFirst(bool status)
{
_ui->checkAutoSaveFirst->setVisible(status);
}
void ConfigDialog::changeFormatType(int type)
{
if (type == 1)
{
_ui->slideImgQuality->setVisible(true);;
_ui->labImgQuality->setVisible(true);
_ui->labImgQualityCurrent->setVisible(true);;
}
else
{
_ui->slideImgQuality->setVisible(false);
_ui->labImgQuality->setVisible(false);
_ui->labImgQualityCurrent->setVisible(false);;
}
}
void ConfigDialog::changeImgQualituSlider(int pos)
{
QString text = " " + QString::number(pos) + "%";
_ui->labImgQualityCurrent->setText(text);
}
void ConfigDialog::saveSettings()
{
QDir screenshotDir(_ui->editDir->text());
if (!screenshotDir.exists())
{
QMessageBox msg;
msg.setText(tr("Directory %1 does not exist. Do you want to create it?").arg(QDir::toNativeSeparators(screenshotDir.path()) + QDir::separator()));
msg.setWindowTitle("ScreenGrab" + QString(" - ") + tr("Warning"));
msg.setIcon(QMessageBox::Question);
msg.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
int res = msg.exec();
if (res == QMessageBox::No)
return;
else
{
screenshotDir.mkpath(screenshotDir.path());
if (!screenshotDir.path().endsWith(QDir::separator()))
{
QString updatedPath = screenshotDir.path() + QDir::separator();
updatedPath = QDir::toNativeSeparators(updatedPath);
_ui->editDir->setText(updatedPath);
}
}
}
// set new values of general settings
conf->setSaveDir(_ui->editDir->text());
conf->setSaveFileName(_ui->editFileName->text());
conf->setSaveFormat(_ui->cbxFormat->currentText());
conf->setDefDelay(_ui->defDelay->value());
conf->setDateTimeInFilename(_ui->checkIncDate->isChecked());
conf->setDateTimeTpl(_ui->editDateTmeTpl->text());
conf->setAutoCopyFilenameOnSaving(_ui->cbxCopyFileName->currentIndex());
conf->setAutoSave(_ui->checkAutoSave->isChecked());
conf->setAutoSaveFirst(_ui->checkAutoSaveFirst->isChecked());
conf->setTrayMessages(_ui->cbxTrayMsg->currentIndex());
conf->setCloseInTray(_ui->checkInTray->isChecked());
conf->setZoomAroundMouse(_ui->checkZommMouseArea->isChecked());
conf->setAllowMultipleInstance(_ui->checkAllowCopies->isChecked());
conf->setTimeTrayMess(_ui->timeTrayMess->value());
conf->setShowTrayIcon(_ui->checkShowTray->isChecked());
conf->setImageQuality(_ui->slideImgQuality->value());
conf->setEnableExtView(_ui->cbxEnableExtView->isChecked());
conf->setNoDecoration(_ui->checkNoDecorX11->isChecked());
// save shortcuts in shortcutmanager
int action = 0;
QTreeWidgetItemIterator iter(_ui->treeKeys);
while (*iter)
{
if ((*iter)->parent())
{
switch((*iter)->parent()->childCount())
{
case 3:
conf->shortcuts()->setShortcut((*iter)->data(1, Qt::DisplayRole).toString(), action, 0);
break;
case 6:
conf->shortcuts()->setShortcut((*iter)->data(1, Qt::DisplayRole).toString(), action, 1);
break;
default:
break;
}
++action;
}
++iter;
}
// update values of front-end settings
conf->saveSettings();
conf->setDelay(conf->getDefDelay());
// call save method on modeule's configwidgets'
for (int i = 0; i < _moduleWidgetNames.count(); ++i)
{
QString name = _moduleWidgetNames.at(i);
QWidget* currentWidget = _ui->stackedWidget->findChild<QWidget*>(name);
if (currentWidget)
QMetaObject::invokeMethod(currentWidget, "saveSettings");
}
accept();
}
QString ConfigDialog::getFormat()
{
switch (_ui->cbxFormat->currentIndex())
{
case 0: return "png";
case 1: return "jpg";
default: return "png";
}
}
void ConfigDialog::selectDir()
{
QString *directory = new QString;
{
*directory = QFileDialog::getExistingDirectory(this, trUtf8("Select directory"),
_ui->editDir->text(), QFileDialog::ShowDirsOnly)+QDir::separator();
if (directory->toUtf8() != QDir::separator())
_ui->editDir->setText( *directory);
}
delete directory;
}
void ConfigDialog::restoreDefaults()
{
QMessageBox msg;
msg.setText(tr("Do you want to reset the settings to the defaults?"));
msg.setWindowTitle("ScreenGrab" + QString(" - ") + tr("Warning"));
msg.setIcon(QMessageBox::Question);
msg.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
int res = msg.exec();
if (res == QMessageBox::Yes)
{
conf->setDefaultSettings();
conf->saveSettings();
QDialog::accept();
}
}
void ConfigDialog::changeDefDelay(int val)
{
if (val == 0)
_ui->defDelay->setSpecialValueText(tr("None"));
}
void ConfigDialog::changeTimeTrayMess(int sec)
{
conf->setTimeTrayMess(sec);
}
void ConfigDialog::changeTrayMsgType(int type)
{
switch(type)
{
case 0:
{
_ui->labTimeTrayMess->setVisible(false);
_ui->timeTrayMess->setVisible(false);
break;
}
default:
{
_ui->labTimeTrayMess->setVisible(true);
_ui->timeTrayMess->setVisible(true);
break;
}
}
}
void ConfigDialog::setVisibleDateTplEdit(bool checked)
{
if (!checked)
{
_ui->editDateTmeTpl->setVisible(false);
_ui->labMask->setVisible(false);
_ui->labMaskExample->setVisible(false);
}
else
{
_ui->editDateTmeTpl->setVisible(true);
_ui->labMask->setVisible(true);
_ui->labMaskExample->setVisible(true);
}
}
void ConfigDialog::editDateTmeTpl(QString str)
{
QString currentDateTime = QDateTime::currentDateTime().toString(str );
_ui->labMaskExample->setText(tr("Example: ") + currentDateTime);
}
void ConfigDialog::toggleCheckShowTray(bool checked)
{
_ui->labTrayMessages->setEnabled(checked);
_ui->cbxTrayMsg->setEnabled(checked);
_ui->timeTrayMess->setEnabled(checked);
_ui->labTimeTrayMess->setEnabled(checked);
_ui->checkInTray->setEnabled(checked);
}
void ConfigDialog::currentItemChanged(const QModelIndex c, const QModelIndex p)
{
Q_UNUSED(p)
if (c.parent().isValid())
{
_ui->labUsedShortcut->setVisible(true);
_ui->keyWidget->setVisible(true);
QTreeWidgetItem *item = _ui->treeKeys->currentItem();
_ui->keyWidget->setKeySequence(QKeySequence(item->data(1, Qt::DisplayRole).toString()));
}
else
{
_ui->labUsedShortcut->setVisible(false);
_ui->keyWidget->setVisible(false);
}
}
void ConfigDialog::doubleclickTreeKeys(QModelIndex index)
{
if (index.parent().isValid())
{
connect(_ui->keyWidget, SIGNAL(keySequenceChanged(QKeySequence)), this, SLOT(changeShortcut(QKeySequence)));
_ui->keyWidget->captureKeySequence();
}
}
void ConfigDialog::collapsTreeKeys(QModelIndex index)
{
if (!index.parent().isValid())
{
_ui->labUsedShortcut->setVisible(false);
_ui->keyWidget->setVisible(false);
}
}
void ConfigDialog::acceptShortcut(const QKeySequence& seq)
{
if (!checkUsedShortcuts())
{
#ifdef SG_GLOBAL_SHORTCUTS
if (avalibelGlobalShortcuts(seq))
changeShortcut(seq);
else
showErrorMessage(tr("This key is already used in your system! Please select another."));
#else
changeShortcut(seq);
#endif
}
else if (checkUsedShortcuts() && seq.toString() != "")
showErrorMessage(tr("This key is already used in ScreenGrab! Please select another."));
}
void ConfigDialog::changeShortcut(const QKeySequence& seq)
{
disconnect(_ui->keyWidget, SIGNAL(keySequenceChanged(QKeySequence)), this, SLOT(changeShortcut(QKeySequence)));
QTreeWidgetItem *item = _ui->treeKeys->selectedItems().first();
item->setData(1, Qt::DisplayRole, seq.toString());
}
void ConfigDialog::clearShrtcut()
{
QTreeWidgetItem *item = _ui->treeKeys->selectedItems().first();
item->setData(1, Qt::DisplayRole, QString(""));
}
void ConfigDialog::keyNotSupported()
{
showErrorMessage(tr("This key is not supported on your system!"));
}
bool ConfigDialog::checkUsedShortcuts()
{
QTreeWidgetItem *item = _ui->treeKeys->selectedItems().first();
QTreeWidgetItemIterator iter(_ui->treeKeys);
while (*iter)
{
if ((*iter) != item && (*iter)->data(1, Qt::DisplayRole) == _ui->keyWidget->keySequence().toString())
return true;
++iter;
}
return false;
}
#ifdef SG_GLOBAL_SHORTCUTS
bool ConfigDialog::avalibelGlobalShortcuts(const QKeySequence& seq)
{
bool ok = false;
QxtGlobalShortcut *tmpShortcut = new QxtGlobalShortcut;
if (tmpShortcut->setShortcut(QKeySequence(seq)) == true)
{
tmpShortcut->setDisabled(true);
ok = true;
}
delete tmpShortcut;
return ok;
}
#endif
void ConfigDialog::showErrorMessage(QString text)
{
_ui->keyWidget->clearKeySequence();
QMessageBox msg;
msg.setWindowTitle(tr("Error"));
msg.setText(text);
msg.setIcon(QMessageBox::Information);
msg.setStandardButtons(QMessageBox::Ok);
msg.exec();
}

@ -0,0 +1,81 @@
/***************************************************************************
* 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. *
***************************************************************************/
#ifndef CONFIGWIDGET_H
#define CONFIGWIDGET_H
#include "../config.h"
#include <QDialog>
#include <QTextCodec>
#include <QDateTime>
#include <QModelIndex>
#include <QTreeWidgetItem>
namespace Ui {
class configwidget;
}
class ConfigDialog : public QDialog{
Q_OBJECT
public:
ConfigDialog( QWidget *parent = 0);
~ConfigDialog();
Config *conf;
protected:
void changeEvent(QEvent *e);
private:
Ui::configwidget *_ui;
void loadSettings();
QString getFormat();
bool checkUsedShortcuts();
void showErrorMessage(QString text);
QStringList _moduleWidgetNames;
#ifdef SG_GLOBAL_SHORTCUTS
bool avalibelGlobalShortcuts(const QKeySequence& seq);
#endif
private slots:
void collapsTreeKeys(QModelIndex index);
void doubleclickTreeKeys(QModelIndex index);
void toggleCheckShowTray(bool checked);
void currentItemChanged(const QModelIndex c ,const QModelIndex p);
void editDateTmeTpl(QString str);
void setVisibleDateTplEdit(bool);
void changeTrayMsgType(int type);
void changeTimeTrayMess(int sec);
void changeDefDelay(int val);
void setVisibleAutoSaveFirst(bool status);
void changeFormatType(int type);
void changeImgQualituSlider(int pos);
void saveSettings();
void selectDir();
void restoreDefaults();
void acceptShortcut(const QKeySequence &seq);
void changeShortcut(const QKeySequence &seq);
void clearShrtcut();
void keyNotSupported();
};
#endif // CONFIGWIDGET_H

@ -0,0 +1,836 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>configwidget</class>
<widget class="QWidget" name="configwidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>554</width>
<height>278</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="windowTitle">
<string>Options</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_8">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QListWidget" name="listWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>160</width>
<height>16777215</height>
</size>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="textElideMode">
<enum>Qt::ElideNone</enum>
</property>
<property name="flow">
<enum>QListView::TopToBottom</enum>
</property>
<property name="isWrapping" stdset="0">
<bool>false</bool>
</property>
<property name="resizeMode">
<enum>QListView::Adjust</enum>
</property>
<property name="viewMode">
<enum>QListView::ListMode</enum>
</property>
<property name="uniformItemSizes">
<bool>false</bool>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<item>
<property name="text">
<string>Main</string>
</property>
</item>
<item>
<property name="text">
<string>Advanced</string>
</property>
</item>
<item>
<property name="text">
<string>System tray</string>
</property>
</item>
<item>
<property name="text">
<string>Shortcuts</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QStackedWidget" name="stackedWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="currentIndex">
<number>3</number>
</property>
<widget class="QWidget" name="page_6">
<layout class="QVBoxLayout" name="verticalLayout_6">
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QTabWidget" name="tabMain">
<property name="currentIndex">
<number>1</number>
</property>
<widget class="QWidget" name="tabSaving">
<attribute name="title">
<string>Saving</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>4</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="labDirectory">
<property name="text">
<string>Default save directory:</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLineEdit" name="editDir">
<property name="toolTip">
<string>Path to default selection dir for saving</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="buttonBrowse">
<property name="minimumSize">
<size>
<width>112</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Browse filesystem</string>
</property>
<property name="text">
<string>Browse</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_14">
<property name="rightMargin">
<number>0</number>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<widget class="QLabel" name="labFilename">
<property name="text">
<string>Default filename:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="editFileName">
<property name="toolTip">
<string>Default filename</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_9">
<item>
<widget class="QLabel" name="labFormat">
<property name="text">
<string>Format</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cbxFormat">
<property name="minimumSize">
<size>
<width>112</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Default saving image format</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_11">
<property name="leftMargin">
<number>4</number>
</property>
<item>
<widget class="QLabel" name="labCopyFileName">
<property name="text">
<string>Copy file name to the clipboard when saving</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cbxCopyFileName">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Do not copy</string>
</property>
</item>
<item>
<property name="text">
<string>Copy file name only</string>
</property>
</item>
<item>
<property name="text">
<string>Copy full file path</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>82</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabScreenshot">
<attribute name="title">
<string>Screenshot</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Delay:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="defDelay">
<property name="toolTip">
<string>Default delay before grabbing screen</string>
</property>
<property name="wrapping">
<bool>false</bool>
</property>
<property name="suffix">
<string> sec</string>
</property>
<property name="prefix">
<string/>
</property>
<property name="maximum">
<number>90</number>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<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="checkNoDecorX11">
<property name="text">
<string>No window decoration</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="labImgQuality">
<property name="text">
<string>Image quality</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_13">
<item>
<widget class="QSlider" name="slideImgQuality">
<property name="toolTip">
<string>Image quality (1 - small file, 100 - high quality)</string>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="singleStep">
<number>1</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labImgQualityCurrent">
<property name="text">
<string notr="true">Current</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="checkZommMouseArea">
<property name="text">
<string>Zoom area around mouse in selection mode</string>
</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>117</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_2">
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_10">
<property name="leftMargin">
<number>16</number>
</property>
</layout>
</item>
<item>
<widget class="QCheckBox" name="checkIncDate">
<property name="toolTip">
<string>Inserting current date time into saved filename</string>
</property>
<property name="text">
<string>Insert current date and time in file name</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<widget class="QLabel" name="labMask">
<property name="text">
<string>Template: </string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="editDateTmeTpl">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>256</width>
<height>0</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="labMaskExample">
<property name="text">
<string>Example: </string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkAutoSave">
<property name="toolTip">
<string>Automatically saving screenshots in grabbing process</string>
</property>
<property name="text">
<string>Autosave screenshot</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_12">
<property name="leftMargin">
<number>16</number>
</property>
<item>
<widget class="QCheckBox" name="checkAutoSaveFirst">
<property name="text">
<string>Save first screenshot</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="checkAllowCopies">
<property name="toolTip">
<string>Allow run multiplies copy of ScreenGrab</string>
</property>
<property name="text">
<string>Allow multiple instances of ScreenGrab</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbxEnableExtView">
<property name="toolTip">
<string>Open in external viewer on double click</string>
</property>
<property name="text">
<string>Enable external viewer</string>
</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>66</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_4">
<layout class="QVBoxLayout" name="verticalLayout_13">
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QCheckBox" name="checkShowTray">
<property name="text">
<string>Show ScreenGrab in the system tray</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLabel" name="labTrayMessages">
<property name="text">
<string>Tray messages:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cbxTrayMsg">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Tray messages display mode</string>
</property>
<item>
<property name="text">
<string>Never</string>
</property>
</item>
<item>
<property name="text">
<string>Tray mode</string>
</property>
</item>
<item>
<property name="text">
<string>Always</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QLabel" name="labTimeTrayMess">
<property name="text">
<string>Time of display tray messages</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="timeTrayMess">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Time to display tray messages</string>
</property>
<property name="suffix">
<string> sec</string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>10</number>
</property>
<property name="value">
<number>5</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="checkInTray">
<property name="toolTip">
<string>Minimize to tray on click close button</string>
</property>
<property name="text">
<string>Minimize to tray when closing</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_5">
<layout class="QVBoxLayout" name="verticalLayout_14">
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QTreeWidget" name="treeKeys">
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<column>
<property name="text">
<string>Action</string>
</property>
</column>
<column>
<property name="text">
<string>Shortcut</string>
</property>
</column>
<item>
<property name="text">
<string>Global shortcuts</string>
</property>
<property name="text">
<string/>
</property>
<item>
<property name="text">
<string>Fill screen</string>
</property>
</item>
<item>
<property name="text">
<string>Active window</string>
</property>
</item>
<item>
<property name="text">
<string>Area select</string>
</property>
</item>
</item>
<item>
<property name="text">
<string>Local shortcuts</string>
</property>
<item>
<property name="text">
<string>New screen</string>
</property>
</item>
<item>
<property name="text">
<string>Save screen</string>
</property>
</item>
<item>
<property name="text">
<string>Copy screen</string>
</property>
</item>
<item>
<property name="text">
<string>Options</string>
</property>
</item>
<item>
<property name="text">
<string>Help</string>
</property>
</item>
<item>
<property name="text">
<string>Quit</string>
</property>
</item>
</item>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_9">
<item>
<widget class="QLabel" name="labUsedShortcut">
<property name="text">
<string>Selected shortcut:</string>
</property>
</widget>
</item>
<item>
<widget class="QKeySequenceWidget" name="keyWidget" native="true">
<property name="noneText" stdset="0">
<string>Not defined</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="butRestoreOpt">
<property name="minimumSize">
<size>
<width>112</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Restore default settings</string>
</property>
<property name="text">
<string>Defaults</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>88</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="butSaveOpt">
<property name="minimumSize">
<size>
<width>112</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Save settings</string>
</property>
<property name="text">
<string>Save</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="butCancel">
<property name="minimumSize">
<size>
<width>112</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Discard changes</string>
</property>
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QKeySequenceWidget</class>
<extends>QWidget</extends>
<header>qkeysequencewidget.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>butSaveOpt</tabstop>
<tabstop>butCancel</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>

@ -0,0 +1,560 @@
/***************************************************************************
* 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 "mainwindow.h"
#include "ui_mainwindow.h"
#include "../core.h"
#include "../shortcutmanager.h"
#include <QDir>
#include <QFileDialog>
#include <QDesktopWidget>
#include <QHash>
#include <QHashIterator>
#include <QRegExp>
#include <QTimer>
#include <QToolButton>
#include <QMenu>
MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent),
_ui(new Ui::MainWindow), _conf(NULL), _trayMenu(NULL)
{
_ui->setupUi(this);
_trayed = false;
#ifdef SG_GLOBAL_SHORTCUTS
// signal mapper
_globalShortcutSignals = new QSignalMapper(this);
// global shortcuts
_fullScreen = new QxtGlobalShortcut(this);
_activeWindow = new QxtGlobalShortcut(this);
_areaSelection = new QxtGlobalShortcut(this);
_globalShortcuts << _fullScreen << _activeWindow << _areaSelection;
for (int i = 0; i < _globalShortcuts.count(); ++i )
{
connect(_globalShortcuts[i], SIGNAL(activated()), _globalShortcutSignals, SLOT(map()) );
_globalShortcutSignals->setMapping(_globalShortcuts[i], i);
}
connect(_globalShortcutSignals, SIGNAL(mapped(int)), this, SLOT(globalShortcutActivate(int)));
#endif
_trayIcon = NULL;
_hideWnd = NULL;
// create actions menu
actNew = new QAction(QIcon::fromTheme("document-new"), tr("New"), this);
actSave = new QAction(QIcon::fromTheme("document-save"), tr("Save"), this);
actCopy = new QAction(QIcon::fromTheme("edit-copy"), tr("Copy"), this);
actOptions = new QAction(QIcon::fromTheme("configure"), tr("Options"), this);
actHelp = new QAction(QIcon::fromTheme("system-help"), tr("Help"), this);
actAbout = new QAction(QIcon::fromTheme("system-about"), tr("About"), this);
actQuit = new QAction(QIcon::fromTheme("application-exit"), tr("Quit"), this);
// connect actions to slots
Core *c = Core::instance();
connect(actQuit, &QAction::triggered, c, &Core::coreQuit);
connect(actNew, &QAction::triggered, c, &Core::setScreen);
connect(actSave, &QAction::triggered, this, &MainWindow::saveScreen);
connect(actCopy, &QAction::triggered, c, &Core::copyScreen);
connect(actOptions, &QAction::triggered, this, &MainWindow::showOptions);
connect(actAbout, &QAction::triggered, this, &MainWindow::showAbout);
connect(actHelp, &QAction::triggered, this, &MainWindow::showHelp);
_ui->toolBar->addAction(actNew);
_ui->toolBar->addAction(actSave);
_ui->toolBar->addAction(actCopy);
_ui->toolBar->addAction(actOptions);
_ui->toolBar->addSeparator();
QMenu *menuInfo = new QMenu(this);
menuInfo->addAction(actHelp);
menuInfo->addAction(actAbout);
QToolButton *help = new QToolButton(this);
help->setText(tr("Help"));
help->setPopupMode(QToolButton::InstantPopup);
help->setIcon(QIcon::fromTheme("system-help"));
help->setMenu(menuInfo);
_ui->toolBar->addWidget(help);
_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);
QIcon icon(":/res/img/logo.png");
setWindowIcon(icon);
QRect geometry = QApplication::desktop()->availableGeometry(QApplication::desktop()->screenNumber());
move(geometry.width() / 2 - width() / 2, geometry.height() / 2 - height() / 2);
_ui->scrLabel->installEventFilter(this);
}
MainWindow::~MainWindow()
{
delete _ui;
}
void MainWindow::changeEvent(QEvent *e)
{
QMainWindow::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
_ui->retranslateUi(this);
break;
default:
break;
}
}
void MainWindow::closeEvent(QCloseEvent *e)
{
if (_conf->getCloseInTray() && _conf->getShowTrayIcon())
{
windowHideShow();
e->ignore();
}
else
actQuit->activate(QAction::Trigger);
}
// resize main window
void MainWindow::resizeEvent(QResizeEvent *event)
{
Q_UNUSED(event)
// get size dcreen pixel map
QSize scaleSize = Core::instance()->getPixmap()->size(); // get orig size pixmap
scaleSize.scale(_ui->scrLabel->size(), Qt::KeepAspectRatio);
// if not scrlabel pixmap
if (!_ui->scrLabel->pixmap() || scaleSize != _ui->scrLabel->pixmap()->size())
updatePixmap(Core::instance()->getPixmap());
}
bool MainWindow::eventFilter(QObject* obj, QEvent* event)
{
if (obj == _ui->scrLabel && event->type() == QEvent::ToolTip)
displatScreenToolTip();
else if (obj == _ui->scrLabel && event->type() == QEvent::MouseButtonDblClick)
Core::instance()->openInExtViewer();
return QObject::eventFilter(obj, event);
}
void MainWindow::updatePixmap(QPixmap *pMap)
{
_ui->scrLabel->setPixmap(pMap->scaled(_ui->scrLabel->size(),
Qt::KeepAspectRatio, Qt::SmoothTransformation));
}
void MainWindow::updateModulesActions(QList<QAction *> list)
{
_ui->toolBar->insertSeparator(actOptions);
if (list.count() > 0)
{
for (int i = 0; i < list.count(); ++i)
{
QAction *action = list.at(i);
if (action)
_ui->toolBar->insertAction(actOptions, action);
}
}
}
void MainWindow::updateModulesenus(QList<QMenu *> list)
{
if (list.count() > 0)
{
for (int i = 0; i < list.count(); ++i)
{
QMenu *menu = list.at(i);
if (menu != 0)
{
QToolButton* btn = new QToolButton(this);
btn->setText(menu->title());
btn->setPopupMode(QToolButton::InstantPopup);
btn->setToolTip(menu->title());
btn->setMenu(list.at(i));
_ui->toolBar->insertWidget(actOptions, btn);
}
}
_ui->toolBar->insertSeparator(actOptions);
}
}
void MainWindow::show()
{
if (!isVisible() && !_trayed)
showNormal();
if (_conf->getShowTrayIcon())
{
_trayIcon->blockSignals(false);
_trayIcon->setContextMenu(_trayMenu); // enable context menu
}
if (_trayIcon)
_trayIcon->setVisible(true);
QMainWindow::show();
}
bool MainWindow::isTrayed() const
{
return _trayIcon != NULL;
}
void MainWindow::showTrayMessage(const QString& header, const QString& message)
{
if (_conf->getShowTrayIcon())
{
switch(_conf->getTrayMessages())
{
case 0: break; // never shown
case 1: // main window hidden
{
if (isHidden() && _trayed)
{
_trayIcon->showMessage(header, message,
QSystemTrayIcon::MessageIcon(), _conf->getTimeTrayMess()*1000 ); //5000
}
break;
}
case 2: // always show
{
_trayIcon->showMessage(header, message,
QSystemTrayIcon::MessageIcon(), _conf->getTimeTrayMess()*1000 );
break;
}
default: break;
}
}
}
void MainWindow::setConfig(Config *config)
{
_conf = config;
updateUI();
}
void MainWindow::showHelp()
{
QString localeHelpFile;
localeHelpFile = QString(SG_DOCDIR) + "%1html%1" + Config::getSysLang()+"%1index.html";
localeHelpFile = localeHelpFile.arg(QString(QDir::separator()));
if (!QFile::exists(localeHelpFile))
{
localeHelpFile = QString(SG_DOCDIR) + "%1html%1" + Config::getSysLang().section("_", 0, 0) + "%1index.html";
localeHelpFile = localeHelpFile.arg(QString(QDir::separator()));
if (!QFile::exists(localeHelpFile))
{
localeHelpFile = QString(SG_DOCDIR) + "%1html%1en%1index.html";
localeHelpFile = localeHelpFile.arg(QString(QDir::separator()));
}
}
// open find localize or eng help help
QDesktopServices::openUrl(QUrl::fromLocalFile(localeHelpFile));
}
void MainWindow::showOptions()
{
ConfigDialog *options = new ConfigDialog();
#ifdef SG_GLOBAL_SHORTCUTS
globalShortcutBlock(true);
#endif
if (isMinimized())
{
showNormal();
if (options->exec() == QDialog::Accepted)
updateUI();
hideToShot();
}
else
{
if (options->exec() == QDialog::Accepted)
updateUI();
}
#ifdef SG_GLOBAL_SHORTCUTS
globalShortcutBlock(false);
#endif
delete options;
}
void MainWindow::showAbout()
{
AboutDialog *about = new AboutDialog(this);
if (isMinimized())
{
showNormal();
about->exec();
hideToShot();
}
else
about->exec();
delete about;
}
void MainWindow::displatScreenToolTip()
{
QSize pSize = Core::instance()->getPixmap()->size();
quint16 w = pSize.width();
quint16 h = pSize.height();
QString toolTip = tr("Screenshot ") + QString::number(w) + "x" + QString::number(h);
if (_conf->getEnableExtView())
{
toolTip += "\n\n";
toolTip += tr("Double click for open screenshot in external default image viewer");
}
_ui->scrLabel->setToolTip(toolTip);
}
void MainWindow::createTray()
{
_trayed = false;
actHideShow = new QAction(tr("Hide"), this);
connect(actHideShow, &QAction::triggered, this, &MainWindow::windowHideShow);
// create tray menu
_trayMenu = new QMenu(this);
_trayMenu->addAction(actHideShow);
_trayMenu->addSeparator();
_trayMenu->addAction(actNew); // TODO - add icons (icon, action)
_trayMenu->addAction(actSave);
_trayMenu->addAction(actCopy);
_trayMenu->addSeparator();
_trayMenu->addAction(actOptions);
_trayMenu->addSeparator();
_trayMenu->addAction(actHelp);
_trayMenu->addAction(actAbout);
_trayMenu->addSeparator();
_trayMenu->addAction(actQuit);
// icon menu
QIcon icon(":/res/img/logo.png");
_trayIcon = new QSystemTrayIcon(this);
_trayIcon->setContextMenu(_trayMenu);
_trayIcon->setIcon(icon);
_trayIcon->show();
connect(_trayIcon, &QSystemTrayIcon::activated, this, &MainWindow::trayClick);
}
void MainWindow::killTray()
{
_trayed = false;
_trayMenu->clear();
delete _trayIcon;
_trayIcon = NULL;
}
void MainWindow::delayBoxChange(int delay)
{
if (delay == 0)
_ui->delayBox->setSpecialValueText(tr("None"));
_conf->setDelay(delay);
}
void MainWindow::typeScreenShotChange(int type)
{
_conf->setTypeScreen(type);
}
// updating UI from configdata
void MainWindow::updateUI()
{
_ui->cbxTypeScr->setCurrentIndex(_conf->getTypeScreen());
_ui->delayBox->setValue(_conf->getDelay());
updateShortcuts();
// create tray object
if (_conf->getShowTrayIcon() && !_trayIcon)
createTray();
// kill tray object, if tray was disabled in the configuration dialog
if (!_conf->getShowTrayIcon() && _trayIcon)
killTray();
}
// mouse clicks on tray icom
void MainWindow::trayClick(QSystemTrayIcon::ActivationReason reason)
{
switch(reason)
{
case QSystemTrayIcon::Trigger:
windowHideShow();
break;
default: ;
}
}
void MainWindow::windowHideShow()
{
if (isHidden())
{
actHideShow->setText(tr("Hide"));
_trayed = false;
showNormal();
activateWindow();
}
else
{
actHideShow->setText(tr("Show"));
showMinimized();
hide();
_trayed = true;
}
}
void MainWindow::hideToShot()
{
if (_conf->getShowTrayIcon())
{
_trayIcon->blockSignals(true);
_trayIcon->setContextMenu(NULL); // enable context menu
}
hide();
}
void MainWindow::showWindow(const QString& str)
{
// get char of type screen (last) form received string
QString typeNum = str[str.size() - 1];
int type = typeNum.toInt();
// change type scrren in config & on main window
_ui->cbxTypeScr->setCurrentIndex(type);
typeScreenShotChange(type);
}
void MainWindow::restoreFromShot()
{
if (!isVisible() && !_trayed)
showNormal();
// if show tray
if (_conf->getShowTrayIcon())
{
_trayIcon->blockSignals(false);
_trayIcon->setContextMenu(_trayMenu); // enable context menu
}
}
void MainWindow::saveScreen()
{
// create initial filepath
QHash<QString, QString> formatsAvalible;
formatsAvalible["png"] = tr("PNG Files");
formatsAvalible["jpg"] = tr("JPEG Files");
formatsAvalible["bmp"] = tr("BMP Files");
QString format = "png";
_conf->getSaveFormat();
Core* c = Core::instance();
QString filePath = c->getSaveFilePath(format);
// create file filters
QString fileFilters;
QString filterSelected;
filterSelected = formatsAvalible[format];
QHash<QString, QString>::const_iterator iter = formatsAvalible.constBegin();
while (iter != formatsAvalible.constEnd())
{
fileFilters.append(iter.value() + " (*." + iter.key() + ");;");
++iter;
}
fileFilters.chop(2);
QString fileName;
fileName = QFileDialog::getSaveFileName(this, tr("Save As..."), filePath, fileFilters, &filterSelected, QFileDialog::DontUseNativeDialog);
QRegExp rx("\\(\\*\\.[a-z]{3,4}\\)");
quint8 tmp = filterSelected.size() - rx.indexIn(filterSelected);
filterSelected.chop(tmp + 1);
format = formatsAvalible.key(filterSelected);
// if user canceled saving
if (fileName.isEmpty())
return;
c->writeScreen(fileName, format);
}
void MainWindow::updateShortcuts()
{
actNew->setShortcut(_conf->shortcuts()->getShortcut(Config::shortcutNew));
actSave->setShortcut(_conf->shortcuts()->getShortcut(Config::shortcutSave));
actCopy->setShortcut(_conf->shortcuts()->getShortcut(Config::shortcutCopy));
actOptions->setShortcut(_conf->shortcuts()->getShortcut(Config::shortcutOptions));
actHelp->setShortcut(_conf->shortcuts()->getShortcut(Config::shortcutHelp));
actQuit->setShortcut(_conf->shortcuts()->getShortcut(Config::shortcutClose));
#ifdef SG_GLOBAL_SHORTCUTS
for (int i = 0; i < _globalShortcuts.count(); ++i)
_globalShortcuts[i]->setShortcut(QKeySequence(_core->conf->shortcuts()->getShortcut(i)));
#endif
}
#ifdef SG_GLOBAL_SHORTCUTS
void MainWindow::globalShortcutBlock(bool state)
{
for (int i = 0; i < _globalShortcuts.count(); ++i)
_globalShortcuts[i]->setDisabled(state);
}
void MainWindow::globalShortcutActivate(int type)
{
_ui->cbxTypeScr->setCurrentIndex(type);
typeScreenShotChange(type);
if (!_trayed)
hide();
QTimer::singleShot(200, _core, SLOT(screenShot()));
}
#endif

@ -0,0 +1,118 @@
/***************************************************************************
* 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. *
***************************************************************************/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include "about.h"
#include "configwidget.h"
#ifdef SG_GLOBAL_SHORTCUTS
#include <QxtGui/QxtGlobalShortcut>
#endif
#include <QMenu>
#include <QSystemTrayIcon>
#include <QDesktopServices>
#include <QCloseEvent>
#include <QShortcut>
#include <QUrl>
#include <QSignalMapper>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow //, public screengrab
{
Q_OBJECT
public:
MainWindow( QWidget *parent = 0);
~MainWindow();
void show();
bool isTrayed() const;
void showTrayMessage(const QString& header, const QString& message);
void setConfig(Config *config);
void updatePixmap(QPixmap *pMap);
void updateModulesActions(QList<QAction*> list);
void updateModulesenus(QList<QMenu*> list);
public Q_SLOTS:
void showWindow(const QString& str);
void windowHideShow();
void hideToShot();
void restoreFromShot();
protected:
void closeEvent(QCloseEvent *e);
void changeEvent(QEvent *e);
void resizeEvent(QResizeEvent *event); // event resuze window
bool eventFilter(QObject *obj, QEvent *event);
private:
Ui::MainWindow *_ui;
QSystemTrayIcon *_trayIcon;
QAction *actHideShow;
QAction *actNew;
QAction *actSave;
QAction *actCopy;
QAction *actOptions;
QAction *actAbout;
QAction *actHelp;
QAction *actQuit;
Config *_conf;
QMenu *_trayMenu;
QShortcut *_hideWnd;
bool _trayed;
#ifdef SG_GLOBAL_SHORTCUTS
QxtGlobalShortcut *_fullScreen;
QxtGlobalShortcut *_activeWindow;
QxtGlobalShortcut *_areaSelection;
QVector<QxtGlobalShortcut*> _globalShortcuts;
QSignalMapper *_globalShortcutSignals;
#endif
void displatScreenToolTip();
void createTray();
void killTray();
void updateShortcuts();
private Q_SLOTS:
void saveScreen();
void showHelp();
void showOptions();
void showAbout();
void delayBoxChange(int);
void typeScreenShotChange(int type);
void updateUI();
void trayClick(QSystemTrayIcon::ActivationReason reason);
#ifdef SG_GLOBAL_SHORTCUTS
void globalShortcutActivate(int type);
void globalShortcutBlock(bool state);
#endif
};
#endif // MAINWINDOW_H

@ -0,0 +1,229 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>480</width>
<height>299</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>480</width>
<height>299</height>
</size>
</property>
<property name="windowTitle">
<string>ScreenGrab</string>
</property>
<widget class="QWidget" name="centralwidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="layoutDirection">
<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">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>450</width>
<height>190</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<property name="text">
<string notr="true"/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="bottomBar" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>13</height>
</size>
</property>
</spacer>
</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>
<widget class="QLabel" name="labTypeScr">
<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="QSpinBox" name="delayBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Delay in seconds before taking screenshot</string>
</property>
<property name="suffix">
<string> sec</string>
</property>
<property name="maximum">
<number>90</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labDelay">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Delay</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>13</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QToolBar" name="toolBar">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>toolBar</string>
</property>
<property name="floatable">
<bool>false</bool>
</property>
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
</widget>
</widget>
<resources/>
<connections/>
</ui>

@ -0,0 +1,45 @@
/***************************************************************************
* 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. *
***************************************************************************/
#ifndef ABSTRACTMODULE_H
#define ABSTRACTMODULE_H
#include <QList>
#include <QWidget>
#include <QAction>
#include <QMenu>
class AbstractModule
{
public:
AbstractModule() {};
virtual ~AbstractModule() {};
// interface
virtual void init() = 0;
virtual QString moduleName() = 0;
virtual QWidget* initConfigWidget() = 0;
virtual void defaultSettings() = 0;
virtual QMenu* initModuleMenu() = 0;
virtual QAction* initModuleAction() = 0;
};
#endif // ABSTRACTMODULE_H

@ -0,0 +1,37 @@
cmake_minimum_required(VERSION 2.8.11)
set (extedit_SRC
moduleextedit.cpp
extedit.cpp
)
set (extedit_HDR
extedit.h
)
lxqt_translate_ts(extedit_QMS
USE_QT5 TRUE
UPDATE_TRANSLATIONS ${UPDATE_TRANSLATIONS}
TEMPLATE "extedit"
TRANSLATION_DIR "${CMAKE_SOURCE_DIR}/translations"
SOURCES
${extedit_SRC}
${extedit_HDR}
INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/translations"
)
qt5_translation_loader(extedit_QM_LOADER
"${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT_NAME}/translations"
"extedit"
)
add_library(extedit
SHARED
${extedit_SRC}
${extedit_QMS}
${extedit_QM_LOADER}
)
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})

@ -0,0 +1,95 @@
/***************************************************************************
* 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 "extedit.h"
#include "core/core.h"
#include <QDebug>
#include <QMimeDatabase>
ExtEdit::ExtEdit(QObject *parent) :
QObject(parent), _watcherEditedFile(new QFileSystemWatcher(this))
{
createAppList();
_fileIsChanged = false;
connect(_watcherEditedFile, &QFileSystemWatcher::fileChanged, this, &ExtEdit::editedFileChanged);
}
QList<XdgAction*> ExtEdit::getActions()
{
return _actionList;
}
void ExtEdit::runExternalEditor()
{
XdgAction *action = static_cast<XdgAction*>(sender());
Core *core = Core::instance();
QString format = core->config()->getSaveFormat();
if (format.isEmpty())
format = "png";
_editFilename = core->getTempFilename(format);
core->writeScreen(_editFilename, format, true);
QProcess *execProcess = new QProcess(this);
void (QProcess:: *signal)(int, QProcess::ExitStatus) = &QProcess::finished;
connect(execProcess, signal, this, &ExtEdit::closedExternalEditor);
execProcess->start(action->desktopFile().expandExecString().first(),
QStringList() << _editFilename);
_watcherEditedFile->addPath(_editFilename);
}
void ExtEdit::closedExternalEditor(int, QProcess::ExitStatus)
{
Core *core = Core::instance();
if (_fileIsChanged == true)
core->updatePixmap();
_fileIsChanged = false;
_watcherEditedFile->removePath(_editFilename);
sender()->deleteLater();
core->killTempFile();
_editFilename.clear();
}
void ExtEdit::editedFileChanged(const QString&)
{
_fileIsChanged = true;
}
void ExtEdit::createAppList()
{
Core *core = Core::instance();
QString format = core->config()->getSaveFormat();
if (format.isEmpty())
format = "png";
QString fileName = _editFilename.isEmpty() ? core->getTempFilename(format) : _editFilename;
QMimeDatabase db;
QMimeType mt = db.mimeTypeForFile(fileName);
_appList = XdgDesktopFileCache::getApps(mt.name());
foreach (XdgDesktopFile *app, _appList)
_actionList << new XdgAction(app);
}

@ -0,0 +1,55 @@
/***************************************************************************
* 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. *
***************************************************************************/
#ifndef EXTEDIT_H
#define EXTEDIT_H
#include <QObject>
#include <QProcess>
#include <QFileSystemWatcher>
#include <QAction>
#include <qt5xdg/XdgDesktopFile>
#include <qt5xdg/XdgAction>
class ExtEdit : public QObject
{
Q_OBJECT
public:
explicit ExtEdit(QObject *parent = 0);
QList<XdgAction*> getActions();
public Q_SLOTS:
void runExternalEditor();
private Q_SLOTS:
void closedExternalEditor(int exitCode, QProcess::ExitStatus exitStatus);
void editedFileChanged(const QString & path);
private:
void createAppList();
QList<XdgDesktopFile*> _appList;
QList<XdgAction*> _actionList;
QString _editFilename;
bool _fileIsChanged;
QFileSystemWatcher *_watcherEditedFile;
};
#endif // EXTEDIT_H

@ -0,0 +1,79 @@
/***************************************************************************
* 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 "moduleextedit.h"
#include <QObject>
ModuleExtEdit::ModuleExtEdit()
{
_extEdit = new ExtEdit();
}
ModuleExtEdit::~ModuleExtEdit()
{
if (_extEdit)
{
delete _extEdit;
}
}
QString ModuleExtEdit::moduleName()
{
return QObject::tr("External edit");
}
void ModuleExtEdit::init()
{
}
QMenu* ModuleExtEdit::initModuleMenu()
{
QMenu *menu = new QMenu(QObject::tr("Edit in..."), 0);
QList<XdgAction*> actionsList = _extEdit->getActions();
foreach (XdgAction *appAction, actionsList)
{
menu->addAction(appAction);
appAction->disconnect(SIGNAL(triggered()));
QObject::connect(appAction, SIGNAL(triggered()), _extEdit, SLOT(runExternalEditor()));
}
menu->setObjectName("menuExtedit");
return menu;
}
QWidget* ModuleExtEdit::initConfigWidget()
{
return 0;
}
void ModuleExtEdit::defaultSettings()
{
}
QAction* ModuleExtEdit::initModuleAction()
{
return 0;
}

@ -0,0 +1,45 @@
/***************************************************************************
* 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. *
***************************************************************************/
#ifndef MODULEEXTEDIT_H
#define MODULEEXTEDIT_H
#include "modules/abstractmodule.h"
#include "extedit.h"
#include <QAction>
class ModuleExtEdit: public AbstractModule
{
public:
ModuleExtEdit();
virtual ~ModuleExtEdit();
QString moduleName();
void init();
QMenu* initModuleMenu();
QWidget* initConfigWidget();
void defaultSettings();
QAction* initModuleAction();
private:
ExtEdit *_extEdit;
};
#endif // MODULEEXTEDIT_H

@ -0,0 +1,53 @@
cmake_minimum_required(VERSION 2.8.11)
set(uploader_SRC
moduleuploader.cpp
uploader.cpp
imgur/uploader_imgur.cpp
uploaderconfig.cpp
dialoguploader.cpp
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
dialoguploader.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
USE_QT5 TRUE
UPDATE_TRANSLATIONS ${UPDATE_TRANSLATIONS}
TEMPLATE "uploader"
TRANSLATION_DIR "${CMAKE_SOURCE_DIR}/translations"
SOURCES
${uploader_SRC}
${uploader_UI}
INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/translations"
)
qt5_translation_loader(uploader_QM_LOADER
"${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT_NAME}/translations"
"uploader"
)
add_library(uploader
SHARED
${uploader_SRC}
${uploader_UI}
${uploader_QMS}
${uploader_QM_LOADER}
)
set_property (TARGET uploader PROPERTY SOVERSION 1.0.0)
install(TARGETS uploader DESTINATION ${SG_LIBDIR})
target_link_libraries(uploader Qt5::Widgets Qt5::Network Qt5::X11Extras)

@ -0,0 +1,264 @@
/***************************************************************************
* 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 "dialoguploader.h"
#include "ui_dialoguploader.h"
#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>
#include <QDesktopServices>
#include <QDebug>
DialogUploader::DialogUploader(QWidget *parent) :
QDialog(parent),
_ui(new Ui::DialogUploader)
{
_ui->setupUi(this);
_ui->stackedWidget->setCurrentIndex(0);
_uploader = 0;
_uploaderWidget = 0;
slotSeletHost(0);
_ui->cbxUploaderList->addItems(UploaderConfig::labelsList());
UploaderConfig config;
QString defaultHost = config.loadSingleParam(QByteArray("common"), QByteArray(KEY_DEFAULT_HOST)).toString();
if (defaultHost.isEmpty())
_selectedHost = 0;
else
{
_selectedHost = config.labelsList().indexOf(defaultHost);
if (_selectedHost == -1)
_selectedHost = 0;
}
// load ishot preview
QSize imgSize = Core::instance()->getPixmap()->size();
QString pixmapSize = tr("Size: ") + QString::number(imgSize.width()) + "x" + QString::number(imgSize.height()) + tr(" pixel");
_ui->labImgSize->setText(pixmapSize);
_ui->labImage->setFixedWidth(256);
_ui->labImage->setFixedHeight(192);
_ui->labImage->setPixmap(Core::instance()->getPixmap()->scaled(_ui->labImage->size(),
Qt::KeepAspectRatio, Qt::SmoothTransformation));
// progressbar
_ui->progressBar->setVisible(false);
_ui->progressBar->setFormat(tr("Uploaded ") + "%p%" + " (" + "%v" + " of " + "%m bytes");
// upload staus labelsList
_ui->labUploadStatus->setText(tr("Ready to upload"));
connect(_ui->butClose, &QPushButton::clicked, this, &DialogUploader::close);
connect(_ui->butUpload, &QPushButton::clicked, this, &DialogUploader::slotUploadStart);
void (QComboBox::*uploaderChnage)(int) = &QComboBox::currentIndexChanged;
connect(_ui->cbxUploaderList, uploaderChnage, this, &DialogUploader::slotSeletHost);
_ui->cbxUploaderList->setCurrentIndex(_selectedHost);
}
DialogUploader::~DialogUploader()
{
qDebug() << "delete dialog upload";
if (_uploader)
delete _uploader;
delete _uploaderWidget;
delete _ui;
}
void DialogUploader::changeEvent(QEvent *e)
{
QDialog::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
_ui->retranslateUi(this);
break;
default:
break;
}
}
void DialogUploader::slotUploadStart()
{
_ui->progressBar->setVisible(true);
_ui->butUpload->setEnabled(false);
_ui->labUploadStatus->setText(tr("Upload processing... Please wait"));
switch(_selectedHost)
{
case 0:
_uploader = new Uploader_MediaCrush(Core::instance()->config()->getSaveFormat());
break;
case 1:
_uploader = new Uploader_ImgUr;
break;
default:
_uploader = new Uploader_ImgUr;
}
QVariantMap userSettings;
_uploader->getUserSettings(userSettings);;
_uploader->startUploading();
connect(_uploader, &Uploader::uploadProgress, this, &DialogUploader::slotUploadProgress);
void (Uploader::*uploadDone)() = &Uploader::uploadDone;
connect(_uploader, uploadDone, this, &DialogUploader::slotUploadDone);
connect(_uploader, &Uploader::uploadFail, this, &DialogUploader::slotUploadFail);
connect(_ui->butCopyLink, &QPushButton::clicked, this, &DialogUploader::slotCopyLink);
connect(_ui->butCopyExtCode, &QPushButton::clicked, this, &DialogUploader::slotCopyLink);
connect(_ui->butOpenDirectLink, &QPushButton::clicked, this, &DialogUploader::slotOpenDirectLink);
connect(_ui->butDeleteLink, &QPushButton::clicked, this, &DialogUploader::slotOpenDeleteLink);
}
void DialogUploader::slotSeletHost(int type)
{
_selectedHost = type;
if (_uploaderWidget)
delete _uploaderWidget;
switch(_selectedHost)
{
case 0:
_uploaderWidget = new Uploader_MediaCrush_Widget();
break;
case 1:
_uploaderWidget = new Uploader_ImgUr_Widget();
break;
default:
_uploaderWidget = new Uploader_MediaCrush_Widget();
}
_ui->stackedWidget->addWidget(_uploaderWidget);
_ui->stackedWidget->setCurrentWidget(_uploaderWidget);
}
void DialogUploader::slotUploadProgress(qint64 bytesSent, qint64 bytesTotal)
{
_ui->progressBar->setMaximum(bytesTotal);
_ui->progressBar->setValue(bytesSent);
if (bytesSent == bytesTotal)
_ui->progressBar->setFormat(tr("Receiving a response from the server"));
}
void DialogUploader::slotUploadDone()
{
qDebug() << "start dialog uploader done";
QList<ResultString_t> links = _uploader->parsedLinksToGui();
_ui->editDirectLink->setText(links.first().first);
_ui->editDeleteLink->setText(links.last().first);
for (int i =1; i < links.count()-1; ++i)
{
_ui->cbxExtCode->addItem(links.at(i).second);
_resultLinks << links.at(i).first;
}
_ui->stackedWidget->setCurrentIndex(0);
_ui->labUploadStatus->setText(tr("Upload completed"));
_ui->progressBar->setVisible(false);
_ui->cbxUploaderList->setEnabled(false);
UploaderConfig config;
if (config.autoCopyResultLink())
QApplication::clipboard()->setText(_ui->editDirectLink->text());
if (_resultLinks.count() > 0)
{
connect(_ui->cbxExtCode, SIGNAL(currentIndexChanged(int)), this, SLOT(slotChangeExtCode(int)));
_ui->cbxExtCode->setCurrentIndex(0);
_ui->editExtCode->setText(_resultLinks.at(0));
}
else
{
_ui->editExtCode->setVisible(false);
_ui->cbxExtCode->setVisible(false);
_ui->butCopyExtCode->setVisible(false);
_ui->labExtCode_2->setVisible(false);
}
_ui->butClose->setText(tr("Close"));
}
void DialogUploader::slotUploadFail(const QByteArray& error)
{
Q_UNUSED(error);
QMessageBox msg(this);
msg.setText(tr("Error uploading screenshot"));
msg.setWindowTitle(tr("Error"));
msg.setIcon(QMessageBox::Critical);
msg.exec();
_ui->progressBar->setVisible(false);
_ui->labUploadStatus->setText(tr("Ready to upload"));
_ui->butUpload->setEnabled(true);
_ui->butClose->setText(tr("Close"));
}
void DialogUploader::slotChangeExtCode(int code)
{
_ui->editExtCode->setText(_resultLinks.at(code));
}
void DialogUploader::slotCopyLink()
{
QString objName = sender()->objectName();
QString copyText;
if (objName == "butCopyLink")
copyText = _ui->editDirectLink->text();
if (objName == "butCopyExtCode")
copyText = _ui->editExtCode->text();
qApp->clipboard()->setText(copyText);
}
void DialogUploader::slotOpenDirectLink()
{
QDesktopServices::openUrl(QUrl(_ui->editDirectLink->text()));
}
void DialogUploader::slotOpenDeleteLink()
{
QMessageBox msg(this);
msg.setText(tr("Open this link in your default web-browser, it may directly delete your uploaded image, without any warnings."));
msg.setInformativeText(tr("Are you sure you want to continue?"));
msg.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
msg.setDefaultButton(QMessageBox::No);
int result = msg.exec();
if (result == QMessageBox::Yes)
QDesktopServices::openUrl(QUrl(_ui->editDeleteLink->text()));
}

@ -0,0 +1,66 @@
/***************************************************************************
* 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. *
***************************************************************************/
#ifndef DIALOGUPLOADER_H
#define DIALOGUPLOADER_H
#include "uploader.h"
#include <QDialog>
namespace Ui {
class DialogUploader;
}
class DialogUploader : public QDialog
{
Q_OBJECT
public:
explicit DialogUploader(QWidget *parent = 0);
~DialogUploader();
protected:
void changeEvent(QEvent *e);
private Q_SLOTS:
void slotUploadStart();
void slotSeletHost(int type);
void slotUploadProgress(qint64 bytesSent, qint64 bytesTotal);
void slotUploadDone();
void slotUploadFail(const QByteArray &error);
void slotChangeExtCode(int code);
void slotCopyLink();
void slotOpenDirectLink();
void slotOpenDeleteLink();
private:
Ui::DialogUploader *_ui;
Uploader* _uploader;
QWidget* _uploaderWidget;
// storage id curren selected img sho
qint8 _selectedHost;
QStringList _resultLinks;
};
#endif // DIALOGUPLOADER_H

@ -0,0 +1,339 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DialogUploader</class>
<widget class="QDialog" name="DialogUploader">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>841</width>
<height>340</height>
</rect>
</property>
<property name="windowTitle">
<string>Upload to internet</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="labUploaderList">
<property name="text">
<string>Upload to</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cbxUploaderList"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="labImage">
<property name="frameShape">
<enum>QFrame::Panel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<property name="text">
<string notr="true"/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labImgSize">
<property name="text">
<string notr="true"/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QStackedWidget" name="stackedWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="resultPage">
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QLabel" name="labDirectLink">
<property name="text">
<string>Direct link:</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_9">
<item>
<widget class="QLineEdit" name="editDirectLink">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="butOpenDirectLink">
<property name="minimumSize">
<size>
<width>112</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Open this link in the default web-browser</string>
</property>
<property name="text">
<string>Open</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="butCopyLink">
<property name="minimumSize">
<size>
<width>112</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Copy this link to the clipboard</string>
</property>
<property name="text">
<string>Copy</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<widget class="QLabel" name="labExtCode_2">
<property name="text">
<string>Extended preformed html or bb codes:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cbxExtCode"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<widget class="QLineEdit" name="editExtCode">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="butCopyExtCode">
<property name="minimumSize">
<size>
<width>112</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Copy this link to the clipboard</string>
</property>
<property name="text">
<string>Copy</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="labDeleteLink">
<property name="text">
<string>Link to delete image:</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QLineEdit" name="editDeleteLink">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="butDeleteLink">
<property name="minimumSize">
<size>
<width>112</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Open this link in the default web-browser</string>
</property>
<property name="text">
<string>Open</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>34</height>
</size>
</property>
</spacer>
</item>
</layout>
<zorder>labDirectLink</zorder>
<zorder>labDeleteLink</zorder>
</widget>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>96</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="labUploadStatus">
<property name="text">
<string notr="true">TextLabel</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QProgressBar" name="progressBar">
<property name="value">
<number>24</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>96</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<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="QPushButton" name="butUpload">
<property name="minimumSize">
<size>
<width>112</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Upload</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="butClose">
<property name="minimumSize">
<size>
<width>112</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>12</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

@ -0,0 +1,105 @@
/***************************************************************************
* 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_imgur.h"
#include <QDebug>
Uploader_ImgUr::Uploader_ImgUr(QObject* parent): Uploader(parent)
{
qDebug() << " create Imgur uploader";
}
Uploader_ImgUr::~Uploader_ImgUr()
{
qDebug() << " kill Imgur uploader";
}
/*!
* Start upload process
*/
void Uploader_ImgUr::startUploading()
{
createData();
createRequest(imageData, apiUrl());
_request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded");
Uploader::startUploading();
}
/*!
* Return url for upload image
*/
QUrl Uploader_ImgUr::apiUrl()
{
return QUrl("http://api.imgur.com/2/upload");
}
/*!
* Prepare image data for uploading
*/
void Uploader_ImgUr::createData(bool inBase64)
{
inBase64 = true;
Uploader::createData(inBase64);
// create data for upload
QByteArray uploadData;
uploadData.append(QString("key=").toUtf8());
uploadData.append(QUrl::toPercentEncoding("6920a141451d125b3e1357ce0e432409"));
uploadData.append(QString("&image=").toUtf8());
uploadData.append(QUrl::toPercentEncoding(this->imageData));
this->imageData = uploadData;
}
/*!
* Process server reply data
*/
void Uploader_ImgUr::replyFinished(QNetworkReply* reply)
{
if (reply->error() == QNetworkReply::NoError)
{
QByteArray replyXmalText = reply->readAll();
// creating list of element names
QVector<QByteArray> listXmlNodes;
listXmlNodes << "original" << "imgur_page" << "large_thumbnail" << "small_square" << "delete_page";
QMap<QByteArray, QByteArray> replyXmlMap = parseResultStrings(listXmlNodes, replyXmalText);
_uploadedStrings[UL_DIRECT_LINK].first = replyXmlMap["original"];
_uploadedStrings[UL_HTML_CODE].first = "<img src=\"" + replyXmlMap["original"] + "\" />";
_uploadedStrings[UL_BB_CODE].first = "[img]" + replyXmlMap["original"] +"[/img]";
_uploadedStrings[UL_HTML_CODE_THUMB].first = "<a href=\"" + replyXmlMap["original"] + "\"><img src=\"" + replyXmlMap["small_square"] + "\" /></a>";
_uploadedStrings[UL_BB_CODE_THUMB].first = "[url=" + replyXmlMap["original"] + "][img]"+ replyXmlMap["small_square"] +"[/img][/url]";
_uploadedStrings[UL_DELETE_URL].first = replyXmlMap["delete_page"];
qDebug() << "done" << _uploadedStrings[UL_DIRECT_LINK].first;
Q_EMIT uploadDoneStr(_uploadedStrings[UL_DIRECT_LINK].first);
Q_EMIT uploadDone();
}
else
{
Q_EMIT uploadFail(reply->errorString().toLatin1());
}
reply->deleteLater();
}

@ -0,0 +1,56 @@
/***************************************************************************
* 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. *
***************************************************************************/
#ifndef UPLOADER_IMGUR_H
#define UPLOADER_IMGUR_H
#include <uploader.h>
#include <QUrl>
namespace UploadImgUr {
enum Error {
ErrorFile,
ErrorNetwork,
ErrorCredits,
ErrorUpload,
ErrorCancel,
};
};
class Uploader_ImgUr : public Uploader
{
Q_OBJECT
public:
explicit Uploader_ImgUr(QObject* parent = 0);
virtual ~Uploader_ImgUr();
virtual void startUploading();
protected:
virtual QUrl apiUrl();
virtual void createData(bool inBase64 = false);
protected Q_SLOTS:
virtual void replyFinished(QNetworkReply* reply);
};
#endif // UPLOADER_IMGUR_H

@ -0,0 +1,46 @@
/***************************************************************************
* 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_imgur_widget.h"
#include "ui_uploader_imgur_widget.h"
Uploader_ImgUr_Widget::Uploader_ImgUr_Widget(QWidget *parent) :
QWidget(parent),
_ui(new Ui::Uploader_ImgUr_Widget)
{
_ui->setupUi(this);
}
Uploader_ImgUr_Widget::~Uploader_ImgUr_Widget()
{
delete _ui;
}
void Uploader_ImgUr_Widget::changeEvent(QEvent *e)
{
QWidget::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
_ui->retranslateUi(this);
break;
default:
break;
}
}

@ -0,0 +1,46 @@
/***************************************************************************
* 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. *
***************************************************************************/
#ifndef UPLOADER_IMGUR_WIDGET_H
#define UPLOADER_IMGUR_WIDGET_H
#include <QWidget>
#include <QVariant>
namespace Ui {
class Uploader_ImgUr_Widget;
}
class Uploader_ImgUr_Widget : public QWidget
{
Q_OBJECT
public:
explicit Uploader_ImgUr_Widget(QWidget *parent = 0);
~Uploader_ImgUr_Widget();
protected:
void changeEvent(QEvent *e);
private:
Ui::Uploader_ImgUr_Widget *_ui;
};
#endif // UPLOADER_IMGUR_WIDGET_H

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Uploader_ImgUr_Widget</class>
<widget class="QWidget" name="Uploader_ImgUr_Widget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>470</width>
<height>222</height>
</rect>
</property>
<property name="windowTitle">
<string notr="true">Upload to imgur.com</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="labTitle">
<property name="text">
<string>Upload to ImgUr.com</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>183</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

@ -0,0 +1,65 @@
/***************************************************************************
* 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 "uploaderconfigwidget_imgur.h"
#include "ui_uploaderconfigwidget_imgur.h"
#include "uploaderconfig.h"
#include <QVariant>
UploaderConfigWidget_ImgUr::UploaderConfigWidget_ImgUr(QWidget *parent) :
QWidget(parent),
_ui(new Ui::UploaderConfigWidget_ImgUr)
{
_ui->setupUi(this);
// load settings
UploaderConfig config;
QVariantMap loadedValues;
// TODO add imgur settings load
}
UploaderConfigWidget_ImgUr::~UploaderConfigWidget_ImgUr()
{
delete _ui;
}
void UploaderConfigWidget_ImgUr::saveSettings()
{
UploaderConfig config;
QVariantMap savingValues;
}
void UploaderConfigWidget_ImgUr::changeEvent(QEvent *e)
{
QWidget::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
_ui->retranslateUi(this);
break;
default:
break;
}
}

@ -0,0 +1,48 @@
/***************************************************************************
* 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. *
***************************************************************************/
#ifndef UPLOADERCONFIGWIDGET_IMGUR_H
#define UPLOADERCONFIGWIDGET_IMGUR_H
#include <QWidget>
namespace Ui {
class UploaderConfigWidget_ImgUr;
}
class UploaderConfigWidget_ImgUr : public QWidget
{
Q_OBJECT
public:
explicit UploaderConfigWidget_ImgUr(QWidget *parent = 0);
~UploaderConfigWidget_ImgUr();
public Q_SLOTS:
void saveSettings();
protected:
void changeEvent(QEvent *e);
private:
Ui::UploaderConfigWidget_ImgUr *_ui;
};
#endif // UPLOADERCONFIGWIDGET_IMGUR_H

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>UploaderConfigWidget_ImgUr</class>
<widget class="QWidget" name="UploaderConfigWidget_ImgUr">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>320</width>
<height>249</height>
</rect>
</property>
<property name="windowTitle">
<string notr="true">Configuration for imgur.com</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="labTitle">
<property name="text">
<string>Configuration for imgur.com upload</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>88</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="labImgurConfDescription">
<property name="text">
<string>Now is nothing yet</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>
</layout>
</widget>
<resources/>
<connections/>
</ui>

@ -0,0 +1,134 @@
/***************************************************************************
* 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());
}
}

@ -0,0 +1,53 @@
/***************************************************************************
* 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. *
***************************************************************************/
#ifndef UPLOADER_MEDIACRUSH_H
#define UPLOADER_MEDIACRUSH_H
#include <uploader.h>
#include <QUrl>
class Uploader_MediaCrush : public Uploader
{
Q_OBJECT
public:
explicit Uploader_MediaCrush(const QString& format, QObject* parent = 0);
virtual ~Uploader_MediaCrush();
virtual void startUploading();
protected:
virtual QUrl apiUrl();
virtual void createData(bool inBase64 = false);
protected Q_SLOTS:
virtual void replyFinished(QNetworkReply* reply);
private:
void setCurrentFormat(const QString& format);
QByteArray _host;
QByteArray _currentFormat;
void UpdateUploadedStrList();
};
#endif // UPLOADER_MEDIACRUSH_H

@ -0,0 +1,14 @@
#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;
}

@ -0,0 +1,22 @@
#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

@ -0,0 +1,44 @@
<?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>

@ -0,0 +1,14 @@
#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;
}

@ -0,0 +1,22 @@
#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

@ -0,0 +1,67 @@
<?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>

@ -0,0 +1,132 @@
/***************************************************************************
* 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 "moduleuploader.h"
#include "dialoguploader.h"
#include "uploaderconfigwidget.h"
#include "uploaderconfig.h"
#include "imgur/uploader_imgur.h"
#include "mediacrush/uploader_mediacrush.h"
#include "core/core.h"
#include <QApplication>
#include <QWaitCondition>
#include <QMutex>
#include <QClipboard>
#include <QDebug>
const QString UPLOAD_CMD_PARAM = "upload";
const QString UPLOAD_CMD_PARAM_SHORT = "u";
ModuleUploader::ModuleUploader(QObject *parent) :
QObject(parent), _ignoreCmdParam(false),
_optUpload(QStringList() << UPLOAD_CMD_PARAM_SHORT << UPLOAD_CMD_PARAM)
{
QString optUploadDescr = tr("Upload the screenshot to the default image host");
_optUpload.setDescription(optUploadDescr);
Core::instance()->addCmdLineOption(_optUpload);
}
QString ModuleUploader::moduleName()
{
return tr("Uploading");
}
void ModuleUploader::init()
{
Core *core = Core::instance();
if (core->checkCmdLineOption(_optUpload) == true && _ignoreCmdParam == false)
{
UploaderConfig config;
QString selectedtHost = config.loadSingleParam(QByteArray("common"), QByteArray(KEY_DEFAULT_HOST)).toString();
Uploader *uploader = 0;
switch(config.labelsList().indexOf(selectedtHost))
{
case 0:
uploader = new Uploader_MediaCrush(core->config()->getSaveFormat());
break;
case 1:
uploader = new Uploader_ImgUr;
break;
default:
uploader = new Uploader_ImgUr;
}
connect(uploader, &Uploader::uploadDoneStr, this, &ModuleUploader::shadowUploadDone);
connect(uploader, &Uploader::uploadFail, this, &ModuleUploader::shadowUploadFail);
uploader->startUploading();
_ignoreCmdParam = true;
}
else
{
DialogUploader *ui = new DialogUploader();
ui->exec();
}
}
QWidget* ModuleUploader::initConfigWidget()
{
QWidget* configWidget = new UploaderConfigWidget;
return configWidget;
}
void ModuleUploader::defaultSettings()
{
UploaderConfig config;
config.defaultSettings();
}
QMenu* ModuleUploader::initModuleMenu()
{
return 0;
}
QAction* ModuleUploader::initModuleAction()
{
QAction *act = new QAction(QObject::tr("Upload"), 0);
act->setObjectName("actUpload");
connect(act, &QAction::triggered, this, &ModuleUploader::init);
return act;
}
void ModuleUploader::shadowUploadDone(const QString& directLink)
{
sender()->deleteLater();
QString str = "Upload done, direct link to image: " + directLink;
qWarning() << str;
Q_EMIT uploadCompleteWithQuit();
}
void ModuleUploader::shadowUploadFail(const QByteArray& error)
{
sender()->deleteLater();
QString str = "Upload failed: " + error;
qWarning() << str;
Q_EMIT uploadCompleteWithQuit();
}

@ -0,0 +1,56 @@
/***************************************************************************
* 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. *
***************************************************************************/
#ifndef MODULEUPLOADER_H
#define MODULEUPLOADER_H
#include "modules/abstractmodule.h"
#include <QObject>
#include <QCommandLineOption>
#include <QWidget>
class ModuleUploader: public QObject, public AbstractModule
{
Q_OBJECT
public:
ModuleUploader(QObject *parent = 0);
QString moduleName();
QWidget* initConfigWidget();
void defaultSettings();
QMenu* initModuleMenu();
QAction* initModuleAction();
public Q_SLOTS:
void init();
private Q_SLOTS:
void shadowUploadDone(const QString &directLink);
void shadowUploadFail(const QByteArray &error);
Q_SIGNALS:
void uploadCompleteWithQuit();
private:
bool _ignoreCmdParam;
QCommandLineOption _optUpload;
};
#endif // MODULEUPLOADER_H

@ -0,0 +1,244 @@
/***************************************************************************
* 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.h"
#include "core/core.h"
#include "uploaderconfig.h"
#include <QDir>
#include <QUuid>
#include <QRegExp>
#include <QDebug>
Uploader::Uploader(QObject *parent) :
QObject(parent), _multipartData(0)
{
qsrand(126);
_strBoundary = "uploadbound" + QByteArray::number(qrand());
_net = new QNetworkAccessManager(this);
_serverReply = 0;
initUploadedStrList();
UploaderConfig config;
if (config.checkExistsConfigFile() == false)
{
config.defaultSettings();
}
}
Uploader::~Uploader()
{
}
/*!
* Create boundary string
* \param cleared -detect for str boundary line in httpRequest
*/
QByteArray Uploader::boundary(bool cleared)
{
QByteArray retBoundary = _strBoundary;
if (cleared == false)
{
retBoundary.append("\r\n");
retBoundary.prepend("--");
}
return retBoundary;
}
void Uploader::replyProgress(qint64 bytesSent, qint64 bytesTotal)
{
Q_EMIT uploadProgress(bytesSent, bytesTotal);
}
/*!
* Get user selected params from uploader widget (not from config file)
*/
void Uploader::getUserSettings(const QVariantMap& settings)
{
_userSettings = settings;
}
/*!
* Start uploading base class
*/
void Uploader::startUploading()
{
connect(_net, &QNetworkAccessManager::finished, this, &Uploader::replyFinished);
if (!_multipartData && !imageData.isEmpty())
{
_serverReply = _net->post(_request, imageData);
}
if (_multipartData && imageData.isEmpty())
{
_serverReply = _net->post(_request, _multipartData);
}
connect(_serverReply, &QNetworkReply::uploadProgress, this, &Uploader::replyProgress);
}
QMap< QByteArray, ResultString_t > Uploader::parsedLinks()
{
return _uploadedStrings;
}
QList<ResultString_t> Uploader::parsedLinksToGui()
{
QList<ResultString_t> list;
ResultString_t delete_url;
ResultString_t direct_link;
for (int i = 0; i < _uploadedStrings.count(); ++i)
{
QByteArray key = _uploadedStrings.keys().at(i);
if (key == "delete_url")
{
delete_url = _uploadedStrings[key];
}
else if(key == "direct_link")
{
direct_link = _uploadedStrings[key];
}
else
{
ResultString_t val = _uploadedStrings[key];
list.append(val);
}
}
list.prepend(direct_link);
if (delete_url.first.isEmpty() == false)
{
list.append(delete_url);
}
return list;
}
/*!
* Return url for uploaded image
*/
QUrl Uploader::apiUrl()
{
return QUrl();
}
/*!
* Prepare image data for uploading
*/
void Uploader::createData(bool inBase64)
{
Core *core = Core::instance();
_formatString = core->config()->getSaveFormat();
_uploadFilename = core->getTempFilename(_formatString);
core->writeScreen(_uploadFilename, _formatString , true);
if (inBase64 == false)
{
imageData = core->getScreen();
}
else
{
imageData = core->getScreen().toBase64();
}
core->killTempFile();
}
/*!
* Create request for send to server.
* this method called from subclasses.
*/
void Uploader::createRequest(const QByteArray& requestData, const QUrl url)
{
Q_UNUSED(requestData);
_request.setUrl(url);
}
/*!
* Parsing server reply and get map with server returned links
* \param keytags List of tags for parsing
* \param result String wuth server reply
*/
QMap<QByteArray, QByteArray> Uploader::parseResultStrings(const QVector< QByteArray >& keytags, const QByteArray& result)
{
QMap<QByteArray, QByteArray> replyMap;
QRegExp re;
QRegExp re2;
int inStart = 0;
int outStart = 0;
int len = 0;
// parsing xml
for (int i = 0; i < keytags.count(); ++i)
{
// set patterns for full lenght item
re.setPattern("<"+keytags[i]+">"); // open tag
re2.setPattern("</"+keytags[i]+">"); //close tag
// get start pos and lenght ite in xml
inStart = re.indexIn(result); // ops open tag start
outStart = re2.indexIn(result); // pos close tag start
len = outStart - inStart + re2.matchedLength(); // length of full string
// extract item and replace spec html symbols
QByteArray extractedText = result.mid(inStart, len);
extractedText = extractedText.replace("&quot;","'");
extractedText = extractedText.replace("&lt;","<");
extractedText = extractedText.replace("&gt;",">");
extractedText = extractedText.replace("<"+keytags[i]+">","");
extractedText = extractedText.replace("</"+keytags[i]+">","");
// to map
replyMap.insert(keytags[i], extractedText);
}
return replyMap;
}
void Uploader::initUploadedStrList()
{
ResultString_t strPair = qMakePair(QByteArray(), tr("Direct link"));
_uploadedStrings.insert(UL_DIRECT_LINK, strPair);
strPair = qMakePair(QByteArray(), tr("HTML code"));
_uploadedStrings.insert(UL_HTML_CODE ,strPair);
strPair = qMakePair(QByteArray(), tr("BB code"));
_uploadedStrings.insert(UL_BB_CODE, strPair);
strPair = qMakePair(QByteArray(), tr("HTML code with thumb image"));
_uploadedStrings.insert(UL_HTML_CODE_THUMB ,strPair);
strPair = qMakePair(QByteArray("bb_code_thumb"), tr("BB code with thumb image"));
_uploadedStrings.insert(UL_BB_CODE_THUMB, strPair);
strPair = qMakePair(QByteArray(), tr("URl to delete image"));
_uploadedStrings.insert(UL_DELETE_URL ,strPair);
}

@ -0,0 +1,93 @@
/***************************************************************************
* 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. *
***************************************************************************/
#ifndef UPLOADER_H
#define UPLOADER_H
#include <QObject>
#include <QByteArray>
#include <QMap>
#include <QPair>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QHttpMultiPart>
#include <QUrl>
typedef QPair<QByteArray, QString> ResultString_t;
const QByteArray UL_DIRECT_LINK = "direct_link";
const QByteArray UL_HTML_CODE = "html_code";
const QByteArray UL_BB_CODE = "bb_code";
const QByteArray UL_HTML_CODE_THUMB = "html_code_thumb";
const QByteArray UL_BB_CODE_THUMB = "bb_code_thumb";
const QByteArray UL_DELETE_URL = "delete_url";
class Uploader : public QObject
{
Q_OBJECT
public:
explicit Uploader(QObject *parent = 0);
virtual ~Uploader();
// overriding methods
void getUserSettings(const QVariantMap& settings);
virtual void startUploading();
QMap<QByteArray, ResultString_t> parsedLinks();
QList<ResultString_t> parsedLinksToGui();
Q_SIGNALS:
void uploadStart();
void uploadFail(const QByteArray &error);
void uploadDoneStr(const QString &directLink);
void uploadDone();
void uploadProgress(qint64 bytesSent, qint64 bytesTotal);
public Q_SLOTS:
protected Q_SLOTS:
virtual void replyFinished(QNetworkReply* reply) {Q_UNUSED(reply)};
void replyProgress(qint64 bytesSent, qint64 bytesTotal);
protected:
// methods
QByteArray boundary(bool cleared = false);
QMap<QByteArray, QByteArray> parseResultStrings(const QVector<QByteArray>& keytags, const QByteArray& result);
virtual QUrl apiUrl();
virtual void createData(bool inBase64 = false);
virtual void createRequest(const QByteArray& requestData, const QUrl url);
// vars
QByteArray imageData;
QHttpMultiPart *_multipartData;
QString _uploadFilename;
QString _formatString;
QByteArray _strBoundary;
QMap<QByteArray, ResultString_t> _uploadedStrings;
QVariantMap _userSettings;
QNetworkAccessManager *_net;
QNetworkRequest _request;
QNetworkReply *_serverReply;
private:
void initUploadedStrList();
};
#endif // UPLOADER_H

@ -0,0 +1,124 @@
/***************************************************************************
* 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 "uploaderconfig.h"
#include "core/config.h"
#include <QFile>
#include <QDebug>
#include <QDir>
// common defaults
#define DEF_AUTO_COPY_RESULT_LIMK false
#define DEF_DEFAULT_HOST "MediaCrush"
QStringList UploaderConfig::_labelsList = QStringList() << "MediaCrush" << "Imgur";
UploaderConfig::UploaderConfig()
{
QString configFile = Config::getConfigDir() + QDir::separator() + "uploader.conf";
_settings = new QSettings(configFile, QSettings::IniFormat);
_groupsList << "mediacru.sh" << "imgur.com";
}
UploaderConfig::~UploaderConfig()
{
delete _settings;
}
QStringList UploaderConfig::labelsList()
{
return _labelsList;
}
QVariantMap UploaderConfig::loadSettings(const QByteArray& group, QVariantMap& mapValues)
{
QVariantMap map;
_settings->beginGroup(group);
QVariant defValue, iterValue;
QVariantMap::iterator iter = mapValues.begin();
while(iter != mapValues.end())
{
defValue = iter.value();
iterValue = _settings->value(iter.key(), defValue);
map.insert(iter.key(), iterValue);
++iter;
}
_settings->endGroup();
return map;
}
QVariant UploaderConfig::loadSingleParam(const QByteArray& group, const QByteArray& param)
{
QVariant var;
_settings->beginGroup(group);
var = _settings->value(param);
_settings->endGroup();
return var;
}
void UploaderConfig::saveSettings(const QByteArray& group, QVariantMap& mapValues)
{
_settings->beginGroup(group);
QVariantMap::iterator iter = mapValues.begin();
while(iter != mapValues.end())
{
_settings->setValue(iter.key(), iter.value());
++iter;
}
_settings->endGroup();
}
void UploaderConfig::defaultSettings()
{
_settings->beginGroup("common");
_settings->setValue(KEY_AUTO_COPY_RESULT_LIMK, DEF_AUTO_COPY_RESULT_LIMK);
_settings->setValue(KEY_DEFAULT_HOST, DEF_DEFAULT_HOST);
_settings->endGroup();
// imgur.com settings
_settings->beginGroup(_groupsList[0]);
_settings->endGroup();
}
bool UploaderConfig::autoCopyResultLink()
{
_settings->beginGroup("common");
bool ret = _settings->value(KEY_AUTO_COPY_RESULT_LIMK, DEF_AUTO_COPY_RESULT_LIMK).toBool();
_settings->endGroup();
return ret;
}
bool UploaderConfig::checkExistsConfigFile() const
{
return QFile::exists(_settings->fileName());
}

@ -0,0 +1,56 @@
/***************************************************************************
* 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. *
***************************************************************************/
#ifndef UPLOADERCONFIG_H
#define UPLOADERCONFIG_H
#include <QSettings>
#include <QStringList>
#include <QVariant>
#include <QMap>
// Uploader config file common keys
#define KEY_AUTO_COPY_RESULT_LIMK "autoCopyDirectLink"
#define KEY_DEFAULT_HOST "defaultHost"
class UploaderConfig
{
public:
UploaderConfig();
~UploaderConfig();
static QStringList labelsList();
QVariantMap loadSettings(const QByteArray& group, QVariantMap& mapValues);
QVariant loadSingleParam(const QByteArray& group, const QByteArray& param);
void saveSettings(const QByteArray& group, QVariantMap& mapValues);
void defaultSettings();
bool checkExistsConfigFile() const;
bool autoCopyResultLink();
private:
QSettings *_settings;
QStringList _groupsList;
static QStringList _labelsList;
};
#endif // UPLOADERCONFIG_H

@ -0,0 +1,115 @@
/***************************************************************************
* 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 "uploaderconfigwidget.h"
#include "ui_uploaderconfigwidget.h"
#include "uploaderconfig.h"
#include <QVariantMap>
#include <QDebug>
UploaderConfigWidget::UploaderConfigWidget(QWidget *parent) :
QWidget(parent),
_ui(new Ui::UploaderConfigWidget)
{
_ui->setupUi(this);
_ui->settings->setCurrentWidget(_ui->commonSettings);
QStringList hosts = UploaderConfig::labelsList();
_ui->cbxHosts->addItems(hosts);
_ui->cbxDefaultHost->addItems(hosts);
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);
}
UploaderConfigWidget::~UploaderConfigWidget()
{
delete _ui;
}
void UploaderConfigWidget::loadSettings()
{
qDebug() << "load uploder common settings";
UploaderConfig config;
QVariantMap loadValues;
loadValues.insert("autoCopyDirectLink", QVariant(false));
loadValues.insert(KEY_DEFAULT_HOST, "");
loadValues = config.loadSettings("common", loadValues);
QString defaultHost = loadValues[KEY_DEFAULT_HOST].toString();
if (defaultHost.isEmpty() == true)
{
_ui->cbxDefaultHost->setCurrentIndex(0);
}
else
{
qint8 index = config.labelsList().indexOf(defaultHost);
if (index == -1)
{
index++;
}
_ui->cbxDefaultHost->setCurrentIndex(index);
}
_ui->checkAutoCopyMainLink->setChecked(loadValues["autoCopyDirectLink"].toBool());
}
void UploaderConfigWidget::saveSettings()
{
UploaderConfig config;
QVariantMap savingValues;
savingValues.insert(KEY_AUTO_COPY_RESULT_LIMK, _ui->checkAutoCopyMainLink->isChecked());
QString defaultHost = config.labelsList().at(_ui->cbxDefaultHost->currentIndex());
savingValues.insert(KEY_DEFAULT_HOST, defaultHost);
config.saveSettings("common", savingValues);
QMetaObject::invokeMethod(_imgur, "saveSettings");
}
void UploaderConfigWidget::changeEvent(QEvent *e)
{
QWidget::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
_ui->retranslateUi(this);
break;
default:
break;
}
}

@ -0,0 +1,56 @@
/***************************************************************************
* 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. *
***************************************************************************/
#ifndef UPLOADERCONFIGWIDGET_H
#define UPLOADERCONFIGWIDGET_H
#include <QWidget>
#include "imgur/uploaderconfigwidget_imgur.h"
#include "mediacrush/uploaderconfigwidget_mediacrush.h"
namespace Ui {
class UploaderConfigWidget;
}
class UploaderConfigWidget : public QWidget
{
Q_OBJECT
public:
explicit UploaderConfigWidget(QWidget *parent = 0);
~UploaderConfigWidget();
public Q_SLOTS:
void loadSettings();
void saveSettings();
protected:
void changeEvent(QEvent *e);
private:
Ui::UploaderConfigWidget *_ui;
// services widgets
UploaderConfigWidget_MediaCrush *_crush;
UploaderConfigWidget_ImgUr *_imgur;
};
#endif // UPLOADERCONFIGWIDGET_H

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>UploaderConfigWidget</class>
<widget class="QWidget" name="UploaderConfigWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>586</width>
<height>290</height>
</rect>
</property>
<property name="windowTitle">
<string notr="true">Uploader configuration</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QTabWidget" name="settings">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="commonSettings">
<attribute name="title">
<string>Common settings</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="labDefaultHost">
<property name="text">
<string>Default image host</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cbxDefaultHost"/>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="checkAutoCopyMainLink">
<property name="text">
<string>Always copy the link to the clipboard</string>
</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>165</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="hostsSettings">
<attribute name="title">
<string>Hosts settings</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="labHosts">
<property name="text">
<string>Settings for: </string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cbxHosts"/>
</item>
</layout>
</item>
<item>
<widget class="QStackedWidget" name="stackedHosts"/>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<context>
<name>QObject</name>
<message>
<location filename="../src/modules/extedit/moduleextedit.cpp" line="40"/>
<source>External edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/extedit/moduleextedit.cpp" line="51"/>
<source>Edit in...</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

@ -0,0 +1,768 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../src/ui/about.cpp" line="37"/>
<source>built on </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="42"/>
<source>using Qt </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="52"/>
<source>About</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="53"/>
<source>Thanks</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="54"/>
<source>Help us</source>
<translation type="unfinished"></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>
</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>
</message>
<message>
<location filename="../src/ui/about.cpp" line="115"/>
<location filename="../src/ui/about.cpp" line="144"/>
<source>E-Mail</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="118"/>
<source>Web site</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="122"/>
<source>Licensed under the </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="126"/>
<source>Copyright &amp;copy; 2009-2013, Artem &apos;DOOMer&apos; Galichkin</source>
<translation type="unfinished"></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>
</message>
<message>
<location filename="../src/ui/about.cpp" line="136"/>
<source>What you can do?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="139"/>
<source>Translate ScreenGrab to other languages</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="140"/>
<source>Make suggestions for next releases</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="141"/>
<source>Report bugs and issues</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="148"/>
<source>Bug tracker</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="158"/>
<source>Translate:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="160"/>
<source> Brazilian Portuguese translation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="161"/>
<source>Marcio Moraes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="163"/>
<source> Ukrainian translation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="164"/>
<source>Gennadi Motsyo</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="166"/>
<source> Spanish translation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="167"/>
<source>Burjans L García D</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="169"/>
<source> Italian translation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="173"/>
<source>Testing:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="175"/>
<source>Dual monitor support and other in Linux</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="176"/>
<source>Dual monitor support in Linux</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="177"/>
<source>win32-build [Windows XP and 7]</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="178"/>
<source>old win32-build [Windows Vista]</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="179"/>
<source>win32-build [Windows 7]</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ConfigDialog</name>
<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>
</message>
<message>
<location filename="../src/ui/configwidget.cpp" line="223"/>
<location filename="../src/ui/configwidget.cpp" line="330"/>
<source>Warning</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.cpp" line="317"/>
<source>Select directory</source>
<translation type="unfinished"></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>
</message>
<message>
<location filename="../src/ui/configwidget.cpp" line="347"/>
<source>None</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.cpp" line="393"/>
<source>Example: </source>
<translation type="unfinished"></translation>
</message>
<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>
</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>
</message>
<message>
<location filename="../src/ui/configwidget.cpp" line="473"/>
<source>This key is not supported on your system!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.cpp" line="508"/>
<source>Error</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Core</name>
<message>
<location filename="../src/core/core.cpp" line="171"/>
<source>New screen</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="171"/>
<source>New screen is getted!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="303"/>
<source>Saved</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="303"/>
<source>Saved to </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="327"/>
<source>Name of saved file is copied to the clipboard</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="333"/>
<source>Path to saved file is copied to the clipboard</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="345"/>
<source>Copied</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="345"/>
<source>Screenshot is copied to clipboard</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MainWindow</name>
<message>
<location filename="../src/ui/mainwindow.ui" line="20"/>
<source>ScreenGrab</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="92"/>
<source>Type: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="105"/>
<source>Type of screenshot</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="112"/>
<source>Full screen</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="117"/>
<source>Window</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="122"/>
<source>Screen area</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="127"/>
<source>Previous selection</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="141"/>
<source>Delay</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="160"/>
<source>Delay in seconds before taking screenshot</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="163"/>
<source> sec</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="196"/>
<source>toolBar</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="65"/>
<source>New</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="66"/>
<source>Save</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="67"/>
<source>Copy</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="68"/>
<source>Options</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="69"/>
<location filename="../src/ui/mainwindow.cpp" line="131"/>
<source>Help</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="70"/>
<source>About</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="71"/>
<source>Quit</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="321"/>
<source>Screenshot </source>
<translation type="unfinished"></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>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="334"/>
<location filename="../src/ui/mainwindow.cpp" line="435"/>
<location filename="../src/ui/mainwindow.cpp" line="464"/>
<source>Hide</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="379"/>
<source>None</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="442"/>
<source>Show</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="524"/>
<source>PNG Files</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="525"/>
<source>JPEG Files</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="526"/>
<source>BMP Files</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="546"/>
<source>Save As...</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QApplication</name>
<message>
<location filename="../src/core/regionselect.cpp" line="147"/>
<source>Use your mouse to draw a rectangle to screenshot or exit pressing
any key or using the right or middle mouse buttons.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/core/regionselect.cpp" line="179"/>
<source>%1 x %2 pixels </source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>aboutWidget</name>
<message>
<location filename="../src/ui/aboutwidget.ui" line="128"/>
<source>About Qt</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/aboutwidget.ui" line="154"/>
<source>Close</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>configwidget</name>
<message>
<location filename="../src/ui/configwidget.ui" line="26"/>
<location filename="../src/ui/configwidget.ui" line="716"/>
<source>Options</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="80"/>
<source>Main</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="85"/>
<source>Advanced</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="90"/>
<source>System tray</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="95"/>
<source>Shortcuts</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="129"/>
<source>Saving</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="143"/>
<source>Default save directory:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="152"/>
<source>Path to default selection dir for saving</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="165"/>
<source>Browse filesystem</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="168"/>
<source>Browse</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="186"/>
<source>Default filename:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="193"/>
<source>Default filename</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="204"/>
<source>Format</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="217"/>
<source>Default saving image format</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="233"/>
<source>Copy file name to the clipboard when saving</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="247"/>
<source>Do not copy</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="252"/>
<source>Copy file name only</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="257"/>
<source>Copy full file path</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="281"/>
<source>Screenshot</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="289"/>
<source>Delay:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="296"/>
<source>Default delay before grabbing screen</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="302"/>
<location filename="../src/ui/configwidget.ui" line="604"/>
<source> sec</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="328"/>
<source>No window decoration</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="337"/>
<source>Image quality</source>
<translation type="unfinished"></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>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="374"/>
<source>Zoom area around mouse in selection mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="418"/>
<source>Inserting current date time into saved filename</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="421"/>
<source>Insert current date and time in file name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="430"/>
<source>Template: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="455"/>
<source>Example: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="465"/>
<source>Automatically saving screenshots in grabbing process</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="468"/>
<source>Autosave screenshot</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="480"/>
<source>Save first screenshot</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="489"/>
<source>Allow run multiplies copy of ScreenGrab</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="492"/>
<source>Allow multiple instances of ScreenGrab</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="499"/>
<source>Open in external viewer on double click</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="502"/>
<source>Enable external viewer</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="537"/>
<source>Show ScreenGrab in the system tray</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="546"/>
<source>Tray messages:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="559"/>
<source>Tray messages display mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="563"/>
<source>Never</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="568"/>
<source>Tray mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="573"/>
<source>Always</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="585"/>
<source>Time of display tray messages</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="601"/>
<source>Time to display tray messages</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="622"/>
<source>Minimize to tray on click close button</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="625"/>
<source>Minimize to tray when closing</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="664"/>
<source>Action</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="669"/>
<source>Shortcut</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="674"/>
<source>Global shortcuts</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="681"/>
<source>Fill screen</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="686"/>
<source>Active window</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="691"/>
<source>Area select</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="697"/>
<source>Local shortcuts</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="701"/>
<source>New screen</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="706"/>
<source>Save screen</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="711"/>
<source>Copy screen</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="721"/>
<source>Help</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="726"/>
<source>Quit</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="737"/>
<source>Selected shortcut:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="744"/>
<source>Not defined</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="767"/>
<source>Restore default settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="770"/>
<source>Defaults</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="796"/>
<source>Save settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="799"/>
<source>Save</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="812"/>
<source>Discard changes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="815"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

@ -0,0 +1,3 @@
# Translations
Comment[de]=Bildschirmfotos aufnehmen und mit anderen teilen
GenericName[de]=Anwendung für Bildschirmfotos

File diff suppressed because it is too large Load Diff

@ -0,0 +1,874 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="es_ES">
<context>
<name>AboutDialog</name>
<message>
<location filename="../src/ui/about.cpp" line="37"/>
<source>built on </source>
<translation>construído en </translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="42"/>
<source>using Qt </source>
<translation>usando Qt </translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="52"/>
<source>About</source>
<translation>Acerca</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="53"/>
<source>Thanks</source>
<translation>Agradecimientos</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="122"/>
<source>Licensed under the </source>
<translation>Licencia bajo la </translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="54"/>
<source>Help us</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="115"/>
<location filename="../src/ui/about.cpp" line="144"/>
<source>E-Mail</source>
<translation>Correo E</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="118"/>
<source>Web site</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="126"/>
<source>Copyright &amp;copy; 2009-2013, Artem &apos;DOOMer&apos; Galichkin</source>
<translation type="unfinished">Copyright &amp;copy; 2009-2012, Artem &apos;DOOMer&apos; Galichkin {2009-2013,?}</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="136"/>
<source>What you can do?</source>
<translation type="unfinished"></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>
</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>
</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>
</message>
<message>
<location filename="../src/ui/about.cpp" line="139"/>
<source>Translate ScreenGrab to other languages</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="140"/>
<source>Make suggestions for next releases</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="141"/>
<source>Report bugs and issues</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="148"/>
<source>Bug tracker</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="158"/>
<source>Translate:</source>
<translation>Traducciones:</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="160"/>
<source> Brazilian Portuguese translation</source>
<translation>Brasil - Portugués</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="161"/>
<source>Marcio Moraes</source>
<translation>Marcio Moraes</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="163"/>
<source> Ukrainian translation</source>
<translation>Ucraniano</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="164"/>
<source>Gennadi Motsyo</source>
<translation>Gennadi Motsyo</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="166"/>
<source> Spanish translation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="167"/>
<source>Burjans L García D</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="169"/>
<source> Italian translation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="173"/>
<source>Testing:</source>
<translation>Pruebas:</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="175"/>
<source>Dual monitor support and other in Linux</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="176"/>
<source>Dual monitor support in Linux</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="177"/>
<source>win32-build [Windows XP and 7]</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="178"/>
<source>old win32-build [Windows Vista]</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="179"/>
<source>win32-build [Windows 7]</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ConfigDialog</name>
<message>
<location filename="../src/ui/configwidget.cpp" line="317"/>
<source>Select directory</source>
<translation>Selecciona el directorio</translation>
</message>
<message>
<location filename="../src/ui/configwidget.cpp" line="223"/>
<location filename="../src/ui/configwidget.cpp" line="330"/>
<source>Warning</source>
<translation>Cuidado</translation>
</message>
<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>
</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>
</message>
<message>
<location filename="../src/ui/configwidget.cpp" line="347"/>
<source>None</source>
<translation>No</translation>
</message>
<message>
<location filename="../src/ui/configwidget.cpp" line="393"/>
<source>Example: </source>
<translation>Ejemplo: </translation>
</message>
<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>
</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>
</message>
<message>
<location filename="../src/ui/configwidget.cpp" line="473"/>
<source>This key is not supported on your system!</source>
<translation>Esta tecla nos es admitida en su sistema!</translation>
</message>
<message>
<location filename="../src/ui/configwidget.cpp" line="508"/>
<source>Error</source>
<translation>Error</translation>
</message>
</context>
<context>
<name>Core</name>
<message>
<location filename="../src/core/core.cpp" line="171"/>
<source>New screen</source>
<translation>Nueva captura</translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="171"/>
<source>New screen is getted!</source>
<translation>Nueva captura obtenida</translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="303"/>
<source>Saved</source>
<translation>Guardado</translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="327"/>
<source>Name of saved file is copied to the clipboard</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="345"/>
<source>Copied</source>
<translation>Copiado</translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="303"/>
<source>Saved to </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="333"/>
<source>Path to saved file is copied to the clipboard</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="345"/>
<source>Screenshot is copied to clipboard</source>
<translation>Captura copiada al portapapeles</translation>
</message>
</context>
<context>
<name>DialogUploader</name>
<message>
<source>Direct link:</source>
<translation type="obsolete">Enlace directo:</translation>
</message>
<message>
<source>Copy</source>
<translation type="obsolete">Copiar</translation>
</message>
<message>
<source>Upload</source>
<translation type="obsolete">Subir</translation>
</message>
<message>
<source>Cancel</source>
<translation type="obsolete">Cancelar</translation>
</message>
<message>
<source>Close</source>
<translation type="obsolete">Cerrar</translation>
</message>
<message>
<source>Uploaded </source>
<translation type="obsolete">Subido </translation>
</message>
<message>
<source>Receiving a response from the server</source>
<translation type="obsolete">Recibiendo respuesta desde el servidor</translation>
</message>
<message>
<source>Error</source>
<translation type="obsolete">Error</translation>
</message>
</context>
<context>
<name>MainWindow</name>
<message>
<location filename="../src/ui/mainwindow.cpp" line="321"/>
<source>Screenshot </source>
<translation type="unfinished"></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>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="71"/>
<source>Quit</source>
<translation>Salir</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="66"/>
<source>Save</source>
<translation>Guardar</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="65"/>
<source>New</source>
<translation>Nuevo</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="67"/>
<source>Copy</source>
<translation>Copiar</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="334"/>
<location filename="../src/ui/mainwindow.cpp" line="435"/>
<location filename="../src/ui/mainwindow.cpp" line="464"/>
<source>Hide</source>
<translation>Ocultar</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="70"/>
<source>About</source>
<translation>Acerca de SG</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="524"/>
<source>PNG Files</source>
<translation>Archivo PNG</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="525"/>
<source>JPEG Files</source>
<translation>Archivo JPEG</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="526"/>
<source>BMP Files</source>
<translation>Archivo BMP</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="68"/>
<source>Options</source>
<translation>Opciones</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="379"/>
<source>None</source>
<translation>No</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="442"/>
<source>Show</source>
<translation>Ver</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="546"/>
<source>Save As...</source>
<translation>Guardar como...</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="20"/>
<source>ScreenGrab</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="92"/>
<source>Type: </source>
<translation>Tipo: </translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="105"/>
<source>Type of screenshot</source>
<translation>Tipo de captura</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="112"/>
<source>Full screen</source>
<translation>Pantalla completa</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="117"/>
<source>Window</source>
<translation>Ventana</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="122"/>
<source>Screen area</source>
<translation>Area o porción</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="127"/>
<source>Previous selection</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="196"/>
<source>toolBar</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Getting new screenshot</source>
<translation type="vanished">Obtener nueva captura</translation>
</message>
<message>
<source>New Screen</source>
<translation type="vanished">Nueva captura</translation>
</message>
<message>
<source>Ctrl+N</source>
<translation type="vanished">Ctrl+N</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="141"/>
<source>Delay</source>
<translation>Retardo</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="160"/>
<source>Delay in seconds before taking screenshot</source>
<translation>Demora en segundos antes hacer la captura</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="163"/>
<source> sec</source>
<translation> seg</translation>
</message>
<message>
<source>Save current screenshot into graphical file</source>
<translation type="vanished">Guardar actual captura como</translation>
</message>
<message>
<source>Save Screen</source>
<translation type="vanished">Guardar captura</translation>
</message>
<message>
<source>Ctrl+S</source>
<translation type="vanished">Ctrl+S</translation>
</message>
<message>
<source>Copy current screenshot into clipboard</source>
<translation type="vanished">Copiar captura al portapapeles</translation>
</message>
<message>
<source>Copy Screen</source>
<translation type="vanished">Copiar captura</translation>
</message>
<message>
<source>Ctrl+C</source>
<translation type="vanished">Ctrl+C</translation>
</message>
<message>
<source>Options dialog</source>
<translation type="vanished">Opciones de configuración</translation>
</message>
<message>
<source>Ctrl+O</source>
<translation type="vanished">Ctrl+O</translation>
</message>
<message>
<source>Show help information</source>
<translation type="vanished">Ver información de ayuda</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="69"/>
<location filename="../src/ui/mainwindow.cpp" line="131"/>
<source>Help</source>
<translation>Ayuda</translation>
</message>
<message>
<source>F1</source>
<translation type="vanished">F1</translation>
</message>
<message>
<source>Exit from ScreenGrab</source>
<translation type="vanished">Salir de ScreenGrab</translation>
</message>
<message>
<source>Ctrl+Q</source>
<translation type="vanished">Ctrl+Q</translation>
</message>
</context>
<context>
<name>QApplication</name>
<message>
<location filename="../src/core/regionselect.cpp" line="147"/>
<source>Use your mouse to draw a rectangle to screenshot or exit pressing
any key or using the right or middle mouse buttons.</source>
<translation>Use el arrastre del ratón para marcar el área y luego presione cualquier tecla.</translation>
</message>
<message>
<location filename="../src/core/regionselect.cpp" line="179"/>
<source>%1 x %2 pixels </source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<source>Upload</source>
<translation type="obsolete">Subir</translation>
</message>
</context>
<context>
<name>aboutWidget</name>
<message>
<location filename="../src/ui/aboutwidget.ui" line="128"/>
<source>About Qt</source>
<translation>Acerca de Qt</translation>
</message>
<message>
<location filename="../src/ui/aboutwidget.ui" line="154"/>
<source>Close</source>
<translation>Cerrar</translation>
</message>
</context>
<context>
<name>configwidget</name>
<message>
<location filename="../src/ui/configwidget.ui" line="26"/>
<location filename="../src/ui/configwidget.ui" line="716"/>
<source>Options</source>
<translation>Opciones</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="217"/>
<source>Default saving image format</source>
<translation>Formato por defecto para salvar imagen </translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="296"/>
<source>Default delay before grabbing screen</source>
<translation>Tiempo predeterminando antes de grabar la captura</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="418"/>
<source>Inserting current date time into saved filename</source>
<translation>Agregando fecha y tiempo actual al nombre de archivo</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="421"/>
<source>Insert current date and time in file name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="468"/>
<source>Autosave screenshot</source>
<translation>Autosalvar captura</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="480"/>
<source>Save first screenshot</source>
<translation>Salvar primera captura</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="337"/>
<source>Image quality</source>
<translation>Calidad de la imagen</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="346"/>
<source>Image quality (1 - small file, 100 - high quality)</source>
<translation>Calidad de imagen (1 - archivo pequeño, 100 - alta calidad)</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="489"/>
<source>Allow run multiplies copy of ScreenGrab</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="502"/>
<source>Enable external viewer</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="537"/>
<source>Show ScreenGrab in the system tray</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="622"/>
<source>Minimize to tray on click close button</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="625"/>
<source>Minimize to tray when closing</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="664"/>
<source>Action</source>
<translation>Acción</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="674"/>
<source>Global shortcuts</source>
<translation>Atajos globales</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="681"/>
<source>Fill screen</source>
<translation>Pantalla completa</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="686"/>
<source>Active window</source>
<translation>Ventana activa</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="691"/>
<source>Area select</source>
<translation>Seleccione area</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="697"/>
<source>Local shortcuts</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="701"/>
<source>New screen</source>
<translation>Nueva captura</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="706"/>
<source>Save screen</source>
<translation>Guardar captura</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="711"/>
<source>Copy screen</source>
<translation>Copiar captura</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="721"/>
<source>Help</source>
<translation>Ayuda</translation>
</message>
<message>
<source>Exit</source>
<translation type="vanished">Salir</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="744"/>
<source>Not defined</source>
<translation>No definido</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="767"/>
<source>Restore default settings</source>
<translation>Restaurar configuración por defecto</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="770"/>
<source>Defaults</source>
<translation>Predeterminado</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="796"/>
<source>Save settings</source>
<translation>Guardar configuración</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="799"/>
<source>Save</source>
<translation>Guardar</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="812"/>
<source>Discard changes</source>
<translation>Descartar cambios</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="815"/>
<source>Cancel</source>
<translation>Cancelar</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="80"/>
<source>Main</source>
<translation>Principal</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="90"/>
<source>System tray</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="129"/>
<source>Saving</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="143"/>
<source>Default save directory:</source>
<translation>Directorio de salva por defecto:</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="152"/>
<source>Path to default selection dir for saving</source>
<translation>Camino elegido por defecto para salvar</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="165"/>
<source>Browse filesystem</source>
<translation>Elije otro dir y carpeta</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="168"/>
<source>Browse</source>
<translation>Cambiar</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="186"/>
<source>Default filename:</source>
<translation>Nombre por defecto:</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="193"/>
<source>Default filename</source>
<translation>Nombre por defecto</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="204"/>
<source>Format</source>
<translation>Formato</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="233"/>
<source>Copy file name to the clipboard when saving</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="247"/>
<source>Do not copy</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="252"/>
<source>Copy file name only</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="257"/>
<source>Copy full file path</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="281"/>
<source>Screenshot</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="289"/>
<source>Delay:</source>
<translation>Demorar:</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="302"/>
<location filename="../src/ui/configwidget.ui" line="604"/>
<source> sec</source>
<translation> seg</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="328"/>
<source>No window decoration</source>
<translation>Sin decoración de ventana</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="85"/>
<source>Advanced</source>
<translation>Avanzado</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="430"/>
<source>Template: </source>
<translation>Plantilla: </translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="455"/>
<source>Example: </source>
<translation>Ejemplo: </translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="465"/>
<source>Automatically saving screenshots in grabbing process</source>
<translation>Salvar captura automaticamente en el proceso de grabacion</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="546"/>
<source>Tray messages:</source>
<translation>Notificar mensajes</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="559"/>
<source>Tray messages display mode</source>
<translation>Mostrar notificación de mensajes</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="563"/>
<source>Never</source>
<translation>Nunca</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="568"/>
<source>Tray mode</source>
<translation>Notificar</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="573"/>
<source>Always</source>
<translation>Siempre</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="95"/>
<source>Shortcuts</source>
<translation>Atajos de teclado</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="492"/>
<source>Allow multiple instances of ScreenGrab</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="499"/>
<source>Open in external viewer on double click</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="669"/>
<source>Shortcut</source>
<translation>Atajos</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="726"/>
<source>Quit</source>
<translation type="unfinished">Salir</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="737"/>
<source>Selected shortcut:</source>
<translation>Atajo seleccionado:</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="585"/>
<source>Time of display tray messages</source>
<translation>Tiempo que muestra la notificación</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="601"/>
<source>Time to display tray messages</source>
<translation>Tiempo que muestra la notificación</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="374"/>
<source>Zoom area around mouse in selection mode</source>
<translation>Ampliar el área cerca del ratón en el modo de selección</translation>
</message>
</context>
</TS>

@ -0,0 +1,828 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="it_IT">
<context>
<name>AboutDialog</name>
<message>
<location filename="../src/ui/about.cpp" line="37"/>
<source>built on </source>
<translation>compilato in </translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="42"/>
<source>using Qt </source>
<translation>usando QT</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="52"/>
<source>About</source>
<translation>Informazioni su</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="53"/>
<source>Thanks</source>
<translation>Grazie a</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="122"/>
<source>Licensed under the </source>
<translation>Rilasciato sotto licensa </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>
</message>
<message>
<location filename="../src/ui/about.cpp" line="54"/>
<source>Help us</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="118"/>
<source>Web site</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="126"/>
<source>Copyright &amp;copy; 2009-2013, Artem &apos;DOOMer&apos; Galichkin</source>
<translation type="unfinished">Copyright &amp;copy; 2009-2010, Artem &apos;DOOMer&apos; Galichkin {2009-2012,?} {2009-2013,?}</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="136"/>
<source>What you can do?</source>
<translation type="unfinished"></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>
</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>
</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>
</message>
<message>
<location filename="../src/ui/about.cpp" line="139"/>
<source>Translate ScreenGrab to other languages</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="140"/>
<source>Make suggestions for next releases</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="141"/>
<source>Report bugs and issues</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="148"/>
<source>Bug tracker</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="158"/>
<source>Translate:</source>
<translation>Traduzioni:</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="160"/>
<source> Brazilian Portuguese translation</source>
<translation>Traduzioni in Portoghese Brasiliano</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="161"/>
<source>Marcio Moraes</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="163"/>
<source> Ukrainian translation</source>
<translation>Traduzioni in Ucraino</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="164"/>
<source>Gennadi Motsyo</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="166"/>
<source> Spanish translation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="167"/>
<source>Burjans L García D</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="169"/>
<source> Italian translation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="173"/>
<source>Testing:</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="175"/>
<source>Dual monitor support and other in Linux</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="176"/>
<source>Dual monitor support in Linux</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="177"/>
<source>win32-build [Windows XP and 7]</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="178"/>
<source>old win32-build [Windows Vista]</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="179"/>
<source>win32-build [Windows 7]</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ConfigDialog</name>
<message>
<location filename="../src/ui/configwidget.cpp" line="317"/>
<source>Select directory</source>
<translation>Selezionare la cartella</translation>
</message>
<message>
<location filename="../src/ui/configwidget.cpp" line="223"/>
<location filename="../src/ui/configwidget.cpp" line="330"/>
<source>Warning</source>
<translation>Attenzione</translation>
</message>
<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>
</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>
</message>
<message>
<location filename="../src/ui/configwidget.cpp" line="347"/>
<source>None</source>
<translation>Nessuno</translation>
</message>
<message>
<location filename="../src/ui/configwidget.cpp" line="393"/>
<source>Example: </source>
<translation>Esempio: </translation>
</message>
<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>
</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>
</message>
<message>
<location filename="../src/ui/configwidget.cpp" line="473"/>
<source>This key is not supported on your system!</source>
<translation>Questa chiave non è supportata dal tuo sistema!</translation>
</message>
<message>
<location filename="../src/ui/configwidget.cpp" line="508"/>
<source>Error</source>
<translation>Errore</translation>
</message>
</context>
<context>
<name>Core</name>
<message>
<location filename="../src/core/core.cpp" line="171"/>
<source>New screen</source>
<translation>Nuova cattura</translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="171"/>
<source>New screen is getted!</source>
<translation>Nuova cattura ottenuta!</translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="303"/>
<source>Saved</source>
<translation>Salvata</translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="327"/>
<source>Name of saved file is copied to the clipboard</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="345"/>
<source>Copied</source>
<translation>Copiata</translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="303"/>
<source>Saved to </source>
<translation>Salvata in </translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="333"/>
<source>Path to saved file is copied to the clipboard</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="345"/>
<source>Screenshot is copied to clipboard</source>
<translation>La schermata è stata copiata negli appunti</translation>
</message>
</context>
<context>
<name>DialogUploader</name>
<message>
<source>Copy</source>
<translation type="obsolete">Copia</translation>
</message>
<message>
<source>Cancel</source>
<translation type="obsolete">Annulla</translation>
</message>
<message>
<source>Close</source>
<translation type="obsolete">Chiudi</translation>
</message>
<message>
<source>Error</source>
<translation type="obsolete">Errore</translation>
</message>
</context>
<context>
<name>MainWindow</name>
<message>
<location filename="../src/ui/mainwindow.ui" line="20"/>
<source>ScreenGrab</source>
<translation>ScreenGrab</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="92"/>
<source>Type: </source>
<translation>Tipo:</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="105"/>
<source>Type of screenshot</source>
<translation>Tipo di cattura</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="112"/>
<source>Full screen</source>
<translation>Tutto schermo</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="117"/>
<source>Window</source>
<translation>Finestra</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="122"/>
<source>Screen area</source>
<translation>Area dello schermo</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="127"/>
<source>Previous selection</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="196"/>
<source>toolBar</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Getting new screenshot</source>
<translation type="vanished">Effettua una nuova cattura</translation>
</message>
<message>
<source>New Screen</source>
<translation type="vanished">Nuova Cattura</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="141"/>
<source>Delay</source>
<translation>Ritardo</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="160"/>
<source>Delay in seconds before taking screenshot</source>
<translation>Ritardo in secondi prima di effettuare la cattura</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="163"/>
<source> sec</source>
<translation> sec</translation>
</message>
<message>
<source>Save current screenshot into graphical file</source>
<translation type="vanished">Salva la cattura corrente in un file</translation>
</message>
<message>
<source>Save Screen</source>
<translation type="vanished">Salva Cattura</translation>
</message>
<message>
<source>Copy current screenshot into clipboard</source>
<translation type="vanished">Copia la cattura corrente negli appunti</translation>
</message>
<message>
<source>Copy Screen</source>
<translation type="vanished">Copia Cattura</translation>
</message>
<message>
<source>Options dialog</source>
<translation type="vanished">Finestra delle impostazioni</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="68"/>
<source>Options</source>
<translation>Impostazioni</translation>
</message>
<message>
<source>Show help information</source>
<translation type="vanished">Mosta la guida in linea</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="69"/>
<location filename="../src/ui/mainwindow.cpp" line="131"/>
<source>Help</source>
<translation>Guida</translation>
</message>
<message>
<source>Exit from ScreenGrab</source>
<translation type="vanished">Esci da ScreenGrab</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="71"/>
<source>Quit</source>
<translation>Esci</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="66"/>
<source>Save</source>
<translation>Salva</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="65"/>
<source>New</source>
<translation>Nuovo</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="67"/>
<source>Copy</source>
<translation>Copia</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="334"/>
<location filename="../src/ui/mainwindow.cpp" line="435"/>
<location filename="../src/ui/mainwindow.cpp" line="464"/>
<source>Hide</source>
<translation>Nascondi</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="70"/>
<source>About</source>
<translation>Informazioni su</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="321"/>
<source>Screenshot </source>
<translation type="unfinished"></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>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="379"/>
<source>None</source>
<translation>Nessuno</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="442"/>
<source>Show</source>
<translation>Mostra</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="524"/>
<source>PNG Files</source>
<translation>File PNG</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="525"/>
<source>JPEG Files</source>
<translation>File JPEG</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="526"/>
<source>BMP Files</source>
<translation>File BMP</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="546"/>
<source>Save As...</source>
<translation>Salva con nome...</translation>
</message>
</context>
<context>
<name>QApplication</name>
<message>
<location filename="../src/core/regionselect.cpp" line="147"/>
<source>Use your mouse to draw a rectangle to screenshot or exit pressing
any key or using the right or middle mouse buttons.</source>
<translation>Usa il mouse per delineare un rettangolo da catturare o esci premendo
un tasto qualsiasi o usando il tasto destro o centrale del mouse.</translation>
</message>
<message>
<location filename="../src/core/regionselect.cpp" line="179"/>
<source>%1 x %2 pixels </source>
<translation>%1 x %2 pixel </translation>
</message>
</context>
<context>
<name>aboutWidget</name>
<message>
<location filename="../src/ui/aboutwidget.ui" line="128"/>
<source>About Qt</source>
<translation>Informazioni su QT</translation>
</message>
<message>
<location filename="../src/ui/aboutwidget.ui" line="154"/>
<source>Close</source>
<translation>Chiudi</translation>
</message>
</context>
<context>
<name>configwidget</name>
<message>
<location filename="../src/ui/configwidget.ui" line="26"/>
<location filename="../src/ui/configwidget.ui" line="716"/>
<source>Options</source>
<translation>Impostazioni</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="217"/>
<source>Default saving image format</source>
<translation>Formato standard di salvataggio immagine</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="296"/>
<source>Default delay before grabbing screen</source>
<translation>Ritardo prima della cattura predefinito</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="418"/>
<source>Inserting current date time into saved filename</source>
<translation>Inserisci la data e l&apos;orario corrente nel nome file</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="421"/>
<source>Insert current date and time in file name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="468"/>
<source>Autosave screenshot</source>
<translation>Salva la cattura automaticamente</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="480"/>
<source>Save first screenshot</source>
<translation>Salva la prima cattura</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="337"/>
<source>Image quality</source>
<translation type="unfinished"></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>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="489"/>
<source>Allow run multiplies copy of ScreenGrab</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="502"/>
<source>Enable external viewer</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="537"/>
<source>Show ScreenGrab in the system tray</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="622"/>
<source>Minimize to tray on click close button</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="625"/>
<source>Minimize to tray when closing</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="664"/>
<source>Action</source>
<translation>Azione</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="674"/>
<source>Global shortcuts</source>
<translation>Scorciatoie globali</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="681"/>
<source>Fill screen</source>
<translation>Tutto schermo</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="686"/>
<source>Active window</source>
<translation>Finestra attiva</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="691"/>
<source>Area select</source>
<translation>Selezione area</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="697"/>
<source>Local shortcuts</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="701"/>
<source>New screen</source>
<translation>Nuova cattura</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="706"/>
<source>Save screen</source>
<translation>Salva cattura</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="711"/>
<source>Copy screen</source>
<translation>Copia cattura</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="721"/>
<source>Help</source>
<translation>Guida</translation>
</message>
<message>
<source>Exit</source>
<translation type="obsolete">Esci</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="744"/>
<source>Not defined</source>
<translation>Non definito</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="767"/>
<source>Restore default settings</source>
<translation>Ripristina le impostazioni di fabbrica</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="770"/>
<source>Defaults</source>
<translation>Ripristina</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="796"/>
<source>Save settings</source>
<translation>Salva le impostazioni</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="799"/>
<source>Save</source>
<translation>Salva</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="812"/>
<source>Discard changes</source>
<translation>Annulla le modifiche</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="815"/>
<source>Cancel</source>
<translation>Annulla</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="80"/>
<source>Main</source>
<translation>Generale</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="90"/>
<source>System tray</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="129"/>
<source>Saving</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="143"/>
<source>Default save directory:</source>
<translation>Cartella dei salvataggi predefinita:</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="152"/>
<source>Path to default selection dir for saving</source>
<translation>Percorso per i salvataggi predefinito</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="165"/>
<source>Browse filesystem</source>
<translation>Sfoglia le cartelle</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="168"/>
<source>Browse</source>
<translation>Sfoglia</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="186"/>
<source>Default filename:</source>
<translation>Nome file predefinito:</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="193"/>
<source>Default filename</source>
<translation>Nome file predefinito</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="204"/>
<source>Format</source>
<translation>Formato</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="233"/>
<source>Copy file name to the clipboard when saving</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="247"/>
<source>Do not copy</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="252"/>
<source>Copy file name only</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="257"/>
<source>Copy full file path</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="281"/>
<source>Screenshot</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="289"/>
<source>Delay:</source>
<translation>Ritardo:</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="302"/>
<location filename="../src/ui/configwidget.ui" line="604"/>
<source> sec</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="328"/>
<source>No window decoration</source>
<translation>Escludi le decorazioni delle finestre</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="85"/>
<source>Advanced</source>
<translation>Avanzate</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="430"/>
<source>Template: </source>
<translation>Modello: </translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="455"/>
<source>Example: </source>
<translation>Esempio: </translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="465"/>
<source>Automatically saving screenshots in grabbing process</source>
<translation>Salva la schermata automaticamente durante la cattura</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="546"/>
<source>Tray messages:</source>
<translation>Messaggi nell&apos;area di notifica:</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="559"/>
<source>Tray messages display mode</source>
<translation>Modalità di visualizzazione nell&apos;area di notifica</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="563"/>
<source>Never</source>
<translation>Mai</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="568"/>
<source>Tray mode</source>
<translation>Modalità area di notifica</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="573"/>
<source>Always</source>
<translation>Sempre</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="585"/>
<source>Time of display tray messages</source>
<translation>Tempo di esposizione dei messaggi</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="601"/>
<source>Time to display tray messages</source>
<translation>Tempo di esposizione dei messaggi nell&apos;area di notifica</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="95"/>
<source>Shortcuts</source>
<translation>Scorciatoie</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="492"/>
<source>Allow multiple instances of ScreenGrab</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="499"/>
<source>Open in external viewer on double click</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="669"/>
<source>Shortcut</source>
<translation>Scorciatoia</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="726"/>
<source>Quit</source>
<translation type="unfinished">Esci</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="737"/>
<source>Selected shortcut:</source>
<translation>Seleziona scorciatoia:</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="374"/>
<source>Zoom area around mouse in selection mode</source>
<translation>Ingrandisci l&apos;area attorno al puntatore nella modalità selezione</translation>
</message>
</context>
</TS>

@ -0,0 +1,852 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="pt_BR">
<context>
<name>AboutDialog</name>
<message>
<location filename="../src/ui/about.cpp" line="37"/>
<source>built on </source>
<translation>construído em</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="42"/>
<source>using Qt </source>
<translation>usando o QT</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="52"/>
<source>About</source>
<translation>Sobre</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="53"/>
<source>Thanks</source>
<translation>Agradecimentos</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="122"/>
<source>Licensed under the </source>
<translation>Licenciado sob a </translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="115"/>
<location filename="../src/ui/about.cpp" line="144"/>
<source>E-Mail</source>
<translation>E-Mail</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="54"/>
<source>Help us</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="118"/>
<source>Web site</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="126"/>
<source>Copyright &amp;copy; 2009-2013, Artem &apos;DOOMer&apos; Galichkin</source>
<translation type="unfinished">Copyright &amp;copy; 2009-2011, Artem &apos;DOOMer&apos; Galichkin {2009-2010,?} {2009-2012,?} {2009-2013,?}</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="136"/>
<source>What you can do?</source>
<translation type="unfinished"></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>
</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>
</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>
</message>
<message>
<location filename="../src/ui/about.cpp" line="139"/>
<source>Translate ScreenGrab to other languages</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="140"/>
<source>Make suggestions for next releases</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="141"/>
<source>Report bugs and issues</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="148"/>
<source>Bug tracker</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="158"/>
<source>Translate:</source>
<translation>Tradução:</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="160"/>
<source> Brazilian Portuguese translation</source>
<translation>Tradução para o Português do Brasil</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="161"/>
<source>Marcio Moraes</source>
<translation>Márcio Moraes</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="163"/>
<source> Ukrainian translation</source>
<translation>Tradução para o Ucraniano</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="164"/>
<source>Gennadi Motsyo</source>
<translation>Gennadi Motsyo</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="166"/>
<source> Spanish translation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="167"/>
<source>Burjans L García D</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="169"/>
<source> Italian translation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="173"/>
<source>Testing:</source>
<translation>Testado em:</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="175"/>
<source>Dual monitor support and other in Linux</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="176"/>
<source>Dual monitor support in Linux</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="177"/>
<source>win32-build [Windows XP and 7]</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="178"/>
<source>old win32-build [Windows Vista]</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="179"/>
<source>win32-build [Windows 7]</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ConfigDialog</name>
<message>
<location filename="../src/ui/configwidget.cpp" line="317"/>
<source>Select directory</source>
<translation>Selecionar diretório</translation>
</message>
<message>
<location filename="../src/ui/configwidget.cpp" line="223"/>
<location filename="../src/ui/configwidget.cpp" line="330"/>
<source>Warning</source>
<translation>Aviso</translation>
</message>
<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>
</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>
</message>
<message>
<location filename="../src/ui/configwidget.cpp" line="347"/>
<source>None</source>
<translation>Nenhum</translation>
</message>
<message>
<location filename="../src/ui/configwidget.cpp" line="393"/>
<source>Example: </source>
<translation>Exemplo:</translation>
</message>
<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>
</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>
</message>
<message>
<location filename="../src/ui/configwidget.cpp" line="473"/>
<source>This key is not supported on your system!</source>
<translation>Esta tecla não é suportada no seu sistema!</translation>
</message>
<message>
<location filename="../src/ui/configwidget.cpp" line="508"/>
<source>Error</source>
<translation>Erro</translation>
</message>
</context>
<context>
<name>Core</name>
<message>
<location filename="../src/core/core.cpp" line="171"/>
<source>New screen</source>
<translation>Nova tela</translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="171"/>
<source>New screen is getted!</source>
<translation>A nova tela foi obtida!</translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="303"/>
<source>Saved</source>
<translation>Salva</translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="327"/>
<source>Name of saved file is copied to the clipboard</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="345"/>
<source>Copied</source>
<translation>Copiada</translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="303"/>
<source>Saved to </source>
<translation>Salva em </translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="333"/>
<source>Path to saved file is copied to the clipboard</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="345"/>
<source>Screenshot is copied to clipboard</source>
<translation>A captura de tela foi copiada para a área de transferência</translation>
</message>
</context>
<context>
<name>DialogUploader</name>
<message>
<source>Copy</source>
<translation type="obsolete">Copiar</translation>
</message>
<message>
<source>Cancel</source>
<translation type="obsolete">Cancelar</translation>
</message>
<message>
<source>Close</source>
<translation type="obsolete">Fechar</translation>
</message>
<message>
<source>Error</source>
<translation type="obsolete">Erro</translation>
</message>
</context>
<context>
<name>MainWindow</name>
<message>
<location filename="../src/ui/mainwindow.ui" line="20"/>
<source>ScreenGrab</source>
<translation>ScreenGrab</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="92"/>
<source>Type: </source>
<translation>Tipo:</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="105"/>
<source>Type of screenshot</source>
<translation>Tipo de captura de tela</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="112"/>
<source>Full screen</source>
<translation>Tela cheia</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="117"/>
<source>Window</source>
<translation>Janela ativa</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="122"/>
<source>Screen area</source>
<translation>Área da tela</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="127"/>
<source>Previous selection</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="196"/>
<source>toolBar</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Getting new screenshot</source>
<translation type="vanished">Obtendo uma nova captura de tela</translation>
</message>
<message>
<source>New Screen</source>
<translation type="vanished">Nova</translation>
</message>
<message>
<source>Ctrl+N</source>
<translation type="vanished">Ctrl+N</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="141"/>
<source>Delay</source>
<translation>Atraso</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="160"/>
<source>Delay in seconds before taking screenshot</source>
<translation>Atrasar em segundos antes de obter a captura de tela</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="163"/>
<source> sec</source>
<translation> seg</translation>
</message>
<message>
<source>Save current screenshot into graphical file</source>
<translation type="vanished">Salvar tela atual para um arquivo</translation>
</message>
<message>
<source>Save Screen</source>
<translation type="vanished">Salvar tela</translation>
</message>
<message>
<source>Ctrl+S</source>
<translation type="vanished">Ctrl+S</translation>
</message>
<message>
<source>Copy current screenshot into clipboard</source>
<translation type="vanished">Copiar captura de tela atual para a área de transferência</translation>
</message>
<message>
<source>Copy Screen</source>
<translation type="vanished">Copiar tela</translation>
</message>
<message>
<source>Ctrl+C</source>
<translation type="vanished">Ctrl+C</translation>
</message>
<message>
<source>Options dialog</source>
<translation type="vanished">Opções</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="68"/>
<source>Options</source>
<translation>Opções</translation>
</message>
<message>
<source>Ctrl+O</source>
<translation type="vanished">Ctrl+O</translation>
</message>
<message>
<source>Show help information</source>
<translation type="vanished">Mostrar informações de ajuda</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="69"/>
<location filename="../src/ui/mainwindow.cpp" line="131"/>
<source>Help</source>
<translation>Ajuda</translation>
</message>
<message>
<source>F1</source>
<translation type="vanished">F1</translation>
</message>
<message>
<source>Exit from ScreenGrab</source>
<translation type="vanished">Sair do ScreenGrab</translation>
</message>
<message>
<source>Ctrl+Q</source>
<translation type="vanished">Ctrl+Q</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="71"/>
<source>Quit</source>
<translation>Sair</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="66"/>
<source>Save</source>
<translation>Salvar</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="65"/>
<source>New</source>
<translation>Nova</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="67"/>
<source>Copy</source>
<translation>Copiar</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="334"/>
<location filename="../src/ui/mainwindow.cpp" line="435"/>
<location filename="../src/ui/mainwindow.cpp" line="464"/>
<source>Hide</source>
<translation>Ocultar</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="70"/>
<source>About</source>
<translation>Sobre</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="321"/>
<source>Screenshot </source>
<translation type="unfinished"></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>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="379"/>
<source>None</source>
<translation>Nenhum</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="442"/>
<source>Show</source>
<translation>Mostrar</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="524"/>
<source>PNG Files</source>
<translation>Arquivos PNG</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="525"/>
<source>JPEG Files</source>
<translation>Arquivos JPEG</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="526"/>
<source>BMP Files</source>
<translation>Arquivos BMP</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="546"/>
<source>Save As...</source>
<translation>Salvar Como...</translation>
</message>
</context>
<context>
<name>QApplication</name>
<message>
<location filename="../src/core/regionselect.cpp" line="147"/>
<source>Use your mouse to draw a rectangle to screenshot or exit pressing
any key or using the right or middle mouse buttons.</source>
<translation>Use o mouse para desenhar um retângulo na tela ou saia pressionando
qualquer tecla ou usando os botões direito ou do meio do mouse.</translation>
</message>
<message>
<location filename="../src/core/regionselect.cpp" line="179"/>
<source>%1 x %2 pixels </source>
<translation>%1 x %2 pixels </translation>
</message>
</context>
<context>
<name>aboutWidget</name>
<message>
<location filename="../src/ui/aboutwidget.ui" line="128"/>
<source>About Qt</source>
<translation>Sobre o QT</translation>
</message>
<message>
<location filename="../src/ui/aboutwidget.ui" line="154"/>
<source>Close</source>
<translation>Fechar</translation>
</message>
</context>
<context>
<name>configwidget</name>
<message>
<location filename="../src/ui/configwidget.ui" line="26"/>
<location filename="../src/ui/configwidget.ui" line="716"/>
<source>Options</source>
<translation>Opções</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="217"/>
<source>Default saving image format</source>
<translation>Salvando formato de imagem padrão</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="296"/>
<source>Default delay before grabbing screen</source>
<translation>Atraso padrão antes de capturar a tela</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="418"/>
<source>Inserting current date time into saved filename</source>
<translation>Inserindo data atual no nome do arquivo salvo</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="421"/>
<source>Insert current date and time in file name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="468"/>
<source>Autosave screenshot</source>
<translation>Salvar automaticamente a captura de tela</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="480"/>
<source>Save first screenshot</source>
<translation>Salvar primeiro a captura de tela</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="337"/>
<source>Image quality</source>
<translation type="unfinished"></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>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="489"/>
<source>Allow run multiplies copy of ScreenGrab</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="502"/>
<source>Enable external viewer</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="537"/>
<source>Show ScreenGrab in the system tray</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="622"/>
<source>Minimize to tray on click close button</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="625"/>
<source>Minimize to tray when closing</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="664"/>
<source>Action</source>
<translation>Ação</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="674"/>
<source>Global shortcuts</source>
<translation>Atalhos globais</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="681"/>
<source>Fill screen</source>
<translation>Toda a tela</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="686"/>
<source>Active window</source>
<translation>Janela ativa</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="691"/>
<source>Area select</source>
<translation>Selecionar área</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="697"/>
<source>Local shortcuts</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="701"/>
<source>New screen</source>
<translation>Nova tela</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="706"/>
<source>Save screen</source>
<translation>Salvar tela</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="711"/>
<source>Copy screen</source>
<translation>Copiar tela</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="721"/>
<source>Help</source>
<translation>Ajuda</translation>
</message>
<message>
<source>Exit</source>
<translation type="obsolete">Sair</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="744"/>
<source>Not defined</source>
<translation>Não definida</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="767"/>
<source>Restore default settings</source>
<translation>Restaurar configurações padrões</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="770"/>
<source>Defaults</source>
<translation>Padrões</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="796"/>
<source>Save settings</source>
<translation>Salvar configurações</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="799"/>
<source>Save</source>
<translation>Salvar</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="812"/>
<source>Discard changes</source>
<translation>Descartar alterações</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="815"/>
<source>Cancel</source>
<translation>Cancelar</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="80"/>
<source>Main</source>
<translation>Principal</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="90"/>
<source>System tray</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="129"/>
<source>Saving</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="143"/>
<source>Default save directory:</source>
<translation>Salvar no diretório padrão:</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="152"/>
<source>Path to default selection dir for saving</source>
<translation>Caminho do diretório padrão para salvar</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="165"/>
<source>Browse filesystem</source>
<translation>Navegar no sistema de arquivos</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="168"/>
<source>Browse</source>
<translation>Navegar</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="186"/>
<source>Default filename:</source>
<translation>Nome do arquivo padrão:</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="193"/>
<source>Default filename</source>
<translation>Nome do arquivo padrão</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="204"/>
<source>Format</source>
<translation>Formato</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="233"/>
<source>Copy file name to the clipboard when saving</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="247"/>
<source>Do not copy</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="252"/>
<source>Copy file name only</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="257"/>
<source>Copy full file path</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="281"/>
<source>Screenshot</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="289"/>
<source>Delay:</source>
<translation>Atraso:</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="302"/>
<location filename="../src/ui/configwidget.ui" line="604"/>
<source> sec</source>
<translation> seg</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="328"/>
<source>No window decoration</source>
<translation>Sem decoração da janela</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="85"/>
<source>Advanced</source>
<translation>Avançado</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="430"/>
<source>Template: </source>
<translation>Modelo: </translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="455"/>
<source>Example: </source>
<translation>Exemplo:</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="465"/>
<source>Automatically saving screenshots in grabbing process</source>
<translation>Salvar automaticamente capturas de telas no processo de obtenção</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="546"/>
<source>Tray messages:</source>
<translation>Mensagens na área de notificação:</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="559"/>
<source>Tray messages display mode</source>
<translation>Modo de exibição das mensagens na área de notificação</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="563"/>
<source>Never</source>
<translation>Nunca</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="568"/>
<source>Tray mode</source>
<translation>Modo da área de notificação</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="573"/>
<source>Always</source>
<translation>Sempre</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="585"/>
<source>Time of display tray messages</source>
<translation>Tempo de exibição das mensagens na área de notificação</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="601"/>
<source>Time to display tray messages</source>
<translation>Tempo para exibir as mensagens na área de notificação</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="95"/>
<source>Shortcuts</source>
<translation>Atalhos</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="492"/>
<source>Allow multiple instances of ScreenGrab</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="499"/>
<source>Open in external viewer on double click</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="669"/>
<source>Shortcut</source>
<translation>Atalho</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="726"/>
<source>Quit</source>
<translation type="unfinished">Sair</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="737"/>
<source>Selected shortcut:</source>
<translation>Atalho selecionado:</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="374"/>
<source>Zoom area around mouse in selection mode</source>
<translation>Zoom na área ao redor do mouse no modo de seleção</translation>
</message>
</context>
</TS>

@ -0,0 +1,3 @@
# Translations
Comment[ru]=Программа для создания снимков экрана
GenericName[ru]=Создание снимков экрана

File diff suppressed because it is too large Load Diff

@ -0,0 +1,3 @@
# Translations
Comment[uk]=Програма для створення знімків екрану
GenericName[uk]=Створення знімків екрану

@ -0,0 +1,958 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="uk">
<context>
<name>AboutDialog</name>
<message>
<location filename="../src/ui/about.cpp" line="37"/>
<source>built on </source>
<translation>дата збірки </translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="42"/>
<source>using Qt </source>
<translation>використовує Qt </translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="52"/>
<source>About</source>
<translation>Про програму</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="53"/>
<source>Thanks</source>
<translation>Подяки</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="122"/>
<source>Licensed under the </source>
<translation>За ліцензією </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>
</message>
<message>
<location filename="../src/ui/about.cpp" line="54"/>
<source>Help us</source>
<translation>Допомога проекту</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="118"/>
<source>Web site</source>
<translation>Сайт</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="126"/>
<source>Copyright &amp;copy; 2009-2013, Artem &apos;DOOMer&apos; Galichkin</source>
<translation type="unfinished">Авторські права &amp;copy; 2009-2012, Артем &apos;DOOMer&apos; Галічкін {2009-2013,?}</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="136"/>
<source>What you can do?</source>
<translation>Чим можна допомогти?</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>
</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>
</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>
</message>
<message>
<location filename="../src/ui/about.cpp" line="139"/>
<source>Translate ScreenGrab to other languages</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="140"/>
<source>Make suggestions for next releases</source>
<translation>Побажання для майбутніх версій</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="141"/>
<source>Report bugs and issues</source>
<translation>Повідомлення про помилки та проблеми </translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="148"/>
<source>Bug tracker</source>
<translation>Баг-трекер</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="158"/>
<source>Translate:</source>
<translation>Переклади:</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="160"/>
<source> Brazilian Portuguese translation</source>
<translation> Бразильський португальський переклад</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="161"/>
<source>Marcio Moraes</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="163"/>
<source> Ukrainian translation</source>
<translation> Український переклад</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="164"/>
<source>Gennadi Motsyo</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="166"/>
<source> Spanish translation</source>
<translation> Іспанський переклад</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="167"/>
<source>Burjans L García D</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="169"/>
<source> Italian translation</source>
<translation> Італійський переклад</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="173"/>
<source>Testing:</source>
<translation>Тестування:</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="175"/>
<source>Dual monitor support and other in Linux</source>
<translation>Двомоніторну підтримку та інші тести в Linux</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="176"/>
<source>Dual monitor support in Linux</source>
<translation>Двомоніторну підтримку в Linux</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="177"/>
<source>win32-build [Windows XP and 7]</source>
<translation>win32-версії [Windows XP and 7]</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="178"/>
<source>old win32-build [Windows Vista]</source>
<translation>Ранні win32-версії [Windows Vista]</translation>
</message>
<message>
<location filename="../src/ui/about.cpp" line="179"/>
<source>win32-build [Windows 7]</source>
<translation>win32-версії [Windows 7]</translation>
</message>
</context>
<context>
<name>ConfigDialog</name>
<message>
<location filename="../src/ui/configwidget.cpp" line="317"/>
<source>Select directory</source>
<translation>Вибір теки</translation>
</message>
<message>
<location filename="../src/ui/configwidget.cpp" line="223"/>
<location filename="../src/ui/configwidget.cpp" line="330"/>
<source>Warning</source>
<translation>Попередження</translation>
</message>
<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>
</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>
</message>
<message>
<location filename="../src/ui/configwidget.cpp" line="347"/>
<source>None</source>
<translation>Немає</translation>
</message>
<message>
<location filename="../src/ui/configwidget.cpp" line="393"/>
<source>Example: </source>
<translation>Приклад: </translation>
</message>
<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>
</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>
</message>
<message>
<location filename="../src/ui/configwidget.cpp" line="473"/>
<source>This key is not supported on your system!</source>
<translation>Ця комбінація не підтримується вашою системою!</translation>
</message>
<message>
<location filename="../src/ui/configwidget.cpp" line="508"/>
<source>Error</source>
<translation>Помилка</translation>
</message>
</context>
<context>
<name>Core</name>
<message>
<location filename="../src/core/core.cpp" line="171"/>
<source>New screen</source>
<translation>Новий скріншот</translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="171"/>
<source>New screen is getted!</source>
<translation>Новий знімок отримано!</translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="303"/>
<source>Saved</source>
<translation>Збережено</translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="327"/>
<source>Name of saved file is copied to the clipboard</source>
<translation>Ім&apos;я збереженого файлу скопійовано в буфер обміну </translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="345"/>
<source>Copied</source>
<translation>Скопійовано</translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="303"/>
<source>Saved to </source>
<translation>Збережено до</translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="333"/>
<source>Path to saved file is copied to the clipboard</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/core/core.cpp" line="345"/>
<source>Screenshot is copied to clipboard</source>
<translation>Скріншот скопійовано до кишені</translation>
</message>
</context>
<context>
<name>DialogUploader</name>
<message>
<source>Upload to internet</source>
<translation type="vanished">Завантажити в інтернет</translation>
</message>
<message>
<source>Upload to</source>
<translation type="vanished">Завантажити до</translation>
</message>
<message>
<source>Direct link:</source>
<translation type="vanished">Пряме посилання:</translation>
</message>
<message>
<source>Copy</source>
<translation type="vanished">Копіювати</translation>
</message>
<message>
<source>Extended preformed html or bb codes:</source>
<translation type="vanished">Попередньо відформатований html та bb-код:</translation>
</message>
<message>
<source>Upload</source>
<translation type="vanished">Завантажити</translation>
</message>
<message>
<source>Cancel</source>
<translation type="vanished">Відміна</translation>
</message>
<message>
<source>Close</source>
<translation type="vanished">Закрити</translation>
</message>
<message>
<source>Size: </source>
<translation type="vanished">Розмір:</translation>
</message>
<message>
<source> pixel</source>
<translation type="vanished"> піксель</translation>
</message>
<message>
<source>Uploaded </source>
<translation type="vanished">Завантажено </translation>
</message>
<message>
<source>Ready to upload</source>
<translation type="vanished">Готово до завантаження</translation>
</message>
<message>
<source>Receiving a response from the server</source>
<translation type="vanished">Отримання відповіді від сервера</translation>
</message>
<message>
<source>Upload completed</source>
<translation type="vanished">Завантаження завершено</translation>
</message>
<message>
<source>Error uploading screenshot</source>
<translation type="vanished">Помилка завантаження скріншота</translation>
</message>
<message>
<source>Error</source>
<translation type="vanished">Помилка</translation>
</message>
</context>
<context>
<name>MainWindow</name>
<message>
<location filename="../src/ui/mainwindow.cpp" line="321"/>
<source>Screenshot </source>
<translation>Скріншот </translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="325"/>
<source>Double click for open screenshot in external default image viewer</source>
<translation>Подвійний клік відкриє скріншот у зовнішньому переглядачі</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="71"/>
<source>Quit</source>
<translation>Вихід</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="66"/>
<source>Save</source>
<translation>Зберегти</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="65"/>
<source>New</source>
<translation>Новий</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="67"/>
<source>Copy</source>
<translation>Копіювати</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="334"/>
<location filename="../src/ui/mainwindow.cpp" line="435"/>
<location filename="../src/ui/mainwindow.cpp" line="464"/>
<source>Hide</source>
<translation>Сховати вікно</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="70"/>
<source>About</source>
<translation>Про програму</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="524"/>
<source>PNG Files</source>
<translation>файли PNG</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="525"/>
<source>JPEG Files</source>
<translation>файли JPEG</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="526"/>
<source>BMP Files</source>
<translation>файли BMP</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="68"/>
<source>Options</source>
<translation>Налаштування</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="379"/>
<source>None</source>
<translation>Немає</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="442"/>
<source>Show</source>
<translation>Показати вікно</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="546"/>
<source>Save As...</source>
<translation>Зберегти як...</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="20"/>
<source>ScreenGrab</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="92"/>
<source>Type: </source>
<translation>Тип: </translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="105"/>
<source>Type of screenshot</source>
<translation>Тип скріншоту</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="112"/>
<source>Full screen</source>
<translation>Весь екран</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="117"/>
<source>Window</source>
<translation>Вікно</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="122"/>
<source>Screen area</source>
<translation>Частина екрану</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="127"/>
<source>Previous selection</source>
<translation>Попередня вибрана частина</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="196"/>
<source>toolBar</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Getting new screenshot</source>
<translation type="vanished">Отримати новий скріншот</translation>
</message>
<message>
<source>New Screen</source>
<translation type="vanished">Новий знімок</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="141"/>
<source>Delay</source>
<translation>Затримка</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="160"/>
<source>Delay in seconds before taking screenshot</source>
<translation>Затримка в секундах перед отримання скріншоту</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui" line="163"/>
<source> sec</source>
<translation> сек</translation>
</message>
<message>
<source>Save current screenshot into graphical file</source>
<translation type="vanished">Зберегти скріншот в графічний файл</translation>
</message>
<message>
<source>Save Screen</source>
<translation type="vanished">Зберегти</translation>
</message>
<message>
<source>Copy current screenshot into clipboard</source>
<translation type="vanished">Копіювати скріншот до кишені</translation>
</message>
<message>
<source>Copy Screen</source>
<translation type="vanished">Копіювати</translation>
</message>
<message>
<source>Options dialog</source>
<translation type="vanished">Параметри програми</translation>
</message>
<message>
<source>Show help information</source>
<translation type="vanished">Показати довідкову інформацію</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cpp" line="69"/>
<location filename="../src/ui/mainwindow.cpp" line="131"/>
<source>Help</source>
<translation>Довідка</translation>
</message>
<message>
<source>Exit from ScreenGrab</source>
<translation type="vanished">Вийти з програми</translation>
</message>
</context>
<context>
<name>QApplication</name>
<message>
<location filename="../src/core/regionselect.cpp" line="147"/>
<source>Use your mouse to draw a rectangle to screenshot or exit pressing
any key or using the right or middle mouse buttons.</source>
<translation>Використовуйте ліву клавішу мишки для виділення частини екрану.
Клавіатурні клавіші і права кнопка мишки відміняють режим виділення області.</translation>
</message>
<message>
<location filename="../src/core/regionselect.cpp" line="179"/>
<source>%1 x %2 pixels </source>
<translation>%1 x %2 піксел </translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<source>External edit</source>
<translation type="vanished">Зовнішнє редагування</translation>
</message>
<message>
<source>Edit in...</source>
<translation type="vanished">Редагувати в...</translation>
</message>
<message>
<source>Upload</source>
<translation type="vanished">Завантажити</translation>
</message>
</context>
<context>
<name>Uploader</name>
<message>
<source>Direct link</source>
<translation type="vanished">Пряме посилання</translation>
</message>
<message>
<source>HTML code</source>
<translation type="vanished">HTML-код</translation>
</message>
<message>
<source>BB code</source>
<translation type="vanished">BB-код</translation>
</message>
<message>
<source>HTML code with thumb image</source>
<translation type="vanished">HTML-код з попереднім переглядом</translation>
</message>
<message>
<source>BB code with thumb image</source>
<translation type="vanished">BB-код з попереднім переглядом</translation>
</message>
<message>
<source>URl to delete image</source>
<translation type="vanished">URL для видалення зображення</translation>
</message>
</context>
<context>
<name>UploaderConfigWidget</name>
<message>
<source>Common settings</source>
<translation type="vanished">Загальні налаштування</translation>
</message>
<message>
<source>Hosts settings</source>
<translation type="vanished">Налаштування сервісів</translation>
</message>
<message>
<source>Settings for: </source>
<translation type="vanished">Налаштування для:</translation>
</message>
</context>
<context>
<name>UploaderConfigWidget_ImgUr</name>
<message>
<source>Configuration for imgur.com upload</source>
<translation type="vanished">Налаштування для завантаження на imgur.com</translation>
</message>
<message>
<source>Now is nothing yet</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>
<source>Upload to ImgUr.com</source>
<translation type="vanished">Завантаження на ImgUr.com</translation>
</message>
</context>
<context>
<name>aboutWidget</name>
<message>
<location filename="../src/ui/aboutwidget.ui" line="128"/>
<source>About Qt</source>
<translation>Про Qt</translation>
</message>
<message>
<location filename="../src/ui/aboutwidget.ui" line="154"/>
<source>Close</source>
<translation>Закрити</translation>
</message>
</context>
<context>
<name>configwidget</name>
<message>
<location filename="../src/ui/configwidget.ui" line="26"/>
<location filename="../src/ui/configwidget.ui" line="716"/>
<source>Options</source>
<translation>Налаштування</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="217"/>
<source>Default saving image format</source>
<translation>Формат зображень за замовчанням</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="296"/>
<source>Default delay before grabbing screen</source>
<translation>Затримка перед отримання скріншоту</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="418"/>
<source>Inserting current date time into saved filename</source>
<translation>Вставка дати та часу в ім&apos;я файлу при збереженні</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="421"/>
<source>Insert current date and time in file name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="468"/>
<source>Autosave screenshot</source>
<translation>Автозберігання скріншотів</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="480"/>
<source>Save first screenshot</source>
<translation>Зберігати перший скріншот</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="337"/>
<source>Image quality</source>
<translation>Якість картинки</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="346"/>
<source>Image quality (1 - small file, 100 - high quality)</source>
<translation>Якість картинки (1--меньшийрозмір файла, 100--найкраща якість)</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="489"/>
<source>Allow run multiplies copy of ScreenGrab</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="502"/>
<source>Enable external viewer</source>
<translation>Дозволити зовнішній переглядач</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="537"/>
<source>Show ScreenGrab in the system tray</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="622"/>
<source>Minimize to tray on click close button</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="625"/>
<source>Minimize to tray when closing</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="664"/>
<source>Action</source>
<translation>Дія</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="674"/>
<source>Global shortcuts</source>
<translation>Глобальні</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="681"/>
<source>Fill screen</source>
<translation>Весь екран</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="686"/>
<source>Active window</source>
<translation>Активне вікно</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="691"/>
<source>Area select</source>
<translation>Вибрану ділянку</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="697"/>
<source>Local shortcuts</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="701"/>
<source>New screen</source>
<translation>Новий скріншот</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="706"/>
<source>Save screen</source>
<translation>Зберегти скріншот</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="711"/>
<source>Copy screen</source>
<translation>Копіювати скріншот</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="721"/>
<source>Help</source>
<translation>Довідка</translation>
</message>
<message>
<source>Exit</source>
<translation type="vanished">Вихід</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="744"/>
<source>Not defined</source>
<translation>Не вибрана</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="767"/>
<source>Restore default settings</source>
<translation>Відновити початкові налаштування</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="770"/>
<source>Defaults</source>
<translation>За умовчанням</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="796"/>
<source>Save settings</source>
<translation>Зберегти налаштування</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="799"/>
<source>Save</source>
<translation>Зберегти</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="812"/>
<source>Discard changes</source>
<translation>Закрити без змін</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="815"/>
<source>Cancel</source>
<translation>Відміна</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="80"/>
<source>Main</source>
<translation>Головні</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="90"/>
<source>System tray</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="129"/>
<source>Saving</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="143"/>
<source>Default save directory:</source>
<translation>Тека для збереження:</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="152"/>
<source>Path to default selection dir for saving</source>
<translation>Шлях до теки для збереження</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="165"/>
<source>Browse filesystem</source>
<translation>Огляд файлової системи</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="168"/>
<source>Browse</source>
<translation>Огляд</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="186"/>
<source>Default filename:</source>
<translation>Вихідне ім&apos;я файлу:</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="193"/>
<source>Default filename</source>
<translation>Вихідне ім&apos;я файлу</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="204"/>
<source>Format</source>
<translation>Формат</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="233"/>
<source>Copy file name to the clipboard when saving</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="247"/>
<source>Do not copy</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="252"/>
<source>Copy file name only</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="257"/>
<source>Copy full file path</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="281"/>
<source>Screenshot</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="289"/>
<source>Delay:</source>
<translation>Затримка:</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="302"/>
<location filename="../src/ui/configwidget.ui" line="604"/>
<source> sec</source>
<translation> сек</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="328"/>
<source>No window decoration</source>
<translation>Без декорацій вікна</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="85"/>
<source>Advanced</source>
<translation>Розширені</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="430"/>
<source>Template: </source>
<translation>Шаблон: </translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="455"/>
<source>Example: </source>
<translation>Приклад: </translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="465"/>
<source>Automatically saving screenshots in grabbing process</source>
<translation>Автоматичне збереження скріншотів при їх отриманні</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="546"/>
<source>Tray messages:</source>
<translation>Спливаючі повідомлення:</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="559"/>
<source>Tray messages display mode</source>
<translation>Режим відображення спливаючих повідомлень</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="563"/>
<source>Never</source>
<translation>Ніколи</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="568"/>
<source>Tray mode</source>
<translation>Якщо згорнуто</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="573"/>
<source>Always</source>
<translation>Завжди</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="95"/>
<source>Shortcuts</source>
<translation>Комбінації клавіш</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="492"/>
<source>Allow multiple instances of ScreenGrab</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="499"/>
<source>Open in external viewer on double click</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="669"/>
<source>Shortcut</source>
<translation>Клавіші</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="726"/>
<source>Quit</source>
<translation type="unfinished">Вихід</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="737"/>
<source>Selected shortcut:</source>
<translation>Вибрана комбінація:</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="585"/>
<source>Time of display tray messages</source>
<translation>Час показу спливаючих повідомлень</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="601"/>
<source>Time to display tray messages</source>
<translation>Час показу спливаючих повідомлень</translation>
</message>
<message>
<location filename="../src/ui/configwidget.ui" line="374"/>
<source>Zoom area around mouse in selection mode</source>
<translation>Масштаб області курсора в режимі вибору</translation>
</message>
</context>
</TS>

@ -0,0 +1,257 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<context>
<name>DialogUploader</name>
<message>
<location filename="../src/modules/uploader/dialoguploader.ui" line="14"/>
<source>Upload to internet</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/dialoguploader.ui" line="22"/>
<source>Upload to</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/dialoguploader.ui" line="76"/>
<source>Direct link:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/dialoguploader.ui" line="98"/>
<location filename="../src/modules/uploader/dialoguploader.ui" line="189"/>
<source>Open this link in the default web-browser</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/dialoguploader.ui" line="101"/>
<location filename="../src/modules/uploader/dialoguploader.ui" line="192"/>
<source>Open</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/dialoguploader.ui" line="114"/>
<location filename="../src/modules/uploader/dialoguploader.ui" line="155"/>
<source>Copy this link to the clipboard</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/dialoguploader.ui" line="117"/>
<location filename="../src/modules/uploader/dialoguploader.ui" line="158"/>
<source>Copy</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/dialoguploader.ui" line="128"/>
<source>Extended preformed html or bb codes:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/dialoguploader.ui" line="167"/>
<source>Link to delete image:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/dialoguploader.ui" line="300"/>
<source>Upload</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/dialoguploader.ui" line="313"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/dialoguploader.cpp" line="66"/>
<source>Size: </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/dialoguploader.cpp" line="66"/>
<source> pixel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/dialoguploader.cpp" line="76"/>
<source>Uploaded </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/dialoguploader.cpp" line="79"/>
<location filename="../src/modules/uploader/dialoguploader.cpp" line="238"/>
<source>Ready to upload</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/dialoguploader.cpp" line="119"/>
<source>Upload processing... Please wait</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/dialoguploader.cpp" line="183"/>
<source>Receiving a response from the server</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/dialoguploader.cpp" line="201"/>
<source>Upload completed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/dialoguploader.cpp" line="225"/>
<location filename="../src/modules/uploader/dialoguploader.cpp" line="240"/>
<source>Close</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/dialoguploader.cpp" line="232"/>
<source>Error uploading screenshot</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/dialoguploader.cpp" line="233"/>
<source>Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/dialoguploader.cpp" line="274"/>
<source>Open this link in your default web-browser, it may directly delete your uploaded image, without any warnings.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/dialoguploader.cpp" line="275"/>
<source>Are you sure you want to continue?</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ModuleUploader</name>
<message>
<location filename="../src/modules/uploader/moduleuploader.cpp" line="47"/>
<source>Uploading</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<location filename="../src/modules/uploader/moduleuploader.cpp" line="101"/>
<source>Upload</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Uploader</name>
<message>
<location filename="../src/modules/uploader/uploader.cpp" line="228"/>
<source>Direct link</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/uploader.cpp" line="231"/>
<source>HTML code</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/uploader.cpp" line="234"/>
<source>BB code</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/uploader.cpp" line="237"/>
<source>HTML code with thumb image</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/uploader.cpp" line="240"/>
<source>BB code with thumb image</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/uploader.cpp" line="243"/>
<source>URl to delete image</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>UploaderConfigWidget</name>
<message>
<location filename="../src/modules/uploader/uploaderconfigwidget.ui" line="24"/>
<source>Common settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/uploaderconfigwidget.ui" line="32"/>
<source>Default image host</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/uploaderconfigwidget.ui" line="44"/>
<source>Always copy the link to the clipboard</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/uploaderconfigwidget.ui" line="65"/>
<source>Hosts settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/uploaderconfigwidget.ui" line="73"/>
<source>Settings for: </source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>UploaderConfigWidget_ImgUr</name>
<message>
<location filename="../src/modules/uploader/imgur/uploaderconfigwidget_imgur.ui" line="20"/>
<source>Configuration for imgur.com upload</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/modules/uploader/imgur/uploaderconfigwidget_imgur.ui" line="43"/>
<source>Now is nothing yet</source>
<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>
<location filename="../src/modules/uploader/imgur/uploader_imgur_widget.ui" line="20"/>
<source>Upload to ImgUr.com</source>
<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…
Cancel
Save