ImageViewer: Convert to Tr::tr

Change-Id: Id12dc265ed60be942ec68ac5a80f57144c2d086f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2022-07-08 18:51:09 +02:00
parent 4a9b74c670
commit 3de1fffbeb
29 changed files with 220 additions and 569 deletions

View File

@@ -18896,10 +18896,6 @@ Toho se dosáhne vložením této zkratky v zadávacím poli vyhledávače, nás
<source>GLSL Editor</source>
<translation>Editor GLSL</translation>
</message>
<message>
<source>Image Viewer</source>
<translation>Prohlížeč obrázků</translation>
</message>
<message>
<source>Python Editor</source>
<translation>Editor Pythonu</translation>
@@ -30963,7 +30959,11 @@ Při GDB může být zadána posloupnost příkazů oddělená oddělovačem &ap
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerToolbar</name>
<name>ImageViewer</name>
<message>
<source>Image Viewer</source>
<translation>Prohlížeč obrázků</translation>
</message>
<message>
<source>Show background</source>
<translation type="obsolete">Ukázat pozadí</translation>
@@ -30976,18 +30976,6 @@ Při GDB může být zadána posloupnost příkazů oddělená oddělovačem &ap
<source>Fit image in the screen</source>
<translation type="obsolete">Přizpůsobit obrázek velikosti obrazovky</translation>
</message>
<message>
<source>Original size</source>
<translation type="obsolete">Původní velikost</translation>
</message>
<message>
<source>Zoom In</source>
<translation>Přiblížit</translation>
</message>
<message>
<source>Zoom Out</source>
<translation>Oddálit</translation>
</message>
<message>
<source>Show Background</source>
<translation>Ukázat pozadí</translation>
@@ -31000,10 +30988,6 @@ Při GDB může být zadána posloupnost příkazů oddělená oddělovačem &ap
<source>Fit to Screen</source>
<translation>Přizpůsobit obrazovce</translation>
</message>
<message>
<source>Original Size</source>
<translation>Původní velikost</translation>
</message>
</context>
<context>
<name>Macros::Internal::MacroOptionsWidget</name>
@@ -36694,7 +36678,7 @@ když bude zavolán mimo git bash.</translation>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewer</name>
<name>ImageViewer</name>
<message>
<source>Cannot open image file %1</source>
<translation type="obsolete">Nelze otevřít soubor s obrázkem %1</translation>
@@ -36713,7 +36697,7 @@ když bude zavolán mimo git bash.</translation>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerActionHandler</name>
<name>ImageViewer</name>
<message>
<source>Zoom In</source>
<translation>Přiblížit</translation>

View File

@@ -19944,6 +19944,10 @@ Tilføj, ændr, og fjern dokumentfiltre, som beslutter hvilke dokumentationssæt
</context>
<context>
<name>ImageViewer</name>
<message>
<source>Image Viewer</source>
<translation>Billedfremviser</translation>
</message>
<message>
<source>Color at %1,%2: red: %3 green: %4 blue: %5 alpha: %6</source>
<translation>Farve ved %1,%2: rød: %3 grøn: %4 blå: %5 alfa: %6</translation>
@@ -19966,7 +19970,7 @@ Tilføj, ændr, og fjern dokumentfiltre, som beslutter hvilke dokumentationssæt
</message>
</context>
<context>
<name>ImageViewer::Internal::ExportDialog</name>
<name>ImageViewer</name>
<message>
<source>File:</source>
<translation>Fil:</translation>
@@ -19988,7 +19992,7 @@ Vil du overskrive den?</translation>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageView</name>
<name>ImageViewer</name>
<message>
<source>Export %1</source>
<translation>Eksportér %1</translation>
@@ -20011,7 +20015,7 @@ Vil du overskrive den?</translation>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewer</name>
<name>ImageViewer</name>
<message>
<source>Pause Animation</source>
<translation>Pause animation</translation>
@@ -20022,7 +20026,7 @@ Vil du overskrive den?</translation>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerFile</name>
<name>ImageViewer</name>
<message>
<source>Image format not supported.</source>
<translation>Billedformat understøttes ikke.</translation>
@@ -20037,7 +20041,7 @@ Vil du overskrive den?</translation>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerPlugin</name>
<name>ImageViewer</name>
<message>
<source>Fit to Screen</source>
<translation>Tilpas til skærm</translation>
@@ -20066,17 +20070,10 @@ Vil du overskrive den?</translation>
<source>Toggle Animation</source>
<translation>Animation til/fra</translation>
</message>
<message>
<source>Export Image</source>
<translation>Eksportér billede</translation>
</message>
<message>
<source>Export Multiple Images</source>
<translation>Eksportér flere billeder</translation>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerToolbar</name>
<message>
<source>Export as Image</source>
<translation>Eksportér som billede</translation>
@@ -20089,10 +20086,6 @@ Vil du overskrive den?</translation>
<source>Show Outline</source>
<translation>Vis omrids</translation>
</message>
<message>
<source>Fit to Screen</source>
<translation>Tilpas til skærm</translation>
</message>
<message>
<source>Original Size</source>
<translation>Original størrelse</translation>
@@ -22377,10 +22370,6 @@ Fejl: %5</translation>
<source>GLSL Editor</source>
<translation>GLSL-redigering</translation>
</message>
<message>
<source>Image Viewer</source>
<translation>Billedfremviser</translation>
</message>
<message>
<source>Model Editor</source>
<translation>Model-redigering</translation>
@@ -44951,15 +44940,11 @@ Kopiér stien til kildefilerne til udklipsholderen?</translation>
</message>
</context>
<context>
<name>ImageViewer::Internal::MultiExportDialog</name>
<name>ImageViewer</name>
<message>
<source>Enter a file name containing place holders %1 which will be replaced by the width and height of the image, respectively.</source>
<translation>Indtast et filnavn som indeholder pladsholderne %1 som erstattes af henholdsvis bredden og højden billedet.</translation>
</message>
<message>
<source>File:</source>
<translation>Fil:</translation>
</message>
<message>
<source>Clear</source>
<translation>Ryd</translation>

View File

@@ -5239,10 +5239,6 @@ Add, modify, and remove document filters, which determine the documentation set
<source>Resource Editor</source>
<translation>Ressourceneditor</translation>
</message>
<message>
<source>Image Viewer</source>
<translation>Bildbetrachter</translation>
</message>
<message>
<source>GLSL Editor</source>
<translation>GLSL Editor</translation>
@@ -11371,7 +11367,11 @@ IDs müssen außerdem mit einem Kleinbuchstaben beginnen.</translation>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerToolbar</name>
<name>ImageViewer</name>
<message>
<source>Image Viewer</source>
<translation>Bildbetrachter</translation>
</message>
<message>
<source>Zoom In</source>
<translation>Vergrößern</translation>
@@ -15270,7 +15270,7 @@ Bei vollständiger Cache-Simulation werden weitere Ereigniszähler aktiviert:
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewer</name>
<name>ImageViewer</name>
<message>
<source>Play Animation</source>
<translation>Animation abspielen</translation>
@@ -33034,7 +33034,7 @@ Das Setzen von Haltepunkten anhand von Dateinamen und Zeilennummern könnte fehl
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerFile</name>
<name>ImageViewer</name>
<message>
<source>Image format not supported.</source>
<translation>Bildformat nicht unterstützt.</translation>
@@ -36042,11 +36042,7 @@ Sie werden erhalten.</numerusform>
</message>
</context>
<context>
<name>ImageViewer::Internal::ExportDialog</name>
<message>
<source>File:</source>
<translation>Datei:</translation>
</message>
<name>ImageViewer</name>
<message>
<source>x</source>
<extracomment>Multiplication, as in 32x32</extracomment>
@@ -36064,7 +36060,7 @@ Möchten Sie sie überschreiben?</translation>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageView</name>
<name>ImageViewer</name>
<message>
<source>Export %1</source>
<translation>%1 exportieren</translation>
@@ -42231,7 +42227,7 @@ Möchten Sie den Pfad zu den Quelldateien in die Zwischenablage kopieren?</trans
</message>
</context>
<context>
<name>ImageViewer::Internal::MultiExportDialog</name>
<name>ImageViewer</name>
<message>
<source>Enter a file name containing place holders %1 which will be replaced by the width and height of the image, respectively.</source>
<translation>Geben Sie einen Dateinamen ein, der die Platzhalter %1 enthält, die durch Breite und Höhe des Bilds ersetzt werden.</translation>

