This commit is contained in:
ArsenArsen 2017-07-29 23:58:09 +02:00
parent f77519da0b
commit 72954a795a
No known key found for this signature in database
GPG Key ID: C631EC9C50708CF4
12 changed files with 58 additions and 52 deletions

View File

@ -173,7 +173,8 @@ DISTFILES += \
install.sh install.sh
RESOURCES += \ RESOURCES += \
icon.qrc icon.qrc \
translations.qrc
QMAKE_CFLAGS_DEBUG += -g QMAKE_CFLAGS_DEBUG += -g

View File

@ -6,7 +6,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>531</width> <width>590</width>
<height>231</height> <height>231</height>
</rect> </rect>
</property> </property>
@ -24,7 +24,7 @@
<item> <item>
<widget class="QTextBrowser" name="textBrowser"> <widget class="QTextBrowser" name="textBrowser">
<property name="html"> <property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Noto Sans'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Noto Sans'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;

View File

@ -11,7 +11,7 @@
#include <screenshotutil.hpp> #include <screenshotutil.hpp>
class ColorPickerScene : public QGraphicsScene, public QGraphicsView { class ColorPickerScene : public QGraphicsScene, public QGraphicsView {
Q_OBJECT Q_DECLARE_TR_FUNCTIONS(ColorPickerScene)
public: public:
ColorPickerScene(QPixmap pixmap, QWidget *parentWidget); ColorPickerScene(QPixmap pixmap, QWidget *parentWidget);
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override; void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;

View File

@ -84,19 +84,20 @@ private:
QList<QGraphicsRectItem *> gridRectsX; QList<QGraphicsRectItem *> gridRectsX;
QList<QGraphicsRectItem *> gridRectsY; QList<QGraphicsRectItem *> gridRectsY;
QGraphicsPolygonItem *cursorItem = nullptr; QGraphicsPolygonItem *cursorItem = nullptr;
QGraphicsPixmapItem *hint = new QGraphicsPixmapItem(screenshotutil::renderText( // QGraphicsPixmapItem *hint
"Press F1 to toggle this hint\n" = new QGraphicsPixmapItem(screenshotutil::renderText(tr( //
"\tHold Shift to slow the cursor down\n" "Press F1 to toggle this hint\n"
"\tCtrl+Drag a thing to move it around\n" "\tHold Shift to slow the cursor down\n"
"\tAlt+Click a drawing to remove it\n" "\tCtrl+Drag a thing to move it around\n"
"\tPress Return/Enter to finish\n" "\tAlt+Click a drawing to remove it\n"
"\tPress ESC to cancel\n" "\tPress Return/Enter to finish\n"
"\tUse the menu bar to draw\n" "\tPress ESC to cancel\n"
"\tNOTE: You must select 'Reset pen selection' before closing the editor\n" "\tUse the menu bar to draw\n"
"\tIf you do not it will not close.", "\tNOTE: You must select 'Crop' before closing the editor\n"
5, "\tIf you do not it will not close."),
QColor(0, 0, 0, 125), 5,
Qt::white)); QColor(0, 0, 0, 125),
Qt::white));
}; };
#endif // CROPSCENE_HPP #endif // CROPSCENE_HPP

View File

