Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #3 from smoked-herring/feature/screenshots-multipl…
Browse files Browse the repository at this point in the history
…e-monitors

Feature/screenshots multiple monitors
  • Loading branch information
Dmitry Baryshev committed Sep 23, 2020
2 parents f1153a6 + 378382b commit 6c3c1ca
Show file tree
Hide file tree
Showing 99 changed files with 2,532 additions and 2,521 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Trader's Home Task (THT) helps you preparing for a working day on the U.S. stock

See [HOWTO](HOWTO.md) and [README](README.md) for more.

## 2.4.1
- Invoke screensot tool (Ctrl+Alt+S) on the screen where the mouse cursor is located

## 2.4.0
- Updated links in the About dialog
- Updated the tickers database
Expand Down
2 changes: 1 addition & 1 deletion THT-version.tag
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.0
2.4.1
2 changes: 1 addition & 1 deletion dist/tht.iss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#define MyAppName "Trader's Home Task"
#define MyAppPublisher "Dmitry Baryshev"
#define MyAppURL "https://github.com/smoked-herring/tht"
#define MyAppVersion "2.4.0"
#define MyAppVersion "2.4.1"

[Setup]
AppId={{16AE5DDE-D073-4F5F-ABC3-11DD9FBF58E3}
Expand Down
23 changes: 15 additions & 8 deletions regionselect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ RegionSelect::RegionSelect(KeyboardInteraction _ki, QWidget *parent) :
setWindowState(Qt::WindowFullScreen);
setCursor(Qt::CrossCursor);

QRect rc = QApplication::desktop()->screenGeometry(QCursor::pos());

sizeDesktop = rc.size();
resize(sizeDesktop);
screenRect = QApplication::desktop()->screenGeometry(QCursor::pos());
setGeometry(screenRect);

desktopPixmapBkg = QPixmap::grabWindow(QApplication::desktop()->winId(),
rc.x(), rc.y(), rc.width(), rc.height());
screenRect.x(),
screenRect.y(),
screenRect.width(),
screenRect.height());

desktopPixmapClr = desktopPixmapBkg;

move(rc.topLeft());
drawBackGround();
}

