]> git.sesse.net Git - kdenlive/commitdiff
preload the preview icons for pgm/png files
authorMarco Gittler <marco@gitma.de>
Wed, 26 Mar 2008 11:46:06 +0000 (11:46 +0000)
committerMarco Gittler <marco@gitma.de>
Wed, 26 Mar 2008 11:46:06 +0000 (11:46 +0000)
updated german texts

svn path=/branches/KDE4/; revision=2124

po/de/kdenlive.po
src/effectstackedit.cpp
src/effectstackedit.h
src/initeffects.cpp
src/initeffects.h

index 5e0187a92c5466d719f1d264e0db2274ae594cfb..28d65ba83ea6403d958f6181bd02a60551664345 100644 (file)
@@ -81,7 +81,7 @@ msgid "Add Audio Effect"
 msgstr "Audioeffekt hinzufügen"
 
 msgid "Add Clip"
-msgstr "Mediendatei hinzufügen"
+msgstr "Datei hinzufügen"
 
 msgid "Add Color Clip"
 msgstr "Farbeclip hinzufügen"
@@ -102,10 +102,10 @@ msgid "Add folder"
 msgstr "Ordner hinzufügen"
 
 msgid "Add keyframe"
-msgstr ""
+msgstr "Keyframe hinzufügen"
 
 msgid "Add new effect"
-msgstr ""
+msgstr "Neuen Effekt hinzufügen"
 
 msgid "Add timeline clip"
 msgstr ""
@@ -114,10 +114,10 @@ msgid "Add transition to clip"
 msgstr "Übergang zu Clip hinzufügen"
 
 msgid "Advanced"
-msgstr ""
+msgstr "Erweitert"
 
 msgid "All"
-msgstr ""
+msgstr "Alle"
 
 msgid "Allow horizontal moves"
 msgstr ""
@@ -138,7 +138,7 @@ msgid "Aspect ratio:"
 msgstr ""
 
 msgid "Audio"
-msgstr "Ton"
+msgstr ""
 
 msgid "Audio clip"
 msgstr "Musikstück"
@@ -165,19 +165,19 @@ msgid "Border"
 msgstr ""
 
 msgid "Button 1"
-msgstr ""
+msgstr "Knopf 1"
 
 msgid "Button 2"
-msgstr ""
+msgstr "Knopf 2"
 
 msgid "Button 3"
-msgstr ""
+msgstr "Knopf 3"
 
 msgid "Button 4"
-msgstr ""
+msgstr "Knopf 4"
 
 msgid "Button 5"
-msgstr ""
+msgstr "Knopf 5"
 
 msgid "Cannot find the inigo program required for rendering (part of Mlt)"
 msgstr ""
@@ -222,13 +222,13 @@ msgid "Color"
 msgstr "Farbe"
 
 msgid "Color Clip"
-msgstr "Farb-Clip"
+msgstr "Farbclip"
 
 msgid "Color clip"
-msgstr "Farbeclip"
+msgstr "Farbclip"
 
 msgid "Color clips"
-msgstr "Farbeclips"
+msgstr "Farbclips"
 
 msgid "Connect"
 msgstr ""
@@ -243,7 +243,7 @@ msgstr ""
 "Einstellungen nicht. Bitte beheben Sie dieses Problem."
 
 msgid "Create"
-msgstr ""
+msgstr "Erstellen"
 
 msgid "Create Folder"
 msgstr "Verzeichnis erstellen"
@@ -273,26 +273,26 @@ msgid "Decoding threads"
 msgstr ""
 
 msgid "Default Durations"
-msgstr ""
+msgstr "Standarddauer"
 
 msgid "Default Profile"
 msgstr "Standardprofil"
 
 msgid "Default capture device"
-msgstr ""
+msgstr "Standardaufnahmegerät"
 
 msgid "Default folders"
-msgstr ""
+msgstr "Standardverzeichnis"
 
 msgid "Default format"
-msgstr ""
+msgstr "Standardformat"
 
 msgid "Delete"
-msgstr ""
+msgstr "Löschen"
 
 #, kde-format
 msgid "Delete %1"
-msgstr ""
+msgstr "Lösche %1"
 
 msgid "Delete Clip"
 msgstr "Clip löschen"