@ -14,7 +14,7 @@
<enum>Qt::StrongFocus</enum> <enum>Qt::StrongFocus</enum>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Dialog</string> <string notr="true">Dialog</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_4"> <layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0"> <item row="0" column="0">
@ -110,7 +110,7 @@
<item row="2" column="0" colspan="2"> <item row="2" column="0" colspan="2">
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="label_2">
<property name="whatsThis"> <property name="whatsThis">
<string>http://doc.qt.io/qt-5/qgraphicsblureffect.html#BlurHint-enum</string> <string notr="true">http://doc.qt.io/qt-5/qgraphicsblureffect.html#BlurHint-enum</string>
</property> </property>
<property name="text"> <property name="text">
<string>&lt;a href=&quot;http://doc.qt.io/qt-5/qgraphicsblureffect.html#BlurHint-enum&quot;&gt;Blur Hints</string> <string>&lt;a href=&quot;http://doc.qt.io/qt-5/qgraphicsblureffect.html#BlurHint-enum&quot;&gt;Blur Hints</string>
@ -126,7 +126,7 @@
<item row="1" column="2"> <item row="1" column="2">
<widget class="QDoubleSpinBox" name="radSpinner"> <widget class="QDoubleSpinBox" name="radSpinner">
<property name="suffix"> <property name="suffix">
<string>px</string> <string notr="true">px</string>
</property> </property>
<property name="maximum"> <property name="maximum">
<double>30.000000000000000</double> <double>30.000000000000000</double>
@ -322,20 +322,20 @@
<item row="1" column="0"> <item row="1" column="0">
<widget class="QDoubleSpinBox" name="arroww"> <widget class="QDoubleSpinBox" name="arroww">
<property name="prefix"> <property name="prefix">
<string>w: </string> <string notr="true">w: </string>
</property> </property>
<property name="suffix"> <property name="suffix">
<string>px</string> <string notr="true">px</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QDoubleSpinBox" name="arrowh"> <widget class="QDoubleSpinBox" name="arrowh">
<property name="prefix"> <property name="prefix">
<string>h: </string> <string notr="true">h: </string>
</property> </property>
<property name="suffix"> <property name="suffix">
<string>px</string> <string notr="true">px</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Dialog</string> <string notr="true">Dialog</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <item row="0" column="0">

View File