View File

@@ -19717,10 +19717,6 @@ p, li { white-space: pre-wrap; }
<source>Resource Editor</source>
<translation>Éditeur de ressources</translation>
</message>
<message>
<source>Image Viewer</source>
<translation>Visualisateur d&apos;image</translation>
</message>
<message>
<source>GLSL Editor</source>
<translation>Éditeur GLSL</translation>
@@ -30379,7 +30375,11 @@ Preselects Qt for Simulator and mobile targets if available</source>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerToolbar</name>
<name>ImageViewer</name>
<message>
<source>Image Viewer</source>
<translation>Visualisateur d&apos;image</translation>
</message>
<message>
<source>Show background</source>
<translation type="obsolete">Afficher l&apos;arrière plan</translation>
@@ -30392,10 +30392,6 @@ Preselects Qt for Simulator and mobile targets if available</source>
<source>Fit image in the screen</source>
<translation type="obsolete">Ajuster l&apos;image à la taille de l&apos;écran</translation>
</message>
<message>
<source>Original size</source>
<translation type="obsolete">Taille réelle</translation>
</message>
<message>
<source>Zoom In</source>
<translation>Zoom avant</translation>
@@ -32027,27 +32023,15 @@ plutôt que dans le répertoire d&apos;installation lors d&apos;une exècution e
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerActionHandler</name>
<message>
<source>Zoom In</source>
<translation>Zoom avant</translation>
</message>
<name>ImageViewer</name>
<message>
<source>Ctrl++</source>
<translation>Ctrl++</translation>
</message>
<message>
<source>Zoom Out</source>
<translation>Zoom arrière</translation>
</message>
<message>
<source>Ctrl+-</source>
<translation>Ctrl+-</translation>
</message>
<message>
<source>Original Size</source>
<translation>Taille réelle</translation>
</message>
<message>
<source>Ctrl+0</source>
<translation>Ctrl+0</translation>
@@ -43243,7 +43227,7 @@ These files are preserved.</source>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewer</name>
<name>ImageViewer</name>
<message>
<source>Cannot open image file %1</source>
<translation type="obsolete">Impossible d&apos;ouvrir le fichier d&apos;image %1</translation>

View File

@@ -4750,7 +4750,11 @@ Dodaj, izmijeni i ukloni filtre dokumenata koji određuju skup dokumentacije pri
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerToolbar</name>
<name>ImageViewer</name>
<message>
<source>Image Viewer</source>
<translation>Prikazivač slika</translation>
</message>
<message>
<source>Export as Image</source>
<translation>Izvezi kao sliku</translation>
@@ -16920,10 +16924,6 @@ Check the test environment.</source>
<source>GLSL Editor</source>
<translation>GLSL uređivač</translation>
</message>
<message>
<source>Image Viewer</source>
<translation>Prikazivač slika</translation>
</message>
<message>
<source>Model Editor</source>
<translation>Model uređivač</translation>
@@ -27278,7 +27278,7 @@ instead of its installation directory when run outside git bash.</source>
</message>
</context>
<context>
<name>ImageViewer::Internal::ExportDialog</name>
<name>ImageViewer</name>
<message>
<source>File:</source>
<translation>Datoteka:</translation>
@@ -27300,7 +27300,7 @@ Would you like to overwrite it?</source>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageView</name>
<name>ImageViewer</name>
<message>
<source>Exported &quot;%1&quot;, %2x%3, %4 bytes</source>
<translation>Izvezeno &quot;%1&quot;, %2x%3, %4 bajta</translation>
@@ -27309,10 +27309,6 @@ Would you like to overwrite it?</source>
<source>Could not write file &quot;%1&quot;.</source>
<translation>Nije bilo moguće pisati datoteku &quot;%1&quot;.</translation>
</message>
<message>
<source>Export Image</source>
<translation>Izvezi sliku</translation>
</message>
<message>
<source>Export %1</source>
<translation>Izvezi %1</translation>
@@ -27321,9 +27317,6 @@ Would you like to overwrite it?</source>
<source>Export a Series of Images from %1 (%2x%3)</source>
<translation>Izvezi seriju slika od %1 (%2x%3)</translation>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewer</name>
<message>
<source>Pause Animation</source>
<translation>Zaustavi animaciju</translation>
@@ -27334,7 +27327,7 @@ Would you like to overwrite it?</source>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerFile</name>
<name>ImageViewer</name>
<message>
<source>Image format not supported.</source>
<translation>Slikovni format nije podržan.</translation>
@@ -27347,13 +27340,6 @@ Would you like to overwrite it?</source>
<source>Failed to read image.</source>
<translation>Neuspjelo čitanje slike.</translation>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerPlugin</name>
<message>
<source>Fit to Screen</source>
<translation>Prilagodi veličini ekrana</translation>
</message>
<message>
<source>Ctrl+=</source>
<translation>Ctrl+=</translation>
@@ -27386,17 +27372,10 @@ Would you like to overwrite it?</source>
<source>Export Multiple Images</source>
<translation>Izvezi višestruke slike</translation>
</message>
</context>
<context>
<name>ImageViewer::Internal::MultiExportDialog</name>
<message>
<source>Enter a file name containing place holders %1 which will be replaced by the width and height of the image, respectively.</source>
<translation>Upiši naziv datoteke koji sadrži rezervirana mjesta %1, koja će biti zamijenjena širinom, odnosno visinom slike.</translation>
</message>
<message>
<source>File:</source>
<translation>Datoteka:</translation>
</message>
<message>
<source>Clear</source>
<translation>Ukloni</translation>

View File