Expand All @@ -60,16 +60,23 @@ RegionSelect::~RegionSelect()
bool RegionSelect::event(QEvent *event)
{
if(ki == UseKeyboard && event->type() == QEvent::KeyPress)
{
event->accept();
reject();
}
else if(event->type() == QEvent::MouseButtonRelease)
{
event->accept();

QMouseEvent *mouseEvent = static_cast<QMouseEvent*> (event);

if(mouseEvent->button() == Qt::LeftButton)
accept();
}
else if(event->type() == QEvent::MouseButtonPress)
{
event->accept();

QMouseEvent *mouseEvent = static_cast<QMouseEvent*> (event);

if(mouseEvent->button() != Qt::LeftButton)
Expand Down Expand Up @@ -110,9 +117,9 @@ void RegionSelect::drawBackGround()
painter.setBrush(QBrush(QColor(0, 0, 0, 85), Qt::SolidPattern));

// draw rect of desktop size in poainter
painter.drawRect(QApplication::desktop()->rect());
painter.drawRect(rect());

QRect txtRect = QApplication::desktop()->screenGeometry(QApplication::desktop()->primaryScreen());
QRect txtRect = rect();
QString txtTip = ki == UseKeyboard
//: Appeal to the user
? tr("Using the mouse, select the rectangle, or click\nany keyboard button or right/middle mouse button to cancel.")
Expand Down
3 changes: 2 additions & 1 deletion regionselect.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,14 @@ class RegionSelect : public QDialog
KeyboardInteraction ki;

QRect selectRect;
QSize sizeDesktop;

QPoint selStartPoint;
QPoint selEndPoint;

QPixmap desktopPixmapBkg;
QPixmap desktopPixmapClr;

QRect screenRect;
};

#endif // REGIONSELECT_H
4 changes: 2 additions & 2 deletions ts/addtickersfrom_briefing_splits_da.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<context>
<name>BriefingSplitsDownloader</name>
<message>
<location filename="../briefingsplitsdownloader.cpp" line="29"/>
<location filename="../plugins/briefing/briefingsplitsdownloader.cpp" line="29"/>
<source>Briefing Stock Splits</source>
<extracomment>It&apos;s ok not to translate &quot;Briefing Stock Splits&quot; (e.g. you can just copy-paste &quot;Briefing Stock Splits&quot; to your translation). See http://www.briefing.com/investor/calendars/stock-splits</extracomment>
<translation>Briefing Stock Splits</translation>
Expand All @@ -13,7 +13,7 @@
<context>
<name>BriefingSplitsPlugin</name>
<message>
<location filename="../briefingsplitsplugin.cpp" line="40"/>
<location filename="../plugins/briefing/briefingsplitsplugin.cpp" line="40"/>
<source>Add from Briefing Stock Splits</source>
<extracomment>This is the label on a menu item that user clicks to issue the command. It&apos;s ok not to translate &quot;Briefing Stock Splits&quot; (e.g. you can just copy-paste &quot;Briefing Stock Splits&quot; to your translation). See http://www.briefing.com/investor/calendars/stock-splits</extracomment>
<translation>Sæt ind fra Briefing Stock Splits</translation>
Expand Down
4 changes: 2 additions & 2 deletions ts/addtickersfrom_briefing_splits_de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<context>
<name>BriefingSplitsDownloader</name>
<message>
<location filename="../briefingsplitsdownloader.cpp" line="29"/>
<location filename="../plugins/briefing/briefingsplitsdownloader.cpp" line="29"/>
<source>Briefing Stock Splits</source>
<extracomment>It&apos;s ok not to translate &quot;Briefing Stock Splits&quot; (e.g. you can just copy-paste &quot;Briefing Stock Splits&quot; to your translation). See http://www.briefing.com/investor/calendars/stock-splits</extracomment>
<translation>Briefing Stock Splits</translation>
Expand All @@ -13,7 +13,7 @@
<context>
<name>BriefingSplitsPlugin</name>
<message>
<location filename="../briefingsplitsplugin.cpp" line="40"/>
<location filename="../plugins/briefing/briefingsplitsplugin.cpp" line="40"/>
<source>Add from Briefing Stock Splits</source>
<extracomment>This is the label on a menu item that user clicks to issue the command. It&apos;s ok not to translate &quot;Briefing Stock Splits&quot; (e.g. you can just copy-paste &quot;Briefing Stock Splits&quot; to your translation). See http://www.briefing.com/investor/calendars/stock-splits</extracomment>
<translation>Aus Briefing Stock Splits hinzufügen</translation>
Expand Down
4 changes: 2 additions & 2 deletions ts/addtickersfrom_briefing_splits_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<context>
<name>BriefingSplitsDownloader</name>
<message>
<location filename="../briefingsplitsdownloader.cpp" line="29"/>
<location filename="../plugins/briefing/briefingsplitsdownloader.cpp" line="29"/>
<source>Briefing Stock Splits</source>
<extracomment>It&apos;s ok not to translate &quot;Briefing Stock Splits&quot; (e.g. you can just copy-paste &quot;Briefing Stock Splits&quot; to your translation). See http://www.briefing.com/investor/calendars/stock-splits</extracomment>
<translation type="unfinished"></translation>
Expand All @@ -13,7 +13,7 @@
<context>
<name>BriefingSplitsPlugin</name>
<message>
<location filename="../briefingsplitsplugin.cpp" line="40"/>
<location filename="../plugins/briefing/briefingsplitsplugin.cpp" line="40"/>
<source>Add from Briefing Stock Splits</source>
<extracomment>This is the label on a menu item that user clicks to issue the command. It&apos;s ok not to translate &quot;Briefing Stock Splits&quot; (e.g. you can just copy-paste &quot;Briefing Stock Splits&quot; to your translation). See http://www.briefing.com/investor/calendars/stock-splits</extracomment>
<translation type="unfinished"></translation>
Expand Down
4 changes: 2 additions & 2 deletions ts/addtickersfrom_briefing_splits_es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<context>
<name>BriefingSplitsDownloader</name>
<message>
<location filename="../briefingsplitsdownloader.cpp" line="29"/>
<location filename="../plugins/briefing/briefingsplitsdownloader.cpp" line="29"/>
<source>Briefing Stock Splits</source>
<extracomment>It&apos;s ok not to translate &quot;Briefing Stock Splits&quot; (e.g. you can just copy-paste &quot;Briefing Stock Splits&quot; to your translation). See http://www.briefing.com/investor/calendars/stock-splits</extracomment>
<translation>Briefing Stock Splits</translation>
Expand All @@ -13,7 +13,7 @@
<context>
<name>BriefingSplitsPlugin</name>
<message>
<location filename="../briefingsplitsplugin.cpp" line="40"/>
<location filename="../plugins/briefing/briefingsplitsplugin.cpp" line="40"/>
<source>Add from Briefing Stock Splits</source>
<extracomment>This is the label on a menu item that user clicks to issue the command. It&apos;s ok not to translate &quot;Briefing Stock Splits&quot; (e.g. you can just copy-paste &quot;Briefing Stock Splits&quot; to your translation). See http://www.briefing.com/investor/calendars/stock-splits</extracomment>
<translation>Añadir desde Briefing Stock Splits</translation>
Expand Down
4 changes: 2 additions & 2 deletions ts/addtickersfrom_briefing_splits_fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<context>
<name>BriefingSplitsDownloader</name>
<message>
<location filename="../briefingsplitsdownloader.cpp" line="29"/>
<location filename="../plugins/briefing/briefingsplitsdownloader.cpp" line="29"/>
<source>Briefing Stock Splits</source>
<extracomment>It&apos;s ok not to translate &quot;Briefing Stock Splits&quot; (e.g. you can just copy-paste &quot;Briefing Stock Splits&quot; to your translation). See http://www.briefing.com/investor/calendars/stock-splits</extracomment>
<translation>Briefing Stock Splits</translation>
Expand All @@ -13,7 +13,7 @@
<context>
<name>BriefingSplitsPlugin</name>
<message>
<location filename="../briefingsplitsplugin.cpp" line="40"/>
<location filename="../plugins/briefing/briefingsplitsplugin.cpp" line="40"/>
<source>Add from Briefing Stock Splits</source>
<extracomment>This is the label on a menu item that user clicks to issue the command. It&apos;s ok not to translate &quot;Briefing Stock Splits&quot; (e.g. you can just copy-paste &quot;Briefing Stock Splits&quot; to your translation). See http://www.briefing.com/investor/calendars/stock-splits</extracomment>
<translation>Ajouter depuis Briefing Stock Splits</translation>
Expand Down
4 changes: 2 additions & 2 deletions ts/addtickersfrom_briefing_splits_it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<context>
<name>BriefingSplitsDownloader</name>
<message>
<location filename="../briefingsplitsdownloader.cpp" line="29"/>
<location filename="../plugins/briefing/briefingsplitsdownloader.cpp" line="29"/>
<source>Briefing Stock Splits</source>
<extracomment>It&apos;s ok not to translate &quot;Briefing Stock Splits&quot; (e.g. you can just copy-paste &quot;Briefing Stock Splits&quot; to your translation). See http://www.briefing.com/investor/calendars/stock-splits</extracomment>
<translation>Briefing Stock Splits</translation>
Expand All @@ -13,7 +13,7 @@
<context>
<name>BriefingSplitsPlugin</name>
<message>
<location filename="../briefingsplitsplugin.cpp" line="40"/>
<location filename="../plugins/briefing/briefingsplitsplugin.cpp" line="40"/>
<source>Add from Briefing Stock Splits</source>
<extracomment>This is the label on a menu item that user clicks to issue the command. It&apos;s ok not to translate &quot;Briefing Stock Splits&quot; (e.g. you can just copy-paste &quot;Briefing Stock Splits&quot; to your translation). See http://www.briefing.com/investor/calendars/stock-splits</extracomment>
<translation>Aggiungi da Briefing Stock Splits</translation>
Expand Down
4 changes: 2 additions & 2 deletions ts/addtickersfrom_briefing_splits_ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<context>
<name>BriefingSplitsDownloader</name>
<message>
<location filename="../briefingsplitsdownloader.cpp" line="29"/>
<location filename="../plugins/briefing/briefingsplitsdownloader.cpp" line="29"/>
<source>Briefing Stock Splits</source>
<extracomment>It&apos;s ok not to translate &quot;Briefing Stock Splits&quot; (e.g. you can just copy-paste &quot;Briefing Stock Splits&quot; to your translation). See http://www.briefing.com/investor/calendars/stock-splits</extracomment>
<translation>Briefing Stock Splits</translation>
Expand All @@ -13,7 +13,7 @@
<context>
<name>BriefingSplitsPlugin</name>
<message>
<location filename="../briefingsplitsplugin.cpp" line="40"/>
<location filename="../plugins/briefing/briefingsplitsplugin.cpp" line="40"/>
<source>Add from Briefing Stock Splits</source>
<extracomment>This is the label on a menu item that user clicks to issue the command. It&apos;s ok not to translate &quot;Briefing Stock Splits&quot; (e.g. you can just copy-paste &quot;Briefing Stock Splits&quot; to your translation). See http://www.briefing.com/investor/calendars/stock-splits</extracomment>
<translation>Briefing Stock Splitsから追加</translation>
Expand Down
4 changes: 2 additions & 2 deletions ts/addtickersfrom_briefing_splits_ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<context>
<name>BriefingSplitsDownloader</name>
<message>
<location filename="../briefingsplitsdownloader.cpp" line="29"/>
<location filename="../plugins/briefing/briefingsplitsdownloader.cpp" line="29"/>
<source>Briefing Stock Splits</source>
<extracomment>It&apos;s ok not to translate &quot;Briefing Stock Splits&quot; (e.g. you can just copy-paste &quot;Briefing Stock Splits&quot; to your translation). See http://www.briefing.com/investor/calendars/stock-splits</extracomment>
<translation>Briefing Stock Splits</translation>
Expand All @@ -13,7 +13,7 @@
<context>
<name>BriefingSplitsPlugin</name>
<message>
<location filename="../briefingsplitsplugin.cpp" line="40"/>
<location filename="../plugins/briefing/briefingsplitsplugin.cpp" line="40"/>
<source>Add from Briefing Stock Splits</source>
<extracomment>This is the label on a menu item that user clicks to issue the command. It&apos;s ok not to translate &quot;Briefing Stock Splits&quot; (e.g. you can just copy-paste &quot;Briefing Stock Splits&quot; to your translation). See http://www.briefing.com/investor/calendars/stock-splits</extracomment>
<translation>Briefing Stock Splits로부터 추가</translation>
Expand Down
4 changes: 2 additions & 2 deletions ts/addtickersfrom_briefing_splits_nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<context>
<name>BriefingSplitsDownloader</name>
<message>
<location filename="../briefingsplitsdownloader.cpp" line="29"/>
<location filename="../plugins/briefing/briefingsplitsdownloader.cpp" line="29"/>
<source>Briefing Stock Splits</source>
<extracomment>It&apos;s ok not to translate &quot;Briefing Stock Splits&quot; (e.g. you can just copy-paste &quot;Briefing Stock Splits&quot; to your translation). See http://www.briefing.com/investor/calendars/stock-splits</extracomment>
<translation>Briefing Stock Splits</translation>
Expand All @@ -13,7 +13,7 @@
<context>
<name>BriefingSplitsPlugin</name>
<message>
<location filename="../briefingsplitsplugin.cpp" line="40"/>
<location filename="../plugins/briefing/briefingsplitsplugin.cpp" line="40"/>
<source>Add from Briefing Stock Splits</source>
<extracomment>This is the label on a menu item that user clicks to issue the command. It&apos;s ok not to translate &quot;Briefing Stock Splits&quot; (e.g. you can just copy-paste &quot;Briefing Stock Splits&quot; to your translation). See http://www.briefing.com/investor/calendars/stock-splits</extracomment>
<translation>Advertentie van Briefing Stock Splits</translation>
Expand Down
4 changes: 2 additions & 2 deletions ts/addtickersfrom_briefing_splits_pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<context>
<name>BriefingSplitsDownloader</name>
<message>
<location filename="../briefingsplitsdownloader.cpp" line="29"/>
<location filename="../plugins/briefing/briefingsplitsdownloader.cpp" line="29"/>
<source>Briefing Stock Splits</source>
<extracomment>It&apos;s ok not to translate &quot;Briefing Stock Splits&quot; (e.g. you can just copy-paste &quot;Briefing Stock Splits&quot; to your translation). See http://www.briefing.com/investor/calendars/stock-splits</extracomment>
<translation>Briefing Stock Splits</translation>
Expand All @@ -13,7 +13,7 @@
<context>
<name>BriefingSplitsPlugin</name>
<message>
<location filename="../briefingsplitsplugin.cpp" line="40"/>
<location filename="../plugins/briefing/briefingsplitsplugin.cpp" line="40"/>
<source>Add from Briefing Stock Splits</source>
<extracomment>This is the label on a menu item that user clicks to issue the command. It&apos;s ok not to translate &quot;Briefing Stock Splits&quot; (e.g. you can just copy-paste &quot;Briefing Stock Splits&quot; to your translation). See http://www.briefing.com/investor/calendars/stock-splits</extracomment>
<translation>Dodaj z Briefing Stock Splits</translation>
Expand Down
4 changes: 2 additions & 2 deletions ts/addtickersfrom_briefing_splits_pt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<context>
<name>BriefingSplitsDownloader</name>
<message>
<location filename="../briefingsplitsdownloader.cpp" line="29"/>
<location filename="../plugins/briefing/briefingsplitsdownloader.cpp" line="29"/>
<source>Briefing Stock Splits</source>
<extracomment>It&apos;s ok not to translate &quot;Briefing Stock Splits&quot; (e.g. you can just copy-paste &quot;Briefing Stock Splits&quot; to your translation). See http://www.briefing.com/investor/calendars/stock-splits</extracomment>
<translation>Briefing Stock Splits</translation>
Expand All @@ -13,7 +13,7 @@
<context>
<name>BriefingSplitsPlugin</name>
<message>
<location filename="../briefingsplitsplugin.cpp" line="40"/>
<location filename="../plugins/briefing/briefingsplitsplugin.cpp" line="40"/>
<source>Add from Briefing Stock Splits</source>
<extracomment>This is the label on a menu item that user clicks to issue the command. It&apos;s ok not to translate &quot;Briefing Stock Splits&quot; (e.g. you can just copy-paste &quot;Briefing Stock Splits&quot; to your translation). See http://www.briefing.com/investor/calendars/stock-splits</extracomment>
<translation>Adicionar a partir de Briefing Stock Splits</translation>
Expand Down
4 changes: 2 additions & 2 deletions ts/addtickersfrom_briefing_splits_ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<context>
<name>BriefingSplitsDownloader</name>
<message>
<location filename="../briefingsplitsdownloader.cpp" line="29"/>
<location filename="../plugins/briefing/briefingsplitsdownloader.cpp" line="29"/>
<source>Briefing Stock Splits</source>
<extracomment>It&apos;s ok not to translate &quot;Briefing Stock Splits&quot; (e.g. you can just copy-paste &quot;Briefing Stock Splits&quot; to your translation). See http://www.briefing.com/investor/calendars/stock-splits</extracomment>
<translation>Briefing Stock Splits</translation>
Expand All @@ -13,7 +13,7 @@
<context>
<name>BriefingSplitsPlugin</name>
<message>
<location filename="../briefingsplitsplugin.cpp" line="40"/>
<location filename="../plugins/briefing/briefingsplitsplugin.cpp" line="40"/>
<source>Add from Briefing Stock Splits</source>
<extracomment>This is the label on a menu item that user clicks to issue the command. It&apos;s ok not to translate &quot;Briefing Stock Splits&quot; (e.g. you can just copy-paste &quot;Briefing Stock Splits&quot; to your translation). See http://www.briefing.com/investor/calendars/stock-splits</extracomment>
<translation>Добавить из Briefing Stock Splits</translation>
Expand Down
4 changes: 2 additions & 2 deletions ts/addtickersfrom_briefing_splits_tr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<context>
<name>BriefingSplitsDownloader</name>
<message>
<location filename="../briefingsplitsdownloader.cpp" line="29"/>
<location filename="../plugins/briefing/briefingsplitsdownloader.cpp" line="29"/>
<source>Briefing Stock Splits</source>
<extracomment>It&apos;s ok not to translate &quot;Briefing Stock Splits&quot; (e.g. you can just copy-paste &quot;Briefing Stock Splits&quot; to your translation). See http://www.briefing.com/investor/calendars/stock-splits</extracomment>
<translation>Briefing Stock Splits</translation>
Expand All @@ -13,7 +13,7 @@
<context>
<name>BriefingSplitsPlugin</name>
<message>
<location filename="../briefingsplitsplugin.cpp" line="40"/>
<location filename="../plugins/briefing/briefingsplitsplugin.cpp" line="40"/>
<source>Add from Briefing Stock Splits</source>
<extracomment>This is the label on a menu item that user clicks to issue the command. It&apos;s ok not to translate &quot;Briefing Stock Splits&quot; (e.g. you can just copy-paste &quot;Briefing Stock Splits&quot; to your translation). See http://www.briefing.com/investor/calendars/stock-splits</extracomment>
<translation>Briefing Stock Splits&apos;den Ekle</translation>
Expand Down
Loading

0 comments on commit 6c3c1ca

Please sign in to comment.