@ -61,7 +61,7 @@ void handler(QtMsgType type, const QMessageLogContext &, const QString &msg) {
} }
void loadTranslation(QString locale) { void loadTranslation(QString locale) {
QFile resource(":/langs/kshare_" + locale + ".qm"); QFile resource(":/translations/" + locale + ".qm");
if (!resource.exists()) return; if (!resource.exists()) return;
resource.open(QIODevice::ReadOnly); resource.open(QIODevice::ReadOnly);

View File

@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>KShare</string> <string notr="true">KShare</string>
</property> </property>
<property name="windowIcon"> <property name="windowIcon">
<iconset resource="icon.qrc"> <iconset resource="icon.qrc">
@ -97,7 +97,7 @@
<string>&amp;Quit</string> <string>&amp;Quit</string>
</property> </property>
<property name="shortcut"> <property name="shortcut">
<string>Ctrl+Q</string> <string notr="true">Ctrl+Q</string>
</property> </property>
</action> </action>
<action name="actionFullscreen"> <action name="actionFullscreen">

View File

@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Dialog</string> <string notr="true">Dialog</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
<item> <item>
@ -62,14 +62,14 @@
<item row="4" column="0"> <item row="4" column="0">
<widget class="QTabWidget" name="videoTabs"> <widget class="QTabWidget" name="videoTabs">
<property name="currentIndex"> <property name="currentIndex">
<number>2</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="hTab"> <widget class="QWidget" name="hTab">
<property name="layoutDirection"> <property name="layoutDirection">
<enum>Qt::LeftToRight</enum> <enum>Qt::LeftToRight</enum>
</property> </property>
<attribute name="title"> <attribute name="title">
<string>h264/h265</string> <string notr="true">h264/h265</string>
</attribute> </attribute>
<layout class="QFormLayout" name="verticalLayout"> <layout class="QFormLayout" name="verticalLayout">
<item row="0" column="0"> <item row="0" column="0">
@ -82,59 +82,59 @@
<item row="0" column="1"> <item row="0" column="1">
<widget class="QComboBox" name="profileBox"> <widget class="QComboBox" name="profileBox">
<property name="currentText"> <property name="currentText">
<string notr="true">medium</string> <string notr="true">ultrafast</string>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>5</number> <number>0</number>
</property> </property>
<item> <item>
<property name="text"> <property name="text">
<string>ultrafast</string> <string notr="true">ultrafast</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text">
<string>superfast</string> <string notr="true">superfast</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text">
<string>veryfast</string> <string notr="true">veryfast</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text">
<string>faster</string> <string notr="true">faster</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text">
<string>fast</string> <string notr="true">fast</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text">
<string>medium</string> <string notr="true">medium</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text">
<string>slow</string> <string notr="true">slow</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text">
<string>slower</string> <string notr="true">slower</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text">
<string>veryslow</string> <string notr="true">veryslow</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text">
<string>placebo</string> <string notr="true">placebo</string>
</property> </property>
</item> </item>
</widget> </widget>
@ -160,7 +160,7 @@
</widget> </widget>
<widget class="QWidget" name="vpTab"> <widget class="QWidget" name="vpTab">
<attribute name="title"> <attribute name="title">
<string>VP9</string> <string notr="true">VP9</string>
</attribute> </attribute>
<layout class="QFormLayout" name="verticalLayout1"> <layout class="QFormLayout" name="verticalLayout1">
<item row="0" column="1"> <item row="0" column="1">
@ -174,7 +174,7 @@
</widget> </widget>
<widget class="QWidget" name="gifTab"> <widget class="QWidget" name="gifTab">
<attribute name="title"> <attribute name="title">
<string>GIF</string> <string notr="true">GIF</string>
</attribute> </attribute>
<layout class="QFormLayout" name="verticalLayout2"> <layout class="QFormLayout" name="verticalLayout2">
<item row="0" column="0"> <item row="0" column="0">
@ -198,7 +198,7 @@
<item row="1" column="0"> <item row="1" column="0">
<widget class="QDoubleSpinBox" name="bitrate"> <widget class="QDoubleSpinBox" name="bitrate">
<property name="suffix"> <property name="suffix">
<string>kbps</string> <string notr="true">kbps</string>
</property> </property>
<property name="maximum"> <property name="maximum">
<double>999999.000000000000000</double> <double>999999.000000000000000</double>

View File

@ -40,7 +40,7 @@
<string>A delay before taking a screenshot, in seconds</string> <string>A delay before taking a screenshot, in seconds</string>
</property> </property>
<property name="suffix"> <property name="suffix">
<string>s</string> <string notr="true">s</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -84,7 +84,7 @@
<string>%(date format)date and %ext are supported</string> <string>%(date format)date and %ext are supported</string>
</property> </property>
<property name="text"> <property name="text">
<string>Screenshot %(yyyy-MM-dd HH-mm-ss)date.%ext</string> <string notr="true">Screenshot %(yyyy-MM-dd HH-mm-ss)date.%ext</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -166,7 +166,7 @@
<string/> <string/>
</property> </property>
<property name="prefix"> <property name="prefix">
<string>x: </string> <string notr="true">x: </string>
</property> </property>
<property name="minimum"> <property name="minimum">
<number>-999999</number> <number>-999999</number>
@ -179,7 +179,7 @@
<item row="2" column="1"> <item row="2" column="1">
<widget class="QSpinBox" name="cropY"> <widget class="QSpinBox" name="cropY">
<property name="prefix"> <property name="prefix">
<string>y: </string> <string notr="true">y: </string>
</property> </property>
<property name="minimum"> <property name="minimum">
<number>-999999</number> <number>-999999</number>

View File

@ -1 +1,5 @@
<RCC/> <RCC>
<qresource prefix="/">
<file>translations/sr_RS.qm</file>
</qresource>
</RCC>

View File

@ -14,5 +14,5 @@ void ClipboardUploader::doUpload(QByteArray imgData, QString format) {
QApplication::clipboard()->setMimeData(data); QApplication::clipboard()->setMimeData(data);
} else } else
QApplication::clipboard()->setImage(QImage::fromData(imgData, format.toLocal8Bit().constData())); QApplication::clipboard()->setImage(QImage::fromData(imgData, format.toLocal8Bit().constData()));
notifications::notify(tr("KShare"), tr("Copied to clipboard!")); notifications::notify("KShare", tr("Copied to clipboard!"));
} }