@@ -316,19 +316,19 @@ msgid ""
 msgstr ""
 
 msgid "Delete profile"
-msgstr ""
+msgstr "Profil löschen"
 
 msgid "Delete timeline clip"
-msgstr ""
+msgstr "Datei aus Zeitleiste entfernen"
 
 msgid "Delete transition from clip"
-msgstr ""
+msgstr "Übergang von Datei löschen"
 
 msgid "Description"
 msgstr "Beschreibung"
 
 msgid "Device"
-msgstr ""
+msgstr "Gerät"
 
 msgid "Device configuration"
 msgstr ""
@@ -337,10 +337,10 @@ msgid "Dialog"
 msgstr ""
 
 msgid "Disonnect"
-msgstr ""
+msgstr "Trennen"
 
 msgid "Display"
-msgstr ""
+msgstr "Anzeige"
 
 msgid "Display ratio"
 msgstr ""
@@ -434,7 +434,7 @@ msgid "Folder"
 msgstr "Verzeichnis"
 
 msgid "Force aspect ratio"
-msgstr ""
+msgstr "Seitenverhältnis erzwingen"
 
 msgid "Form"
 msgstr ""
@@ -629,7 +629,7 @@ msgid "Project Settings"
 msgstr "Projekteinstellungen"
 
 msgid "Project Tree"
-msgstr "Projekt Baum"
+msgstr "Projektinhalt"
 
 msgid "Project folder"
 msgstr "Projektverzeichnis"
@@ -695,7 +695,7 @@ msgid "Save changes to document ?"
 msgstr "Änderungen des Dokumentes speichern"
 
 msgid "Selected zone only"
-msgstr "Teilstück markieren"
+msgstr "nur markiertes Teilstück"
 
 msgid "Show audio thumbnails"
 msgstr "zeige Tonspur"
@@ -746,13 +746,13 @@ msgid "There is no clip, cannot extract frame."
 msgstr "Kein Clip vorhanden, kann kein Frame extrahieren."
 
 msgid "Thumbnail"
-msgstr "Mini-Bild"
+msgstr "Vorschau"
 
 msgid "Thumbnails"
-msgstr "Mini-Bilder"
+msgstr "Vorschau"
 
 msgid "Thumbnails:"
-msgstr "Mini-Bilder:"
+msgstr "Vorschau:"
 
 msgid "Timeline"
 msgstr "Zeitleiste"
index b0acd704b9c44a733e0b969f741500d15147d085..4062ea0ababf1f5e5abc8573cda85c6ef5b71cdd 100644 (file)
@@ -30,7 +30,7 @@
 #include "ui_colorval_ui.h"
 #include "complexparameter.h"
 