@@ -3845,7 +3845,11 @@ Add, modify, and remove document filters, which determine the documentation set
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerToolbar</name>
<name>ImageViewer</name>
<message>
<source>Image Viewer</source>
<translation></translation>
</message>
<message>
<source>Show Background</source>
<translation></translation>
@@ -13120,10 +13124,6 @@ in the system&apos;s browser for manual download.</source>
<source>GLSL Editor</source>
<translation>GLSL </translation>
</message>
<message>
<source>Image Viewer</source>
<translation></translation>
</message>
<message>
<source>Python Editor</source>
<translation>Python </translation>
@@ -22571,7 +22571,7 @@ instead of its installation directory when run outside git bash.</source>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewer</name>
<name>ImageViewer</name>
<message>
<source>Play Animation</source>
<translation></translation>
@@ -43856,11 +43856,7 @@ Leave empty to search through the file system.</source>
</message>
</context>
<context>
<name>ImageViewer::Internal::ExportDialog</name>
<message>
<source>File:</source>
<translation>:</translation>
</message>
<name>ImageViewer</name>
<message>
<source>x</source>
<extracomment>Multiplication, as in 32x32</extracomment>
@@ -43878,7 +43874,7 @@ Would you like to overwrite it?</source>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageView</name>
<name>ImageViewer</name>
<message>
<source>Export %1</source>
<translation>%1 </translation>
@@ -43895,9 +43891,6 @@ Would you like to overwrite it?</source>
<source>Could not write file &quot;%1&quot;.</source>
<translation> &quot;%1&quot; </translation>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerFile</name>
<message>
<source>Image format not supported.</source>
<translation></translation>
@@ -43910,29 +43903,14 @@ Would you like to overwrite it?</source>
<source>Failed to read image.</source>
<translation></translation>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerPlugin</name>
<message>
<source>Zoom In</source>
<translation></translation>
</message>
<message>
<source>Ctrl++</source>
<translation>Ctrl++</translation>
</message>
<message>
<source>Zoom Out</source>
<translation></translation>
</message>
<message>
<source>Ctrl+-</source>
<translation>Ctrl+-</translation>
</message>
<message>
<source>Original Size</source>
<translation></translation>
</message>
<message>
<source>Meta+0</source>
<translation>Meta+0</translation>
@@ -43941,10 +43919,6 @@ Would you like to overwrite it?</source>
<source>Ctrl+0</source>
<translation>Ctrl+0</translation>
</message>
<message>
<source>Fit to Screen</source>
<translation></translation>
</message>
<message>
<source>Ctrl+=</source>
<translation>Ctrl+=</translation>
@@ -43969,10 +43943,6 @@ Would you like to overwrite it?</source>
<source>Toggle Animation</source>
<translation></translation>
</message>
<message>
<source>Export Image</source>
<translation></translation>
</message>
</context>
<context>
<name>Macros::Internal::MacroLocatorFilter</name>
@@ -53268,11 +53238,7 @@ Stepping into the module or setting breakpoints by file and line is expected to
</message>
</context>
<context>
<name>Imageviewer::Internal::ImageViewerPlugin</name>
<message>
<source>Fit to Screen</source>
<translation></translation>
</message>
<name>Imageviewer</name>
<message>
<source>Ctrl+=</source>
<translation>Ctrl+=</translation>
@@ -53303,7 +53269,7 @@ Stepping into the module or setting breakpoints by file and line is expected to
</message>
</context>
<context>
<name>ImageViewer::Internal::MultiExportDialog</name>
<name>ImageViewer</name>
<message>
<source>File:</source>
<translation>:</translation>

View File

@@ -2191,10 +2191,6 @@ Przyczyna: %3</translation>
<source>Resource Editor</source>
<translation>Edytor zasobów</translation>
</message>
<message>
<source>Image Viewer</source>
<translation>Przeglądarka plików graficznych</translation>
</message>
<message>
<source>GLSL Editor</source>
<translation>Edytor GLSL</translation>
@@ -13104,7 +13100,11 @@ Identyfikatory muszą rozpoczynać się małą literą.</translation>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerToolbar</name>
<name>ImageViewer</name>
<message>
<source>Image Viewer</source>
<translation>Przeglądarka plików graficznych</translation>
</message>
<message>
<source>Zoom In</source>
<translation>Powiększ</translation>
@@ -17625,7 +17625,7 @@ With cache simulation, further event counters are enabled:
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewer</name>
<name>ImageViewer</name>
<message>
<source>Play Animation</source>
<translation>Odtwórz animację</translation>
@@ -35325,7 +35325,7 @@ Ustawianie pułapek w liniach plików może się nie udać.</translation>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerFile</name>
<name>ImageViewer</name>
<message>
<source>Image format not supported.</source>
<translation>Nieobsługiwany format pliku graficznego.</translation>
@@ -38776,7 +38776,7 @@ Może pozostać puste w celu wyszukania w systemie plików.</translation>
</message>
</context>
<context>
<name>ImageViewer::Internal::ExportDialog</name>
<name>ImageViewer</name>
<message>
<source>File:</source>
<translation>Plik:</translation>
@@ -38798,7 +38798,7 @@ Czy nadpisać go?</translation>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageView</name>
<name>ImageViewer</name>
<message>
<source>Export %1</source>
<translation>Wyeksportuj %1</translation>
@@ -38815,29 +38815,14 @@ Czy nadpisać go?</translation>
<source>Could not write file &quot;%1&quot;.</source>
<translation>Nie można zapisać pliku &quot;%1&quot;.</translation>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerPlugin</name>
<message>
<source>Zoom In</source>
<translation>Powiększ</translation>
</message>
<message>
<source>Ctrl++</source>
<translation>Ctrl++</translation>
</message>
<message>
<source>Zoom Out</source>
<translation>Pomniejsz</translation>
</message>
<message>
<source>Ctrl+-</source>
<translation>Ctrl+-</translation>
</message>
<message>
<source>Original Size</source>
<translation>Oryginalny rozmiar</translation>
</message>
<message>
<source>Meta+0</source>
<translation>Meta+0</translation>
@@ -38846,10 +38831,6 @@ Czy nadpisać go?</translation>
<source>Ctrl+0</source>
<translation>Ctrl+0</translation>
</message>
<message>
<source>Fit to Screen</source>
<translation>Dopasuj do ekranu</translation>
</message>
<message>
<source>Ctrl+=</source>
<translation>Ctrl+=</translation>
@@ -38874,10 +38855,6 @@ Czy nadpisać go?</translation>
<source>Toggle Animation</source>
<translation>Przełącz animację</translation>
</message>
<message>
<source>Export Image</source>
<translation>Wyeksportuj plik graficzny</translation>
</message>
</context>
<context>
<name>ModelEditor::Internal::ExtPropertiesMView</name>

View File

@@ -24827,6 +24827,10 @@ Add, modify, and remove document filters, which determine the documentation set
</context>
<context>
<name>ImageViewer</name>
<message>
<source>Image Viewer</source>
<translation>Просмотр изображений</translation>
</message>
<message>
<source>Color at %1,%2: red: %3 green: %4 blue: %5 alpha: %6</source>
<translation>Цвет в %1,%2: красный: %3 зелёный: %4 синий: %5 альфа: %6</translation>
@@ -24849,7 +24853,7 @@ Add, modify, and remove document filters, which determine the documentation set
</message>
</context>
<context>
<name>ImageViewer::Internal::ExportDialog</name>
<name>ImageViewer</name>
<message>
<source>File:</source>
<translation>Файл:</translation>
@@ -24871,7 +24875,7 @@ Would you like to overwrite it?</source>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageView</name>
<name>ImageViewer</name>
<message>
<source>Export %1</source>
<translation>Экспорт %1</translation>
@@ -24894,7 +24898,7 @@ Would you like to overwrite it?</source>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewer</name>
<name>ImageViewer</name>
<message>
<source>Play Animation</source>
<translation>Воспроизвести анимацию</translation>
@@ -24905,7 +24909,7 @@ Would you like to overwrite it?</source>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerFile</name>
<name>ImageViewer</name>
<message>
<source>Image format not supported.</source>
<translation>Формат изображения не поддерживается.</translation>
@@ -24918,9 +24922,6 @@ Would you like to overwrite it?</source>
<source>Failed to read image.</source>
<translation>Не удалось прочитать изображение.</translation>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerToolbar</name>
<message>
<source>Zoom In</source>
<translation>Увеличить</translation>
@@ -24953,17 +24954,10 @@ Would you like to overwrite it?</source>
<source>Export Images of Multiple Sizes</source>
<translation>Экспортировать многоразмерные изображения</translation>
</message>
</context>
<context>
<name>ImageViewer::Internal::MultiExportDialog</name>
<message>
<source>Enter a file name containing place holders %1 which will be replaced by the width and height of the image, respectively.</source>
<translation>Введите имя файла, содержащее метки %1, которые будут заменены соответственно на ширину и высоту изображения.</translation>
</message>
<message>
<source>File:</source>
<translation>Файл:</translation>
</message>
<message>
<source>Clear</source>
<translation>Очистить</translation>
@@ -28718,10 +28712,6 @@ If set to false, the target will be moved straight to the current mouse position
<source>Resource Editor</source>
<translation>Редактор ресурсов</translation>
</message>
<message>
<source>Image Viewer</source>
<translation>Просмотр изображений</translation>
</message>
<message>
<source>GLSL Editor</source>
<translation>Редактор GLSL</translation>

