forked from pool/krusader
171 lines
5.0 KiB
Diff
171 lines
5.0 KiB
Diff
--- krusader/Panel/panelpopup.h 2006/12/01 15:44:03 1.1
|
|
+++ krusader/Panel/panelpopup.h 2006/12/01 15:44:40
|
|
@@ -17,7 +17,7 @@
|
|
class KrSqueezedTextLabel;
|
|
class KLineEdit;
|
|
class KComboBox;
|
|
-class KImageFilePreview;
|
|
+class KrusaderImageFilePreview;
|
|
class PanelViewer;
|
|
class DiskUsageViewer;
|
|
|
|
@@ -49,7 +49,7 @@
|
|
|
|
protected:
|
|
QWidgetStack *stack;
|
|
- KImageFilePreview *viewer;
|
|
+ KrusaderImageFilePreview *viewer;
|
|
KrSqueezedTextLabel *dataLine;
|
|
QGuardedPtr<KIO::PreviewJob> pjob;
|
|
KFileTreeView *tree;
|
|
--- krusader/Panel/panelpopup.cpp 2006/12/01 15:44:05 1.1
|
|
+++ krusader/Panel/panelpopup.cpp 2006/12/01 15:44:54
|
|
@@ -117,7 +117,7 @@
|
|
tree->branch( i18n( "Home" ) ) ->root();
|
|
|
|
// create the quickview part ------
|
|
- viewer = new KImageFilePreview(stack);
|
|
+ viewer = new KrusaderImageFilePreview(stack);
|
|
stack->addWidget( viewer, Preview );
|
|
|
|
// create the panelview
|
|
--- krusader/KViewer/kimagefilepreview.h 2006/12/01 15:45:07 1.1
|
|
+++ krusader/KViewer/kimagefilepreview.h 2006/12/01 15:45:26
|
|
@@ -10,8 +10,8 @@
|
|
* License. See the file "COPYING" for the exact licensing terms.
|
|
*/
|
|
|
|
-#ifndef KIMAGEFILEPREVIEW_H
|
|
-#define KIMAGEFILEPREVIEW_H
|
|
+#ifndef KrusaderImageFilePreview_H
|
|
+#define KrusaderImageFilePreview_H
|
|
|
|
#include <qpixmap.h>
|
|
|
|
@@ -26,12 +26,12 @@
|
|
class KFileDialog;
|
|
class KFileItem;
|
|
|
|
-class KImageFilePreview : public KPreviewWidgetBase {
|
|
+class KrusaderImageFilePreview : public KPreviewWidgetBase {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
- KImageFilePreview( QWidget *parent );
|
|
- ~KImageFilePreview();
|
|
+ KrusaderImageFilePreview( QWidget *parent );
|
|
+ ~KrusaderImageFilePreview();
|
|
|
|
virtual QSize sizeHint() const;
|
|
|
|
@@ -63,8 +63,8 @@
|
|
protected:
|
|
virtual void virtual_hook( int id, void* data );
|
|
private:
|
|
- class KImageFilePreviewPrivate;
|
|
- KImageFilePreviewPrivate *d;
|
|
+ class KrusaderImageFilePreviewPrivate;
|
|
+ KrusaderImageFilePreviewPrivate *d;
|
|
};
|
|
|
|
-#endif // KIMAGEFILEPREVIEW_H
|
|
+#endif // KrusaderImageFilePreview_H
|
|
--- krusader/KViewer/kimagefilepreview.cpp 2006/12/01 15:45:09 1.1
|
|
+++ krusader/KViewer/kimagefilepreview.cpp 2006/12/01 15:48:12
|
|
@@ -27,9 +27,9 @@
|
|
|
|
#include "kimagefilepreview.h"
|
|
|
|
-/**** KImageFilePreview ****/
|
|
+/**** KrusaderImageFilePreview ****/
|
|
|
|
-KImageFilePreview::KImageFilePreview( QWidget *parent )
|
|
+KrusaderImageFilePreview::KrusaderImageFilePreview( QWidget *parent )
|
|
: KPreviewWidgetBase( parent ),
|
|
m_job( 0L ) {
|
|
QVBoxLayout *vb = new QVBoxLayout( this, KDialog::marginHint() );
|
|
@@ -46,23 +46,23 @@
|
|
setSupportedMimeTypes( KIO::PreviewJob::supportedMimeTypes() );
|
|
}
|
|
|
|
-KImageFilePreview::~KImageFilePreview() {
|
|
+KrusaderImageFilePreview::~KrusaderImageFilePreview() {
|
|
if ( m_job )
|
|
m_job->kill();
|
|
}
|
|
|
|
-void KImageFilePreview::showPreview() {
|
|
+void KrusaderImageFilePreview::showPreview() {
|
|
// Pass a copy since clearPreview() will clear currentURL
|
|
KURL url = currentURL;
|
|
showPreview( url, true );
|
|
}
|
|
|
|
// called via KPreviewWidgetBase interface
|
|
-void KImageFilePreview::showPreview( const KURL& url ) {
|
|
+void KrusaderImageFilePreview::showPreview( const KURL& url ) {
|
|
showPreview( url, false );
|
|
}
|
|
|
|
-void KImageFilePreview::showPreview( const KURL &url, bool force ) {
|
|
+void KrusaderImageFilePreview::showPreview( const KURL &url, bool force ) {
|
|
if ( !url.isValid() ) {
|
|
clearPreview();
|
|
return ;
|
|
@@ -87,26 +87,26 @@
|
|
}
|
|
}
|
|
|
|
-void KImageFilePreview::resizeEvent( QResizeEvent * ) {
|
|
+void KrusaderImageFilePreview::resizeEvent( QResizeEvent * ) {
|
|
timer->start( 100, true ); // forces a new preview
|
|
}
|
|
|
|
-QSize KImageFilePreview::sizeHint() const {
|
|
+QSize KrusaderImageFilePreview::sizeHint() const {
|
|
return QSize( 20, 200 ); // otherwise it ends up huge???
|
|
}
|
|
|
|
-KIO::PreviewJob * KImageFilePreview::createJob( const KURL& url, int w, int h ) {
|
|
+KIO::PreviewJob * KrusaderImageFilePreview::createJob( const KURL& url, int w, int h ) {
|
|
KURL::List urls;
|
|
urls.append( url );
|
|
return KIO::filePreview( urls, w, h, 0, 0, true, false );
|
|
}
|
|
|
|
-void KImageFilePreview::gotPreview( const KFileItem* item, const QPixmap& pm ) {
|
|
+void KrusaderImageFilePreview::gotPreview( const KFileItem* item, const QPixmap& pm ) {
|
|
if ( item->url() == currentURL ) // should always be the case
|
|
imageLabel->setPixmap( pm );
|
|
}
|
|
|
|
-void KImageFilePreview::slotFailed( const KFileItem* item ) {
|
|
+void KrusaderImageFilePreview::slotFailed( const KFileItem* item ) {
|
|
if ( item->isDir() )
|
|
imageLabel->clear();
|
|
else if ( item->url() == currentURL ) // should always be the case
|
|
@@ -114,12 +114,12 @@
|
|
KIcon::DisabledState ) );
|
|
}
|
|
|
|
-void KImageFilePreview::slotResult( KIO::Job *job ) {
|
|
+void KrusaderImageFilePreview::slotResult( KIO::Job *job ) {
|
|
if ( job == m_job )
|
|
m_job = 0L;
|
|
}
|
|
|
|
-void KImageFilePreview::clearPreview() {
|
|
+void KrusaderImageFilePreview::clearPreview() {
|
|
if ( m_job ) {
|
|
m_job->kill();
|
|
m_job = 0L;
|
|
@@ -129,7 +129,7 @@
|
|
currentURL = KURL();
|
|
}
|
|
|
|
-void KImageFilePreview::virtual_hook( int id, void* data ) {
|
|
+void KrusaderImageFilePreview::virtual_hook( int id, void* data ) {
|
|
KPreviewWidgetBase::virtual_hook( id, data );
|
|
}
|
|
|