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
RESOURCES += \
icon.qrc
icon.qrc \
translations.qrc
QMAKE_CFLAGS_DEBUG += -g

View File

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>531</width>
<width>590</width>
<height>231</height>
</rect>
</property>
@ -24,7 +24,7 @@
<item>
<widget class="QTextBrowser" name="textBrowser">
<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;
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;

View File

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

View File

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

View File

@ -14,7 +14,7 @@
<enum>Qt::StrongFocus</enum>
</property>
<property name="windowTitle">
<string>Dialog</string>
<string notr="true">Dialog</string>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
@ -110,7 +110,7 @@
<item row="2" column="0" colspan="2">
<widget class="QLabel" name="label_2">
<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 name="text">
<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">
<widget class="QDoubleSpinBox" name="radSpinner">
<property name="suffix">
<string>px</string>
<string notr="true">px</string>
</property>
<property name="maximum">
<double>30.000000000000000</double>
@ -322,20 +322,20 @@
<item row="1" column="0">
<widget class="QDoubleSpinBox" name="arroww">
<property name="prefix">
<string>w: </string>
<string notr="true">w: </string>
</property>
<property name="suffix">
<string>px</string>
<string notr="true">px</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="arrowh">
<property name="prefix">
<string>h: </string>
<string notr="true">h: </string>
</property>
<property name="suffix">
<string>px</string>
<string notr="true">px</string>
</property>
</widget>
</item>

View File

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

View File

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

View File

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

View File

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

View File

@ -40,7 +40,7 @@
<string>A delay before taking a screenshot, in seconds</string>
</property>
<property name="suffix">
<string>s</string>
<string notr="true">s</string>
</property>
</widget>
</item>
@ -84,7 +84,7 @@
<string>%(date format)date and %ext are supported</string>
</property>
<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>
</widget>
</item>
@ -166,7 +166,7 @@
<string/>
</property>
<property name="prefix">
<string>x: </string>
<string notr="true">x: </string>
</property>
<property name="minimum">
<number>-999999</number>
@ -179,7 +179,7 @@
<item row="2" column="1">
<widget class="QSpinBox" name="cropY">
<property name="prefix">
<string>y: </string>
<string notr="true">y: </string>
</property>
<property name="minimum">
<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);
} else
QApplication::clipboard()->setImage(QImage::fromData(imgData, format.toLocal8Bit().constData()));
notifications::notify(tr("KShare"), tr("Copied to clipboard!"));
notifications::notify("KShare", tr("Copied to clipboard!"));
}