From 267c7f5f28f188e19abeed38cfcc77d313c1b94e Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Wed, 30 Jun 2021 02:53:41 +0300 Subject: [PATCH] renamedlgplugins: remove them Signed-off-by: Ivailo Monev --- CMakeLists.txt | 1 - renamedlgplugins/CMakeLists.txt | 5 - renamedlgplugins/README | 7 -- renamedlgplugins/audio/CMakeLists.txt | 21 ---- renamedlgplugins/audio/Messages.sh | 2 - renamedlgplugins/audio/TODO | 9 -- renamedlgplugins/audio/audio_plugin.cpp | 103 ---------------- renamedlgplugins/audio/audiopreview.cpp | 128 -------------------- renamedlgplugins/audio/audiopreview.h | 72 ----------- renamedlgplugins/audio/renaudiodlg.desktop | 89 -------------- renamedlgplugins/images/CMakeLists.txt | 21 ---- renamedlgplugins/images/Messages.sh | 2 - renamedlgplugins/images/image_plugin.cpp | 89 -------------- renamedlgplugins/images/imagevisualizer.cpp | 82 ------------- renamedlgplugins/images/imagevisualizer.h | 72 ----------- renamedlgplugins/images/renimagedlg.desktop | 88 -------------- 16 files changed, 791 deletions(-) delete mode 100644 renamedlgplugins/CMakeLists.txt delete mode 100644 renamedlgplugins/README delete mode 100644 renamedlgplugins/audio/CMakeLists.txt delete mode 100644 renamedlgplugins/audio/Messages.sh delete mode 100644 renamedlgplugins/audio/TODO delete mode 100644 renamedlgplugins/audio/audio_plugin.cpp delete mode 100644 renamedlgplugins/audio/audiopreview.cpp delete mode 100644 renamedlgplugins/audio/audiopreview.h delete mode 100644 renamedlgplugins/audio/renaudiodlg.desktop delete mode 100644 renamedlgplugins/images/CMakeLists.txt delete mode 100644 renamedlgplugins/images/Messages.sh delete mode 100644 renamedlgplugins/images/image_plugin.cpp delete mode 100644 renamedlgplugins/images/imagevisualizer.cpp delete mode 100644 renamedlgplugins/images/imagevisualizer.h delete mode 100644 renamedlgplugins/images/renimagedlg.desktop diff --git a/CMakeLists.txt b/CMakeLists.txt index d58b3798..2feadde6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -366,7 +366,6 @@ add_subdirectory(solid-networkstatus) add_subdirectory(kcmshell) add_subdirectory(kioslave) add_subdirectory(kurifilter-plugins) -add_subdirectory(renamedlgplugins) add_subdirectory(kquitapp) if (Q_WS_X11) add_subdirectory(kstart) diff --git a/renamedlgplugins/CMakeLists.txt b/renamedlgplugins/CMakeLists.txt deleted file mode 100644 index f4401389..00000000 --- a/renamedlgplugins/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ - -add_subdirectory( images ) -add_subdirectory( audio ) - - diff --git a/renamedlgplugins/README b/renamedlgplugins/README deleted file mode 100644 index 2b2ea6bb..00000000 --- a/renamedlgplugins/README +++ /dev/null @@ -1,7 +0,0 @@ -Here you willl find plugins for the RenameDlg - -images This module will show the two different pictures/images - to let you better decide what you want to do - -audio This module will show you some information on the audio - files to make it easier to decide what to do. diff --git a/renamedlgplugins/audio/CMakeLists.txt b/renamedlgplugins/audio/CMakeLists.txt deleted file mode 100644 index ac5bc138..00000000 --- a/renamedlgplugins/audio/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ - - - - -########### next target ############### - -set(renaudioplugin_PART_SRCS audiopreview.cpp audio_plugin.cpp ) - -kde4_add_plugin(renaudioplugin WITH_PREFIX ${renaudioplugin_PART_SRCS}) - - - -target_link_libraries(renaudioplugin ${KDE4_KIO_LIBS} kmediaplayer ) - -install(TARGETS renaudioplugin DESTINATION ${KDE4_PLUGIN_INSTALL_DIR} ) - - -########### install files ############### - -install( FILES renaudiodlg.desktop DESTINATION ${KDE4_SERVICES_INSTALL_DIR} ) - diff --git a/renamedlgplugins/audio/Messages.sh b/renamedlgplugins/audio/Messages.sh deleted file mode 100644 index b5942d20..00000000 --- a/renamedlgplugins/audio/Messages.sh +++ /dev/null @@ -1,2 +0,0 @@ -#! /bin/sh -$XGETTEXT *.cpp -o $podir/audiorename_plugin.pot diff --git a/renamedlgplugins/audio/TODO b/renamedlgplugins/audio/TODO deleted file mode 100644 index 453c700c..00000000 --- a/renamedlgplugins/audio/TODO +++ /dev/null @@ -1,9 +0,0 @@ -Some ideas on what would be nice if implemented... - -* Start playing the audio file when icon is hovered. -* Colorize differences in file information -* On remote files: load file when label is clicked -* Tell if source or destination file is broken -* Tell if they're different or the same, not taking e.g. the IDtag into - account, only the actual audio data. -* ... diff --git a/renamedlgplugins/audio/audio_plugin.cpp b/renamedlgplugins/audio/audio_plugin.cpp deleted file mode 100644 index d924e1e8..00000000 --- a/renamedlgplugins/audio/audio_plugin.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2003 Fabian Wolf - - image_plugin.cpp (also Part of the KDE Project) used as template - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "audiopreview.h" - -class AudioPlugin : public KIO::RenameDialogPlugin{ -public: - AudioPlugin( QWidget *dialog, const QVariantList & ); - ~AudioPlugin(); - - bool wantToHandle( KIO::RenameDialog_Mode mode, const KIO::RenameDialogPlugin::FileItem& src, - const KIO::RenameDialogPlugin::FileItem& dst ) const; - void handle( KIO::RenameDialog_Mode, const KIO::RenameDialogPlugin::FileItem& src, - const KIO::RenameDialogPlugin::FileItem& dst ); -}; - -AudioPlugin::AudioPlugin( QWidget *dialog, const QVariantList & ) - : RenameDialogPlugin(static_cast(dialog)) { - kDebug() << "loaded"; -} -AudioPlugin::~AudioPlugin() -{ -} - -bool AudioPlugin::wantToHandle( KIO::RenameDialog_Mode, const KIO::RenameDialogPlugin::FileItem&, - const KIO::RenameDialogPlugin::FileItem& ) const { - return true; -} - -void AudioPlugin::handle( KIO::RenameDialog_Mode mode, const KIO::RenameDialogPlugin::FileItem& src, - const KIO::RenameDialogPlugin::FileItem& dst ) { - - QGridLayout *lay = new QGridLayout( this ); - if( mode & KIO::M_OVERWRITE ){ - QLabel *label_src = new QLabel(this); - QLabel *label_dst = new QLabel(this); - QLabel *label_ask = new QLabel(this); - - QString sentence1; - QString dest = dst.url().pathOrUrl(); - if ( src.mTime() < dst.mTime() ) - sentence1 = i18n("An older file named '%1' already exists.\n", dest); - else if ( src.mTime() == dst.mTime() ) - sentence1 = i18n("A similar file named '%1' already exists.\n", dest); - else - sentence1 = i18n("A newer file named '%1' already exists.\n", dest); - QLabel *label_head = new KSqueezedTextLabel(sentence1, this); - label_src->setText(i18n("Source File")); - label_dst->setText(i18n("Existing File")); - label_ask->setText(i18n("Would you like to replace the existing file with the one on the right?") ); - label_head->adjustSize(); - label_src->adjustSize(); - label_dst->adjustSize(); - label_ask->adjustSize(); - lay->addWidget(label_head, 0, 0, 1, 3, Qt::AlignLeft); - lay->addWidget(label_dst, 1, 0, Qt::AlignLeft); - lay->addWidget(label_src, 1, 2, Qt::AlignLeft); - lay->addWidget(label_ask, 3, 0, 1, 3, Qt::AlignLeft); - adjustSize(); - } - AudioPreview *left= new AudioPreview(this, dst.url(), dst.mimeType() ); - AudioPreview *right = new AudioPreview( this, src.url(), src.mimeType() ); - lay->addWidget(left, 2, 0 ); - lay->addWidget(right, 2, 2 ); - adjustSize(); -} - -K_PLUGIN_FACTORY(AudioPluginFactory, - registerPlugin();) -K_EXPORT_PLUGIN(AudioPluginFactory("audiorename_plugin")) - diff --git a/renamedlgplugins/audio/audiopreview.cpp b/renamedlgplugins/audio/audiopreview.cpp deleted file mode 100644 index d6f6c955..00000000 --- a/renamedlgplugins/audio/audiopreview.cpp +++ /dev/null @@ -1,128 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2003 Fabian Wolf - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "audiopreview.h" - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -AudioPreview::AudioPreview( QWidget *parent, const KUrl &url, const QString &mimeType) - : KVBox( parent ) -{ - m_isTempFile = false; - pic = 0; - m_player = 0L; - description = 0; - setSpacing( 0 ); - if( url.isValid() && url.isLocalFile() ) { - m_localFile = url.toLocalFile(); - pic = new QLabel(this); - pic->setPixmap(KIO::pixmapForUrl( url )); - pic->adjustSize(); - initView( mimeType ); - } else if( !url.isLocalFile() ) { - KUrlLabel *label = new KUrlLabel( this ); - label->setText(i18n("This audio file is not stored\non the local host.\nClick on this label to load it.\n" ) ); - label->setUrl( url.prettyUrl() ); - connect(label, SIGNAL(leftClickedUrl(const QString&)), SLOT(downloadFile(const QString&))); - pic = label; - } else { - description = new QLabel(this ); - description->setText(i18n("Unable to load audio file") ); - } -} - -AudioPreview::~AudioPreview() -{ - if ( m_isTempFile ) - KIO::NetAccess::removeTempFile( m_localFile ); - - delete m_player; -} - -void AudioPreview::initView( const QString& mimeType ) -{ - KUrl url = KUrl::fromPath( m_localFile ); - pic->setText( QString() ); - pic->setPixmap(KIO::pixmapForUrl( url )); - pic->adjustSize(); - - KFileMetaInfo info(m_localFile); - KMimeType::Ptr mimeptr = KMimeType::mimeType(mimeType); - - QString desc; - if (info.isValid()) - { - if (mimeptr->is("audio/mpeg") || mimeptr->is("application/ogg")) - { - // following 3 labels might be very long; make sure they get squeezed - KSqueezedTextLabel *sl; - - sl = new KSqueezedTextLabel(this); - sl->setText(i18n("Artist: %1", info.item("Artist").value().toString())); - - sl = new KSqueezedTextLabel(this); - sl->setText(i18n("Title: %1", info.item("Title").value().toString())); - - sl = new KSqueezedTextLabel(this); - sl->setText(i18n("Comment: %1", info.item("Comment").value().toString())); - - desc.append(i18nc("Bitrate: 160 kbits/s", "Bitrate: %1 %2\n", info.item("Bitrate").value().toString(), info.item("Bitrate").suffix() )); - } - desc.append(i18n("Sample rate: %1 %2\n", info.item("Sample Rate").value().toString(), info.item("Sample Rate").suffix() )); - desc.append(i18n("Length: ")); - - /* Calculate length in mm:ss format */ - int length = info.item("Length").value().toInt(); - if (length/60 < 10) - desc.append("0"); - desc.append(QString("%1:").arg(length/60, 0, 10)); - if (length%60 < 10) - desc.append("0"); - desc.append(QString("%1\n").arg(length%60, 0, 10)); - } - - description = new QLabel(this); - description->setText( desc ); - description->adjustSize(); - m_player = new KMediaWidget( this ); - m_player->player()->setPlayerID("audio_rename_plugin"); - m_player->show(); - m_player->open( url.url() ); -} - -void AudioPreview::downloadFile( const QString& url ) -{ - if( KIO::NetAccess::download( KUrl( url ), m_localFile , window()) ) - { - m_isTempFile = true; - initView( KMimeType::findByPath( m_localFile )->name() ); - } -} - -#include "moc_audiopreview.cpp" diff --git a/renamedlgplugins/audio/audiopreview.h b/renamedlgplugins/audio/audiopreview.h deleted file mode 100644 index 9487eb98..00000000 --- a/renamedlgplugins/audio/audiopreview.h +++ /dev/null @@ -1,72 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2003 Fabian Wolf - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef AUDIOPREVIEW_H -#define AUDIOPREVIEW_H - -#include -#include - -#include -class KUrl; - -class AudioPreview : public KVBox -{ - Q_OBJECT -public: - AudioPreview(QWidget *parent, const KUrl &url, const QString &mimeType); - ~AudioPreview(); - -private slots: - void downloadFile(const QString& url); - -private: - void initView(const QString& mimeType); - - QLabel *pic; - QLabel *description; - QString m_localFile; - bool m_isTempFile; - - KMediaWidget *m_player; -}; -#endif - - - - - - - - - - - - - - - - - - - - - - - diff --git a/renamedlgplugins/audio/renaudiodlg.desktop b/renamedlgplugins/audio/renaudiodlg.desktop deleted file mode 100644 index 0257d5ac..00000000 --- a/renamedlgplugins/audio/renaudiodlg.desktop +++ /dev/null @@ -1,89 +0,0 @@ -[Desktop Entry] -Type=Service -Icon=edit-rename -Name=Audio Preview -Name[af]=Klankvoorskou -Name[ar]=معاينة صوت -Name[ast]=Prueba d'audio -Name[be]=Прагляд аўдыё -Name[be@latin]=Počut dla hukavoha fajła -Name[bg]=Преглед на звукови файлове -Name[bn]=অডিও প্রাকদর্শন -Name[bs]=Audio pregled -Name[ca]=Vista prèvia de l'àudio -Name[ca@valencia]=Vista prèvia de l'àudio -Name[cs]=Ukázka zvuku -Name[csb]=Pòdzérk zwãkù -Name[da]=Forhåndsvisning af lyd -Name[de]=Audiovorschau -Name[el]=Προεπισκόπηση ήχου -Name[en_GB]=Audio Preview -Name[eo]=Antaŭaŭskulto -Name[es]=Prueba de audio -Name[et]=Heli eelvaatlus -Name[eu]=Audio-aurrebista -Name[fa]=پیش‌نمایش صوتی -Name[fi]=Äänen esikuuntelu -Name[fr]=Aperçu de fichier audio -Name[fy]=Audio Foarbyld -Name[ga]=Réamhamharc Fuaime -Name[gl]=Vista previa do son -Name[gu]=ધ્વનિ પૂર્વદર્શન -Name[he]=השמעה מקדימה -Name[hi]=आडियो पूर्वावलोकन -Name[hne]=आडियो प्रीव्यू -Name[hr]=Preslušavanje -Name[hsb]=Přehladka za zwuki -Name[hu]=Hangminta -Name[ia]=Vista preliminar Audio -Name[id]=Pratilik Audio -Name[is]=Hljóðforsýn -Name[it]=Anteprima audio -Name[ja]=オーディオプレビュー -Name[kk]=Дыбысты алдын-ала қарау -Name[km]=មើល​អូឌីយ៉ូ​ជាមុន -Name[kn]=ಶ್ರವ್ಯಾಂಶ (ಧ್ವನಿ) ಮುನ್ನೋಟ -Name[ko]=오디오 미리 듣기 -Name[ku]=Pêşdîtina Deng -Name[lt]=Audio perklausa -Name[lv]=Audio priekšapskate -Name[mai]=ऑडियो पूर्वावलोकन -Name[mk]=Аудиопреглед -Name[ml]=ശബ്ദം കേട്ടു് നോക്കുക -Name[mr]=आवाज पूर्वावलोकन -Name[nb]=Lydprøve -Name[nds]=Vörweghören -Name[ne]=अडियो पूर्वावलोकन -Name[nl]=Geluidsvoorbeeld -Name[nn]=Førehandsvising av lyd -Name[or]=ଧ୍ୱନି ପ୍ରାକଦର୍ଶନ -Name[pa]=ਆਡੀਓ ਝਲਕ -Name[pl]=Podgląd dźwięku -Name[pt]=Antevisão do Áudio -Name[pt_BR]=Previsão de áudio -Name[ro]=Previzualizare audio -Name[ru]=Прослушивание звукового файла -Name[se]=Jietna-ovdačájeheapmi -Name[si]=ස්වයංක්‍රීය පුර්‍වදසුන -Name[sk]=Náhľad zvuku -Name[sl]=Predogled zvoka -Name[sr]=Аудио преглед -Name[sr@ijekavian]=Аудио преглед -Name[sr@ijekavianlatin]=Audio pregled -Name[sr@latin]=Audio pregled -Name[sv]=Förhandsgranska ljud -Name[ta]=பதிவொலி மாதிரி -Name[te]=ఆడియో ఉపదర్శనం -Name[tg]=Шунидани пешакии аудио -Name[th]=ตัวอย่างเสียง -Name[tr]=Ses Ön İzlemesi -Name[ug]=ئۈننى ئالدىن كۆرۈش -Name[uk]=Перегляд аудіо -Name[vi]=Nghe trước âm thanh -Name[wa]=Prévoeyaedje di son -Name[x-test]=xxAudio Previewxx -Name[zh_CN]=音频预览 -Name[zh_TW]=音效預覽 -X-KDE-Library=librenaudioplugin -X-KDE-ServiceTypes=RenameDialog/Plugin,audio/mpeg,audio/x-wav,application/ogg -X-KDE-MediaPlayer=audio_rename_plugin diff --git a/renamedlgplugins/images/CMakeLists.txt b/renamedlgplugins/images/CMakeLists.txt deleted file mode 100644 index 34c577f1..00000000 --- a/renamedlgplugins/images/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ - - - - -########### next target ############### - -set(renimageplugin_PART_SRCS imagevisualizer.cpp image_plugin.cpp ) - -kde4_add_plugin(renimageplugin WITH_PREFIX ${renimageplugin_PART_SRCS}) - - - -target_link_libraries(renimageplugin ${KDE4_KIO_LIBS} ) - -install(TARGETS renimageplugin DESTINATION ${KDE4_PLUGIN_INSTALL_DIR} ) - - -########### install files ############### - -install( FILES renimagedlg.desktop DESTINATION ${KDE4_SERVICES_INSTALL_DIR} ) - diff --git a/renamedlgplugins/images/Messages.sh b/renamedlgplugins/images/Messages.sh deleted file mode 100644 index 36c85ea5..00000000 --- a/renamedlgplugins/images/Messages.sh +++ /dev/null @@ -1,2 +0,0 @@ -#! /bin/sh -$XGETTEXT *.cpp -o $podir/imagerename_plugin.pot diff --git a/renamedlgplugins/images/image_plugin.cpp b/renamedlgplugins/images/image_plugin.cpp deleted file mode 100644 index 51360327..00000000 --- a/renamedlgplugins/images/image_plugin.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (C) 2001, 2006 Holger Freyther - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include -#include - -#include -#include -#include -#include - - -#include -#include -#include -#include - -//Added by qt3to4: -#include -#include - -#include - -#include "imagevisualizer.h" - -class ImagePlugin : public KIO::RenameDialogPlugin { -public: - ImagePlugin( QWidget *dialog, const QVariantList & ); - virtual bool wantToHandle( KIO::RenameDialog_Mode, const KIO::RenameDialogPlugin::FileItem&, - const KIO::RenameDialogPlugin::FileItem& ) const; - virtual void handle( KIO::RenameDialog_Mode, const KIO::RenameDialogPlugin::FileItem&, - const KIO::RenameDialogPlugin::FileItem& ); -}; - -ImagePlugin::ImagePlugin( QWidget *dialog, const QVariantList & ) - : RenameDialogPlugin(static_cast(dialog)) -{ -} - -bool ImagePlugin::wantToHandle( KIO::RenameDialog_Mode, const KIO::RenameDialogPlugin::FileItem&, - const KIO::RenameDialogPlugin::FileItem& ) const { - return true; -} - -void ImagePlugin::handle( KIO::RenameDialog_Mode mode, const KIO::RenameDialogPlugin::FileItem& src, - const KIO::RenameDialogPlugin::FileItem& dst ) { - QGridLayout *lay = new QGridLayout( this ); - if( mode & KIO::M_OVERWRITE ) { - QLabel *label = new QLabel(this ); - label->setText(i18n("You want to overwrite the left picture with the one on the right.") ); - label->adjustSize(); - lay->addWidget(label, 1, 0, 1, 3, Qt::AlignHCenter ); - adjustSize(); - } - - ImageVisualizer *left= new ImageVisualizer(this, dst.url() ); - ImageVisualizer *right = new ImageVisualizer( this, src.url() ); - - lay->addWidget(left, 2, 0 ); - lay->addWidget(right, 2, 2 ); - adjustSize(); -} - - -K_PLUGIN_FACTORY(ImagePluginFactory, - registerPlugin();) -K_EXPORT_PLUGIN(ImagePluginFactory("imagerename_plugin")) diff --git a/renamedlgplugins/images/imagevisualizer.cpp b/renamedlgplugins/images/imagevisualizer.cpp deleted file mode 100644 index 94ac80b1..00000000 --- a/renamedlgplugins/images/imagevisualizer.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2002 Holger Freyther - 2003 Carsten Pfeiffer - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "imagevisualizer.h" - -#include -#include -#include - -#include -#include -#include -#include -#include - -ImageVisualizer::ImageVisualizer( QWidget *parent, const KUrl &url ) - : KVBox( parent ) -{ - pic = 0; - description = 0; - setSpacing( 0 ); - if( url.isValid() && url.isLocalFile() ) { - pic = new QLabel(this ); - description = new QLabel( this ); - loadImage( url.toLocalFile() ); - } else if( !url.isLocalFile() ) { - KUrlLabel *label = new KUrlLabel( this ); - label->setText(i18n("This picture is not stored\non the local host.\nClick on this label to load it.\n" ) ); - label->setUrl( url.prettyUrl() ); - connect(label, SIGNAL(leftClickedUrl(const QString&)), SLOT(downloadImage(const QString&))); - pic = label; - description = new QLabel(this); - description->adjustSize( ); - } else { - description = new QLabel(this ); - description->setText(i18n("Unable to load image") ); - } -} - -void ImageVisualizer::loadImage( const QString& path ) -{ - QPixmap pix(path); - QPixmap pixmap(pix.scaled(180, 200, Qt::KeepAspectRatio, Qt::SmoothTransformation) ); - pic->setText( QString() ); - pic->setPixmap(pixmap ); - pic->adjustSize(); - - QString desc; - desc.append(i18nc("The color depth of an image", "Depth: %1\n", pix.depth() )); - desc.append(i18nc("The dimensions of an image", "Dimensions: %1x%2", pix.width(), pix.height() )); - description->setText(desc ); - description->adjustSize(); -} - -void ImageVisualizer::downloadImage(const QString& url) -{ - QString tmpFile; - if( KIO::NetAccess::download( KUrl( url ), tmpFile, window()) ) - { - loadImage( tmpFile ); - KIO::NetAccess::removeTempFile( tmpFile ); - } -} - -#include "moc_imagevisualizer.cpp" diff --git a/renamedlgplugins/images/imagevisualizer.h b/renamedlgplugins/images/imagevisualizer.h deleted file mode 100644 index 4e936a8e..00000000 --- a/renamedlgplugins/images/imagevisualizer.h +++ /dev/null @@ -1,72 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2002 Holger Freyther - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef IMAGEVISUALIZER_H -#define IMAGEVISUALIZER_H - - -//Added by qt3to4: -#include -#include -#include - -#include -#include -class KUrl; - -class ImageVisualizer : public KVBox -{ - Q_OBJECT -public: - ImageVisualizer(QWidget *parent, const KUrl & ); - -private: - void loadImage( const QString& path ); - -private slots: - void downloadImage( const QString& url ); - -private: - QLabel *pic; - QLabel *description; -}; -#endif - - - - - - - - - - - - - - - - - - - - - - - diff --git a/renamedlgplugins/images/renimagedlg.desktop b/renamedlgplugins/images/renimagedlg.desktop deleted file mode 100644 index de0e78cc..00000000 --- a/renamedlgplugins/images/renimagedlg.desktop +++ /dev/null @@ -1,88 +0,0 @@ -[Desktop Entry] -Type=Service -Name=Image Displayer -Name[af]=Beeldwyser -Name[ar]=عارض صور -Name[ast]=Visor d'imáxenes -Name[be]=Праглядчык відарысаў -Name[be@latin]=Padhlad vyjavaŭ -Name[bg]=Показване на изображения -Name[bn]=চিত্র প্রদর্শক -Name[bn_IN]=ছবি প্রদর্শনব্যবস্থা -Name[bs]=Prikazivač slika -Name[ca]=Visor d'imatges -Name[ca@valencia]=Visor d'imatges -Name[cs]=Prohlížeč obrázků -Name[csb]=Przezérnik òbrôzków -Name[da]=Billedfremviser -Name[de]=Bildbetrachter -Name[el]=Προβολή εικόνων -Name[en_GB]=Image Displayer -Name[eo]=Bildomontrilo -Name[es]=Visor de imágenes -Name[et]=Pildinäitaja -Name[eu]=Irudi-ikustailea -Name[fa]=نمایشگر تصویر -Name[fi]=Kuvannäytin -Name[fr]=Afficheur d'image -Name[fy]=Ofbylding werjouwer -Name[ga]=Amharcán Íomhánna -Name[gl]=Visor de imaxes -Name[gu]=ચિત્ર દર્શક -Name[he]=מציג תמונות -Name[hi]=छवि प्रदर्शक -Name[hne]=फोटो दिखइया -Name[hr]=Preglednik slika -Name[hsb]=Přehladowar worazow -Name[hu]=Képnézegető -Name[ia]=Monstrator de imagine -Name[id]=Penampil Gambar -Name[is]=Myndbirtir -Name[it]=Visore di immagini -Name[ja]=イメージ表示ツール -Name[kk]=Кескінді қарау құралы -Name[km]=កម្មវិធី​បង្ហាញ​រូបភាព -Name[kn]=ಬಿಂಬ (ಇಮೇಜ್) ಪ್ರದರ್ಶಕ -Name[ko]=그림 뷰어 -Name[ku]=Pêşandana Wêneyî -Name[lt]=Paveikslėlių rodymo priemonė -Name[lv]=Attēlu skatītājs -Name[mai]=छवि देखैनिहार -Name[mk]=Прикажувач на слики -Name[ml]=ചിത്രം പ്രദര്‍ശിപ്പിക്കുന്നതിനുള്ള സംവിധാനം -Name[mr]=प्रतिमा प्रदर्शक -Name[nb]=Bildeviser -Name[nds]=Bildwieser -Name[ne]=छवि प्रदर्शक -Name[nl]=Afbeeldingweergave -Name[nn]=Biletvisar -Name[or]=ପ୍ରତିଛବି ପ୍ରଦର୍ଶକ -Name[pa]=ਚਿੱਤਰ ਦਰਸ਼ਕ -Name[pl]=Wyświetlacz obrazu -Name[pt]=Visualizador de Imagens -Name[pt_BR]=Visualizador de imagens -Name[ro]=Afișor de imagini -Name[ru]=Просмотр изображения -Name[se]=Govvačájeheaddji -Name[si]=පිංතූර දර්ශකය -Name[sk]=Prehliadač obrázkov -Name[sl]=Prikazovalnik slik -Name[sr]=Приказивач слика -Name[sr@ijekavian]=Приказивач слика -Name[sr@ijekavianlatin]=Prikazivač slika -Name[sr@latin]=Prikazivač slika -Name[sv]=Bildvisare -Name[ta]=பிம்ப காட்டி -Name[te]=చిత్ర ప్రదర్శని -Name[tg]=Намоишгари тасвирҳо -Name[th]=ตัวแสดงภาพ -Name[tr]=Resim Gösterici -Name[ug]=سۈرەت كۆرسەتكۈچ -Name[uk]=Перегляд зображень -Name[vi]=Trình hiển thị ảnh -Name[wa]=Håyneu d' imådje -Name[x-test]=xxImage Displayerxx -Name[zh_CN]=图片显示器 -Name[zh_TW]=影像顯示 -X-KDE-Library=librenimageplugin -X-KDE-ServiceTypes=RenameDialog/Plugin,image/jpeg,image/png