View File

@@ -12483,10 +12483,6 @@ Za uporabo v polje Iskalnika vtipkajte to bližnjico in presledek ter nato iskan
<source>GLSL Editor</source>
<translation>Urejevalniku GLSL</translation>
</message>
<message>
<source>Image Viewer</source>
<translation>Pregledovalniku slik</translation>
</message>
<message>
<source>.qmlproject Editor</source>
<translation type="obsolete">Urejevalniku datotek *.qmlproject</translation>
@@ -20048,7 +20044,11 @@ GDB omogoča navedbo zaporedja ukazov, ki so ločeni z »\n«.</translation>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerToolbar</name>
<name>ImageViewer</name>
<message>
<source>Image Viewer</source>
<translation>Pregledovalniku slik</translation>
</message>
<message>
<source>Show background</source>
<translation>Prikaži ozadje </translation>
@@ -25221,26 +25221,15 @@ ključe SSH išče na tem mestu in ne v mapi, kjer je nameščen.</translation>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewer</name>
<name>ImageViewer</name>
<message>
<source>Cannot open image file %1</source>
<translation>Slikovne datoteke %1 ni moč odpreti</translation>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerActionHandler</name>
<message>
<source>Zoom In</source>
<translation>Približaj</translation>
</message>
<message>
<source>Ctrl++</source>
<translation>Ctrl++</translation>
</message>
<message>
<source>Zoom Out</source>
<translation>Oddalji</translation>
</message>
<message>
<source>Ctrl+-</source>
<translation>Ctrl+-</translation>

View File

@@ -12255,7 +12255,11 @@ Add, modify, and remove document filters, which determine the documentation set
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewer</name>
<name>ImageViewer</name>
<message>
<source>Image Viewer</source>
<translation>Переглядач зображень</translation>
</message>
<message>
<source>Cannot open image file %1.</source>
<translation type="vanished">Неможливо відкрити файл зображення %1.</translation>
@@ -12270,74 +12274,7 @@ Add, modify, and remove document filters, which determine the documentation set
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerActionHandler</name>
<message>
<source>Zoom In</source>
<translation type="vanished">Збільшити</translation>
</message>
<message>
<source>Ctrl++</source>
<translation type="vanished">Ctrl++</translation>
</message>
<message>
<source>Zoom Out</source>
<translation type="vanished">Зменшити</translation>
</message>
<message>
<source>Ctrl+-</source>
<translation type="vanished">Ctrl+-</translation>
</message>
<message>
<source>Original Size</source>
<translation type="vanished">Початковий розмір</translation>
</message>
<message>
<source>Ctrl+0</source>
<translation type="vanished">Ctrl+0</translation>
</message>
<message>
<source>Meta+0</source>
<translation type="vanished">Meta+0</translation>
</message>
<message>
<source>Fit To Screen</source>
<translation type="vanished">Вмістити на екрані</translation>
</message>
<message>
<source>Ctrl+=</source>
<translation type="vanished">Ctrl+=</translation>
</message>
<message>
<source>Switch Background</source>
<translation type="vanished">Увімкнути/вимкнути тло</translation>
</message>
<message>
<source>Switch Outline</source>
<translation type="vanished">Увімкнути/вимкнути огляд</translation>
</message>
<message>
<source>Toggle Animation</source>
<translation type="vanished">Відтворити/призупинити анімацію</translation>
</message>
<message>
<source>Ctrl+[</source>
<translation type="vanished">Ctrl+[</translation>
</message>
<message>
<source>Ctrl+]</source>
<translation type="vanished">Ctrl+]</translation>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerToolbar</name>
<message>
<source>Zoom In</source>
<translation>Збільшити</translation>
</message>
<message>
<source>Zoom Out</source>
<translation>Зменшити</translation>
</message>
<name>ImageViewer</name>
<message>
<source>Show Background</source>
<translation>Показувати тло</translation>
@@ -12346,14 +12283,6 @@ Add, modify, and remove document filters, which determine the documentation set
<source>Show Outline</source>
<translation>Показувати огляд</translation>
</message>
<message>
<source>Fit to Screen</source>
<translation>Вмістити на екрані</translation>
</message>
<message>
<source>Original Size</source>
<translation>Початковий розмір</translation>
</message>
<message>
<source>Export as Image</source>
<translation>Експортувати як зображення</translation>
@@ -14909,10 +14838,6 @@ stderr був: %1</translation>
<source>Resource Editor</source>
<translation>Редактор ресурсів</translation>
</message>
<message>
<source>Image Viewer</source>
<translation>Переглядач зображень</translation>
</message>
<message>
<source>GLSL Editor</source>
<translation>Редактор GLSL</translation>
@@ -52625,7 +52550,7 @@ Setting breakpoints by file name and line number may fail.</source>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerFile</name>
<name>ImageViewer</name>
<message>
<source>Image format not supported.</source>
<translation>Формат зображення не підтримується.</translation>
@@ -55752,7 +55677,7 @@ Leave empty to search through the file system.</source>
</message>
</context>
<context>
<name>ImageViewer::Internal::ExportDialog</name>
<name>ImageViewer</name>
<message>
<source>File:</source>
<translation>Файл:</translation>
@@ -55774,7 +55699,7 @@ Would you like to overwrite it?</source>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageView</name>
<name>ImageViewer</name>
<message>
<source>Export %1</source>
<translation>Експортувати %1</translation>
@@ -55793,7 +55718,7 @@ Would you like to overwrite it?</source>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerPlugin</name>
<name>ImageViewer</name>
<message>
<source>Zoom In</source>
<translation>Збільшити</translation>
@@ -55850,10 +55775,6 @@ Would you like to overwrite it?</source>
<source>Toggle Animation</source>
<translation>Відтворити/призупинити анімацію</translation>
</message>
<message>
<source>Export Image</source>
<translation>Експортувати зображення</translation>
</message>
</context>
<context>
<name>ModelEditor::Internal::ExtPropertiesMView</name>

View File