-static QMap<QString, QIcon> iconCache;
+QMap<QString, QImage> EffectStackEdit::iconCache;
 
 EffectStackEdit::EffectStackEdit(QFrame* frame, QWidget *parent): QObject(parent) {
     QScrollArea *area;
@@ -105,12 +105,12 @@ void EffectStackEdit::transferParamDesc(const QDomElement& d, int , int) {
             for (int i = 0;i < lsval->list->count();i++) {
                 QString entry = lsval->list->itemText(i);
                 if (!entry.isEmpty() && (entry.endsWith(".png") || entry.endsWith(".pgm"))) {
-                    if (!iconCache.contains(entry)) {
-                        QPixmap pix(entry);
-                        iconCache[entry] = pix.scaled(30, 30);
-                    }
+                    /*if (!EffectStackEdit::iconCache.contains(entry)) {
+                           QPixmap pix(entry);
+                        EffectStackEdit::iconCache[entry] = pix.scaled(30, 30);
+                       }*/
                     lsval->list->setIconSize(QSize(30, 30));
-                    lsval->list->setItemIcon(i, iconCache[entry]);
+                    lsval->list->setItemIcon(i, QPixmap::fromImage(iconCache[entry]));
                 }
             }
             connect(lsval->list, SIGNAL(currentIndexChanged(int)) , this, SLOT(collectAllParameters()));
index 7270063eaff639be0b1c876fb206e8893da5ea86..72b6f96971fd590d382311302018187e8d9ab9c1 100644 (file)
@@ -30,6 +30,7 @@ class EffectStackEdit : public QObject {
     Q_OBJECT
 public:
     EffectStackEdit(QFrame* frame, QWidget *parent);
+    static QMap<QString, QImage> iconCache;
 private:
     void clearAllItems();
     QVBoxLayout *vbox;
index a50f9f4a38e2b405166631f98a68635197b6029c..f99def50cd0636bb34b0e9105ac0513b919cde55 100644 (file)
@@ -21,6 +21,7 @@
 #include <QFile>
 #include <qregexp.h>
 #include <QDir>
+#include <QIcon>
 
 #include <KDebug>
 #include <kglobal.h>
 #include "initeffects.h"
 #include "kdenlivesettings.h"
 #include "effectslist.h"
+#include "effectstackedit.h"
+
+initEffectsThumbnailer::initEffectsThumbnailer() {
+    connect(this, SIGNAL(prepareThumbnails(const QStringList&)), this, SLOT(slotPrepareThumbnails(const QStringList&)), Qt::QueuedConnection);
+}
+
+void initEffectsThumbnailer::prepareThumbnailsCall(const QStringList& list) {
+    m_list = list;
+    start();
+    kDebug() << "done";
+}
+
+void initEffectsThumbnailer::run() {
+    foreach(QString entry, m_list) {
+        kDebug() << entry;
+        if (!entry.isEmpty() && (entry.endsWith(".png") || entry.endsWith(".pgm"))) {
+            if (!EffectStackEdit::iconCache.contains(entry)) {
+                QImage pix(entry);
+                //if (!pix.isNull())
+                EffectStackEdit::iconCache[entry] = pix.scaled(30, 30);
+                kDebug() << "stored";
+            }
+        }
+    }
+}
+
+initEffectsThumbnailer initEffects::thumbnailer;
 
 initEffects::initEffects() {
+
 }
 
 initEffects::~initEffects() {
@@ -477,15 +506,17 @@ void initEffects::fillTransitionsList(Mlt::Repository * repository, EffectsList*
                 mlt_properties_dir_list(entries.get_properties(), path.toAscii().data(), "*.*", 1);
                 kDebug() << path << entries.count();
                 QString imagefiles;
+                QStringList imagelist;
                 for (int i = 0;i < entries.count();i++) {
                     //if (!imagefiles.isEmpty()) // add empty entry too
                     imagefiles.append(",");
                     imagefiles.append(entries.get(i));
+                    imagelist << entries.get(i);
                 }
                 paramList.append(quickParameterFill(ret, "Softness", "softness", "double", "0", "0", "100", "", "100"));
                 paramList.append(quickParameterFill(ret, "Invert", "invert", "bool", "0", "0", "1"));
                 paramList.append(quickParameterFill(ret, "ImageFile", "resource", "list", "", "", "", imagefiles));
-
+                thumbnailer.prepareThumbnailsCall(imagelist);
 
             } else if (name == "composite") {
                 paramList.append(quickParameterFill(ret, "Geometry", "geometry", "geometry", "0%,0%:100%x100%", "0%,0%:100%x100%", "0%,0%:100%x100%"));
index 377a00e7e8735b58658b9032da5f592fac3517fd..d63cc2c8c9f8901cc31d91fad2e86869e111b2c5 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <klocale.h>
 #include <QDomDocument>
+#include <QThread>
 #include <mlt++/Mlt.h>
 
 
 
 class EffectsList;
 
-class initEffects {
+class initEffectsThumbnailer : public QThread {
+    Q_OBJECT
+public:
+    initEffectsThumbnailer();
+    void prepareThumbnailsCall(const QStringList&);
+    void run();
+private :
+    QStringList m_list;
+
+};
+
+class initEffects : public QObject {
+
 public:
     initEffects();
     ~initEffects();
@@ -52,6 +65,8 @@ public:
     static char* ladspaPitchShifterEffectString(QStringList params);
     static char* ladspaPhaserEffectString(QStringList params);
     static char* ladspaRateScalerEffectString(QStringList params);
+private:
+    static initEffectsThumbnailer thumbnailer;
 };