@@ -18095,10 +18095,6 @@ Will not be applied to whitespace in comments and strings.</source>
<source>Resource Editor</source>
<translation></translation>
</message>
<message>
<source>Image Viewer</source>
<translation></translation>
</message>
<message>
<source>GLSL Editor</source>
<translation>GLSL </translation>
@@ -28228,7 +28224,11 @@ Id必须以小写字母开头。</translation>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerToolbar</name>
<name>ImageViewer</name>
<message>
<source>Image Viewer</source>
<translation></translation>
</message>
<message>
<source>Show background</source>
<translation type="obsolete"></translation>
@@ -28245,14 +28245,6 @@ Id必须以小写字母开头。</translation>
<source>Original size</source>
<translation type="obsolete"></translation>
</message>
<message>
<source>Zoom In</source>
<translation></translation>
</message>
<message>
<source>Zoom Out</source>
<translation></translation>
</message>
<message>
<source>Show Background</source>
<translation></translation>
@@ -28265,10 +28257,6 @@ Id必须以小写字母开头。</translation>
<source>Fit to Screen</source>
<translation></translation>
</message>
<message>
<source>Original Size</source>
<translation></translation>
</message>
</context>
<context>
<name>ComponentNameDialog</name>
@@ -29923,7 +29911,7 @@ instead of its installation directory when run outside git bash.</source>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerActionHandler</name>
<name>ImageViewer</name>
<message>
<source>Zoom In</source>
<translation></translation>
@@ -39137,7 +39125,7 @@ These files are preserved.</source>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewer</name>
<name>ImageViewer</name>
<message>
<source>Cannot open image file %1</source>
<translation type="obsolete"> %1</translation>

View File

@@ -10954,10 +10954,6 @@ Will not be applied to whitespace in comments and strings.</source>
<source>Resource Editor</source>
<translation></translation>
</message>
<message>
<source>Image Viewer</source>
<translation></translation>
</message>
<message>
<source>GLSL Editor</source>
<translation>GLSL </translation>
@@ -16196,14 +16192,10 @@ Ids must begin with a lowercase letter.</source>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerToolbar</name>
<name>ImageViewer</name>
<message>
<source>Zoom In</source>
<translation></translation>
</message>
<message>
<source>Zoom Out</source>
<translation></translation>
<source>Image Viewer</source>
<translation></translation>
</message>
<message>
<source>Show Background</source>
@@ -16217,10 +16209,6 @@ Ids must begin with a lowercase letter.</source>
<source>Fit to Screen</source>
<translation></translation>
</message>
<message>
<source>Original Size</source>
<translation></translation>
</message>
</context>
<context>
<name>QmlJSEditor::Internal::QuickToolBarSettingsPage</name>
@@ -17383,7 +17371,7 @@ instead of its installation directory when run outside git bash.</source>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewerActionHandler</name>
<name>ImageViewer</name>
<message>
<source>Zoom In</source>
<translation></translation>
@@ -23166,7 +23154,7 @@ These files are preserved.</source>
</message>
</context>
<context>
<name>ImageViewer::Internal::ImageViewer</name>
<name>ImageViewer</name>
<message>
<source>Cannot open image file %1.</source>
<translation> %1</translation>

View File

@@ -11,7 +11,6 @@ add_qtc_plugin(ImageViewer
imageview.cpp imageview.h
imageviewer.cpp imageviewer.h
imageviewerconstants.h
imageviewerfactory.cpp imageviewerfactory.h
imageviewerfile.cpp imageviewerfile.h
imageviewerplugin.cpp imageviewerplugin.h
multiexportdialog.cpp multiexportdialog.h

View File

@@ -24,7 +24,9 @@
****************************************************************************/
#include "exportdialog.h"
#include "imageview.h" // ExportData
#include "imageviewertr.h"
#include <coreplugin/coreicons.h>
@@ -54,7 +56,7 @@ QString ExportDialog::imageNameFilterString()
static QString result;
if (result.isEmpty()) {
QMimeDatabase mimeDatabase;
const QString separator = QStringLiteral(";;");
const QString separator = ";;";
foreach (const QByteArray &mimeType, QImageWriter::supportedMimeTypes()) {
const QString filter = mimeDatabase.mimeTypeForName(QLatin1String(mimeType)).filterString();
if (!filter.isEmpty()) {
@@ -85,7 +87,7 @@ ExportDialog::ExportDialog(QWidget *parent)
m_pathChooser->setMinimumWidth(screen()->availableGeometry().width() / 5);
m_pathChooser->setExpectedKind(Utils::PathChooser::SaveFile);
m_pathChooser->setPromptDialogFilter(imageNameFilterString());
formLayout->addRow(tr("File:"), m_pathChooser);
formLayout->addRow(Tr::tr("File:"), m_pathChooser);
auto sizeLayout = new QHBoxLayout;
m_widthSpinBox->setMinimum(exportMinimumSize);
@@ -94,18 +96,18 @@ ExportDialog::ExportDialog(QWidget *parent)
this, &ExportDialog::exportWidthChanged);
sizeLayout->addWidget(m_widthSpinBox);
//: Multiplication, as in 32x32
sizeLayout->addWidget(new QLabel(tr("x")));
sizeLayout->addWidget(new QLabel(Tr::tr("x")));
m_heightSpinBox->setMinimum(exportMinimumSize);
m_heightSpinBox->setMaximum(exportMaximumSize);
connect(m_heightSpinBox, QOverload<int>::of(&QSpinBox::valueChanged),
this, &ExportDialog::exportHeightChanged);
sizeLayout->addWidget(m_heightSpinBox);
auto resetButton = new QToolButton(this);
resetButton->setIcon(QIcon(QStringLiteral(":/qt-project.org/styles/commonstyle/images/refresh-32.png")));
resetButton->setIcon(QIcon(":/qt-project.org/styles/commonstyle/images/refresh-32.png"));
sizeLayout->addWidget(resetButton);
sizeLayout->addStretch();
connect(resetButton, &QAbstractButton::clicked, this, &ExportDialog::resetExportSize);
formLayout->addRow(tr("Size:"), sizeLayout);
formLayout->addRow(Tr::tr("Size:"), sizeLayout);
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
@@ -121,7 +123,7 @@ void ExportDialog::accept()
}
const QString fileName = exportFileName();
if (QFileInfo::exists(fileName)) {
const QString question = tr("%1 already exists.\nWould you like to overwrite it?")
const QString question = Tr::tr("%1 already exists.\nWould you like to overwrite it?")
.arg(QDir::toNativeSeparators(fileName));
if (QMessageBox::question(this, windowTitle(), question, QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes)
return;

View File

@@ -31,14 +31,12 @@ QT_FORWARD_DECLARE_CLASS(QSpinBox)
namespace Utils { class PathChooser; }
namespace ImageViewer {
namespace Internal {
namespace ImageViewer::Internal {
struct ExportData;
class ExportDialog : public QDialog
{
Q_OBJECT
public:
explicit ExportDialog(QWidget *parent = nullptr);
@@ -69,5 +67,4 @@ private:
qreal m_aspectRatio;
};
} // namespace Internal
} // namespace ImageViewer
} // ImageViewer::Internal

View File

@@ -27,8 +27,9 @@
#include "imageview.h"
#include "exportdialog.h"
#include "multiexportdialog.h"
#include "imageviewerfile.h"
#include "imageviewertr.h"
#include "multiexportdialog.h"
#include "utils/mimeutils.h"
#include <coreplugin/messagemanager.h>
@@ -36,19 +37,17 @@
#include <utils/fileutils.h>
#include <utils/qtcassert.h>
#include <QMessageBox>
#include <QGraphicsRectItem>
#include <QWheelEvent>
#include <QMouseEvent>
#include <QImage>
#include <QPainter>
#include <QPixmap>
#include <QClipboard>
#include <QGuiApplication>
#include <QDir>
#include <QFileInfo>
#include <QGraphicsRectItem>
#include <QGuiApplication>
#include <QImage>
#include <QMessageBox>
#include <QMouseEvent>
#include <QPainter>
#include <QPixmap>
#include <QWheelEvent>
#include <qmath.h>
@@ -176,14 +175,14 @@ bool ImageView::exportSvg(const ExportData &ed)
{
const bool result = renderSvg(ed.size).save(ed.fileName);
if (result) {
const QString message = tr("Exported \"%1\", %2x%3, %4 bytes")
const QString message = Tr::tr("Exported \"%1\", %2x%3, %4 bytes")
.arg(QDir::toNativeSeparators(ed.fileName))
.arg(ed.size.width()).arg(ed.size.height())
.arg(QFileInfo(ed.fileName).size());
Core::MessageManager::writeDisrupting(message);
} else {
const QString message = tr("Could not write file \"%1\".").arg(QDir::toNativeSeparators(ed.fileName));
QMessageBox::critical(this, tr("Export Image"), message);
const QString message = Tr::tr("Could not write file \"%1\".").arg(QDir::toNativeSeparators(ed.fileName));
QMessageBox::critical(this, Tr::tr("Export Image"), message);
}
return result;
}
@@ -214,7 +213,7 @@ void ImageView::exportImage()
const QFileInfo origFi = m_file->filePath().toFileInfo();
ExportDialog exportDialog(this);
exportDialog.setWindowTitle(tr("Export %1").arg(origFi.fileName()));
exportDialog.setWindowTitle(Tr::tr("Export %1").arg(origFi.fileName()));
exportDialog.setExportSize(svgSize());
exportDialog.setExportFileName(suggestedExportFileName(origFi));
@@ -230,7 +229,7 @@ void ImageView::exportMultiImages()
const QFileInfo origFi = m_file->filePath().toFileInfo();
const QSize size = svgSize();
const QString title =
tr("Export a Series of Images from %1 (%2x%3)")
Tr::tr("Export a Series of Images from %1 (%2x%3)")
.arg(origFi.fileName()).arg(size.width()).arg(size.height());
MultiExportDialog multiExportDialog;
multiExportDialog.setWindowTitle(title);

View File

@@ -30,8 +30,7 @@
QT_FORWARD_DECLARE_CLASS(QImage)
namespace ImageViewer {
namespace Internal {
namespace ImageViewer::Internal {
class ImageViewerFile;
@@ -85,5 +84,4 @@ private:
bool m_showOutline = true;
};
} // namespace Internal
} // namespace ImageViewer
} // ImageViewer::Internal

View File

@@ -26,9 +26,10 @@
#include "imageviewer.h"
#include "imageviewerfile.h"
#include "imageviewerconstants.h"
#include "imageview.h"
#include "imageviewerconstants.h"
#include "imageviewerfile.h"
#include "imageviewertr.h"
#include <coreplugin/icore.h>
#include <coreplugin/actionmanager/actionmanager.h>
@@ -42,22 +43,21 @@
#include <utils/styledbar.h>
#include <QAction>
#include <QMap>
#include <QFileInfo>
#include <QDir>
#include <QWidget>
#include <QDebug>
#include <QVariant>
#include <QDir>
#include <QFileInfo>
#include <QHBoxLayout>
#include <QImageReader>
#include <QLabel>
#include <QMap>
#include <QSpacerItem>
#include <QWidget>
#include <QWidget>
using namespace Core;
using namespace Utils;
namespace ImageViewer {
namespace Internal {
namespace ImageViewer::Internal{
struct ImageViewerPrivate
{
@@ -145,13 +145,13 @@ void ImageViewer::ctor()
d->toolButtonZoomOut->setAutoRepeat(true);
d->toolButtonExportImage->setToolTipBase(tr("Export as Image"));
d->toolButtonMultiExportImages->setToolTipBase(tr("Export Images of Multiple Sizes"));
d->toolButtonOutline->setToolTipBase(tr("Show Outline"));
d->toolButtonFitToScreen->setToolTipBase(tr("Fit to Screen"));
d->toolButtonOriginalSize->setToolTipBase(tr("Original Size"));
d->toolButtonZoomIn->setToolTipBase(tr("Zoom In"));
d->toolButtonZoomOut->setToolTipBase(tr("Zoom Out"));
d->toolButtonExportImage->setToolTipBase(Tr::tr("Export as Image"));
d->toolButtonMultiExportImages->setToolTipBase(Tr::tr("Export Images of Multiple Sizes"));
d->toolButtonOutline->setToolTipBase(Tr::tr("Show Outline"));
d->toolButtonFitToScreen->setToolTipBase(Tr::tr("Fit to Screen"));
d->toolButtonOriginalSize->setToolTipBase(Tr::tr("Original Size"));
d->toolButtonZoomIn->setToolTipBase(Tr::tr("Zoom In"));
d->toolButtonZoomOut->setToolTipBase(Tr::tr("Zoom Out"));
d->toolButtonExportImage->setIcon(Icons::EXPORTFILE_TOOLBAR.icon());
d->toolButtonMultiExportImages->setIcon(Icons::MULTIEXPORTFILE_TOOLBAR.icon());
@@ -359,14 +359,26 @@ void ImageViewer::updatePauseAction()
{
bool isMovie = d->file->type() == ImageViewerFile::TypeMovie;
if (isMovie && !d->file->isPaused()) {
d->toolButtonPlayPause->setToolTipBase(tr("Pause Animation"));
d->toolButtonPlayPause->setToolTipBase(Tr::tr("Pause Animation"));
d->toolButtonPlayPause->setIcon(Icons::INTERRUPT_SMALL_TOOLBAR.icon());
} else {
d->toolButtonPlayPause->setToolTipBase(tr("Play Animation"));
d->toolButtonPlayPause->setToolTipBase(Tr::tr("Play Animation"));
d->toolButtonPlayPause->setIcon(Icons::RUN_SMALL_TOOLBAR.icon());
d->toolButtonPlayPause->setEnabled(isMovie);
}
}
} // namespace Internal
} // namespace ImageViewer
// Factory
ImageViewerFactory::ImageViewerFactory()
{
setId(Constants::IMAGEVIEWER_ID);
setDisplayName(Tr::tr("Image Viewer"));
setEditorCreator([] { return new ImageViewer; });
const QList<QByteArray> supportedMimeTypes = QImageReader::supportedMimeTypes();
for (const QByteArray &format : supportedMimeTypes)
addMimeType(QString::fromLatin1(format));
}
} // ImageViewer::Internal

View File

@@ -27,16 +27,9 @@
#pragma once
#include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/editormanager/ieditorfactory.h>
#include <coreplugin/idocument.h>
#include <QScopedPointer>
#include <QStringList>
QT_BEGIN_NAMESPACE
class QAbstractButton;
class QAction;
QT_END_NAMESPACE
namespace ImageViewer::Internal {
class ImageViewerFile;
@@ -78,4 +71,10 @@ private:
struct ImageViewerPrivate *d;
};
class ImageViewerFactory final : public Core::IEditorFactory
{
public:
ImageViewerFactory();
};
} // ImageViewer::Internal

View File

@@ -23,8 +23,6 @@ QtcPlugin {
"imageviewer.cpp",
"imageviewer.h",
"imageviewerconstants.h",
"imageviewerfactory.cpp",
"imageviewerfactory.h",
"imageviewerfile.cpp",
"imageviewerfile.h",
"imageviewerplugin.cpp",

View File

@@ -28,11 +28,9 @@
#include <qglobal.h>
namespace ImageViewer {
namespace Constants {
namespace ImageViewer::Constants {
const char IMAGEVIEWER_ID[] = "Editors.ImageViewer";
const char IMAGEVIEWER_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("OpenWith::Editors", "Image Viewer");
const char ACTION_EXPORT_IMAGE[] = "ImageViewer.ExportImage";
const char ACTION_EXPORT_MULTI_IMAGES[] = "ImageViewer.ExportMultiImages";
@@ -42,5 +40,4 @@ const char ACTION_BACKGROUND[] = "ImageViewer.Background";
const char ACTION_OUTLINE[] = "ImageViewer.Outline";
const char ACTION_TOGGLE_ANIMATION[] = "ImageViewer.ToggleAnimation";
} // namespace Constants
} // namespace ImageViewer
} // ImageViewer::Constants

View File

@@ -1,49 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 Denis Mingulov.
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#include "imageviewerfactory.h"
#include "imageviewerconstants.h"
#include "imageviewer.h"
#include <QCoreApplication>
#include <QImageReader>
namespace ImageViewer {
namespace Internal {
ImageViewerFactory::ImageViewerFactory()
{
setId(Constants::IMAGEVIEWER_ID);
setDisplayName(QCoreApplication::translate("OpenWith::Editors", Constants::IMAGEVIEWER_DISPLAY_NAME));
setEditorCreator([] { return new ImageViewer; });
const QList<QByteArray> supportedMimeTypes = QImageReader::supportedMimeTypes();
for (const QByteArray &format : supportedMimeTypes)
addMimeType(QString::fromLatin1(format));
}
} // namespace Internal
} // namespace ImageViewer

View File

@@ -1,41 +0,0 @@
/****************************************************************************
**
** Copyright (C) 2016 Denis Mingulov.
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#pragma once
#include <coreplugin/editormanager/ieditorfactory.h>
namespace ImageViewer {
namespace Internal {
class ImageViewerFactory final : public Core::IEditorFactory
{
public:
ImageViewerFactory();
};
} // namespace Internal
} // namespace ImageViewer

View File

@@ -25,26 +25,29 @@
****************************************************************************/
#include "imageviewerfile.h"
#include "imageviewer.h"
#include "imageviewerconstants.h"
#include "imageviewertr.h"
#include <coreplugin/editormanager/documentmodel.h>
#include <utils/fileutils.h>
#include <coreplugin/editormanager/ieditor.h>
#include <utils/filepath.h>
#include <utils/mimeutils.h>
#include <utils/qtcassert.h>
#include <QFileInfo>
#include <QGraphicsPixmapItem>
#ifndef QT_NO_SVG
#include <QGraphicsSvgItem>
#endif
#include <QImageReader>
#include <QMovie>
#include <QPainter>
#include <QPixmap>
namespace ImageViewer {
namespace Internal {
#ifndef QT_NO_SVG
#include <QGraphicsSvgItem>
#endif
namespace ImageViewer::Internal {
class MovieItem : public QObject, public QGraphicsPixmapItem
{
@@ -103,7 +106,7 @@ Core::IDocument::OpenResult ImageViewerFile::openImpl(QString *errorString,
// if it is impossible to recognize a file format - file will not be open correctly
if (format.isEmpty()) {
if (errorString)
*errorString = tr("Image format not supported.");
*errorString = Tr::tr("Image format not supported.");
return OpenResult::CannotHandle;
}
@@ -115,7 +118,7 @@ Core::IDocument::OpenResult ImageViewerFile::openImpl(QString *errorString,
delete m_tempSvgItem;
m_tempSvgItem = nullptr;
if (errorString)
*errorString = tr("Failed to read SVG image.");
*errorString = Tr::tr("Failed to read SVG image.");
return OpenResult::CannotHandle;
}
m_type = TypeSvg;
@@ -128,7 +131,7 @@ Core::IDocument::OpenResult ImageViewerFile::openImpl(QString *errorString,
m_movie->jumpToNextFrame();
if (!m_movie->isValid()) {
if (errorString)
*errorString = tr("Failed to read image.");
*errorString = Tr::tr("Failed to read image.");
delete m_movie;
m_movie = nullptr;
return OpenResult::CannotHandle;
@@ -152,7 +155,7 @@ Core::IDocument::OpenResult ImageViewerFile::openImpl(QString *errorString,
m_pixmap = new QPixmap(fileName);
if (m_pixmap->isNull()) {
if (errorString)
*errorString = tr("Failed to read image.");
*errorString = Tr::tr("Failed to read image.");
delete m_pixmap;
m_pixmap = nullptr;
return OpenResult::CannotHandle;
@@ -243,7 +246,7 @@ void ImageViewerFile::updateVisibility()
if (!m_movie || m_isPaused)
return;
bool visible = false;
foreach (Core::IEditor *editor, Core::DocumentModel::editorsForDocument(this)) {
for (Core::IEditor *editor : Core::DocumentModel::editorsForDocument(this)) {
if (editor->widget()->isVisible()) {
visible = true;
break;
@@ -265,5 +268,4 @@ void ImageViewerFile::cleanUp()
m_type = TypeInvalid;
}
} // namespace Internal
} // namespace ImageViewer
} // ImageViewer::Internal

View File

@@ -39,8 +39,7 @@ class QGraphicsSvgItem;
QT_END_NAMESPACE
namespace ImageViewer {
namespace Internal {
namespace ImageViewer::Internal {
class ImageViewerFile : public Core::IDocument
{
@@ -89,5 +88,4 @@ private:
bool m_isPaused = false;
};
} // namespace Internal
} // namespace ImageViewer
} // ImageViewer::Internal

View File

@@ -25,9 +25,10 @@
****************************************************************************/
#include "imageviewerplugin.h"
#include "imageviewer.h"
#include "imageviewerfactory.h"
#include "imageviewerconstants.h"
#include "imageviewertr.h"
#include <coreplugin/icore.h>
#include <coreplugin/actionmanager/actionmanager.h>
@@ -42,8 +43,7 @@
using namespace Core;
using namespace Utils;
namespace ImageViewer {
namespace Internal {
namespace ImageViewer::Internal {
class ImageViewerAction final : public QAction
{
@@ -67,8 +67,6 @@ public:
class ImageViewerPluginPrivate final
{
Q_DECLARE_TR_FUNCTIONS(Imageviewer::Internal::ImageViewerPlugin)
public:
ImageViewerFactory imageViewerFactory;
@@ -90,46 +88,46 @@ public:
ImageViewerAction fitToScreenAction {
Constants::ACTION_FIT_TO_SCREEN,
&ImageViewer::fitToScreen,
tr("Fit to Screen"),
tr("Ctrl+=")
Tr::tr("Fit to Screen"),
Tr::tr("Ctrl+=")
};
ImageViewerAction switchBackgroundAction {
Constants::ACTION_BACKGROUND,
&ImageViewer::switchViewBackground,
tr("Switch Background"),
tr("Ctrl+[")
Tr::tr("Switch Background"),
Tr::tr("Ctrl+[")
};
ImageViewerAction switchOutlineAction {
Constants::ACTION_OUTLINE,
&ImageViewer::switchViewOutline,
tr("Switch Outline"),
tr("Ctrl+]")
Tr::tr("Switch Outline"),
Tr::tr("Ctrl+]")
};
ImageViewerAction toggleAnimationAction {
Constants::ACTION_TOGGLE_ANIMATION,
&ImageViewer::togglePlay,
tr("Toggle Animation")
Tr::tr("Toggle Animation")
};
ImageViewerAction exportImageAction {
Constants::ACTION_EXPORT_IMAGE,
&ImageViewer::exportImage,
tr("Export Image")
Tr::tr("Export Image")
};
ImageViewerAction exportMulitImagesAction {
Constants::ACTION_EXPORT_MULTI_IMAGES,
&ImageViewer::exportMultiImages,
tr("Export Multiple Images"),
Tr::tr("Export Multiple Images"),
};
ImageViewerAction copyDataUrlAction {
Constants::ACTION_COPY_DATA_URL,
&ImageViewer::copyDataUrl,
tr("Copy as Data URL"),
Tr::tr("Copy as Data URL"),
};
};
@@ -148,5 +146,4 @@ bool ImageViewerPlugin::initialize(const QStringList &arguments, QString *errorM
return true;
}
} // namespace Internal
} // namespace ImageViewer
} // ImageViewer::Internal

View File

@@ -28,8 +28,7 @@
#include <extensionsystem/iplugin.h>
namespace ImageViewer {
namespace Internal {
namespace ImageViewer::Internal {
class ImageViewerPlugin : public ExtensionSystem::IPlugin
{
@@ -46,5 +45,4 @@ private:
class ImageViewerPluginPrivate *d = nullptr;
};
} // namespace Internal
} // namespace ImageViewer
} // ImageViewer::Internal

View File

@@ -24,8 +24,10 @@
****************************************************************************/
#include "multiexportdialog.h"
#include "exportdialog.h"
#include "imageview.h" // ExportData
#include "imageviewertr.h"
#include <coreplugin/coreicons.h>
#include <coreplugin/icore.h>
@@ -47,8 +49,7 @@
#include <QToolButton>
#include <QWidgetAction>
namespace ImageViewer {
namespace Internal {
namespace ImageViewer::Internal {
static const int standardIconSizesValues[] = {16, 24, 32, 48, 64, 128, 256};
@@ -180,11 +181,11 @@ MultiExportDialog::MultiExportDialog(QWidget *parent)
m_pathChooser->setExpectedKind(Utils::PathChooser::SaveFile);
m_pathChooser->setPromptDialogFilter(ExportDialog::imageNameFilterString());
const QString pathChooserToolTip =
tr("Enter a file name containing place holders %1 "
Tr::tr("Enter a file name containing place holders %1 "
"which will be replaced by the width and height of the image, respectively.")
.arg("%1, %2");
m_pathChooser->setToolTip(pathChooserToolTip);
QLabel *pathChooserLabel = new QLabel(tr("File:"));
QLabel *pathChooserLabel = new QLabel(Tr::tr("File:"));
pathChooserLabel->setToolTip(pathChooserToolTip);
formLayout->addRow(pathChooserLabel, m_pathChooser);
@@ -192,18 +193,18 @@ MultiExportDialog::MultiExportDialog(QWidget *parent)
sizeEditButton->setFocusPolicy(Qt::NoFocus);
sizeEditButton->setIcon(Utils::Icons::ARROW_DOWN.icon());
auto sizeEditMenu = new QMenu(this);
sizeEditMenu->addAction(tr("Clear"),
sizeEditMenu->addAction(Tr::tr("Clear"),
m_sizesLineEdit, &QLineEdit::clear);
sizeEditMenu->addAction(tr("Set Standard Icon Sizes"), this,
sizeEditMenu->addAction(Tr::tr("Set Standard Icon Sizes"), this,
&MultiExportDialog::setStandardIconSizes);
sizeEditMenu->addAction(tr("Generate Sizes"), this,
sizeEditMenu->addAction(Tr::tr("Generate Sizes"), this,
&MultiExportDialog::setGeneratedSizes);
sizeEditButton->setMenu(sizeEditMenu);
sizeEditButton->setPopupMode(QToolButton::InstantPopup);
const QString sizesToolTip =
tr("A comma-separated list of size specifications of the form \"<width>x<height>\".");
auto sizesLabel = new QLabel(tr("Sizes:"));
Tr::tr("A comma-separated list of size specifications of the form \"<width>x<height>\".");
auto sizesLabel = new QLabel(Tr::tr("Sizes:"));
sizesLabel->setToolTip(sizesToolTip);
formLayout->addRow(sizesLabel, m_sizesLineEdit);
m_sizesLineEdit->setToolTip(sizesToolTip);
@@ -279,19 +280,19 @@ void MultiExportDialog::accept()
const QString &sizeSpec = sizesSpecification();
if (sizeSpec.isEmpty()) {
QMessageBox::warning(this, windowTitle(), tr("Please specify some sizes."));
QMessageBox::warning(this, windowTitle(), Tr::tr("Please specify some sizes."));
return;
}
const QVector<ExportData> &data = exportData();
if (data.isEmpty()) {
QMessageBox::warning(this, windowTitle(),
tr("Invalid size specification: %1").arg(sizeSpec));
Tr::tr("Invalid size specification: %1").arg(sizeSpec));
return;
}
if (data.size() > 1 && data.at(0).fileName == data.at(1).fileName) {
QMessageBox::warning(this, windowTitle(),
tr("The file name must contain one of the placeholders %1, %2.")
Tr::tr("The file name must contain one of the placeholders %1, %2.")
.arg(QString("%1"), QString("%2")));
return;
}
@@ -305,9 +306,9 @@ void MultiExportDialog::accept()
}
if (!existingFiles.isEmpty()) {
const QString message = existingFiles.size() == 1
? tr("The file %1 already exists.\nWould you like to overwrite it?")
? Tr::tr("The file %1 already exists.\nWould you like to overwrite it?")
.arg(QDir::toNativeSeparators(existingFiles.constFirst()))
: tr("The files %1 already exist.\nWould you like to overwrite them?")
: Tr::tr("The files %1 already exist.\nWould you like to overwrite them?")
.arg(QDir::toNativeSeparators(existingFiles.join(", ")));
QMessageBox messageBox(QMessageBox::Question, windowTitle(), message,
QMessageBox::Yes | QMessageBox::No, this);
@@ -331,5 +332,4 @@ void MultiExportDialog::setExportFileName(QString f)
m_pathChooser->setFilePath(Utils::FilePath::fromString(f));
}
} // namespace Internal
} // namespace ImageViewer
} // ImageViewer:Internal

View File

@@ -35,8 +35,7 @@ QT_FORWARD_DECLARE_CLASS(QLineEdit)
namespace Utils { class PathChooser; }
namespace ImageViewer {
namespace Internal {
namespace ImageViewer::Internal {
struct ExportData;
@@ -61,12 +60,12 @@ public:
QSize svgSize() const { return m_svgSize; }
void setSvgSize(const QSize &svgSize) { m_svgSize = svgSize; }
public slots:
void setStandardIconSizes();
void setGeneratedSizes();
void suggestSizes();
private:
void setStandardIconSizes();
void setGeneratedSizes();
QString sizesSpecification() const;
Utils::PathChooser *m_pathChooser;
@@ -75,5 +74,4 @@ private:
};
} // namespace Internal
} // namespace ImageViewer
} // ImageViewer::Internal