diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | ce4a32fe52ef09d8f5ff1dd22c001110902b60a2 (patch) | |
tree | 5ac38a06f3dde268dc7927dc155896926aaf7012 /kio/kfile/kpreviewwidgetbase.cpp | |
download | tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.tar.gz tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kio/kfile/kpreviewwidgetbase.cpp')
-rw-r--r-- | kio/kfile/kpreviewwidgetbase.cpp | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/kio/kfile/kpreviewwidgetbase.cpp b/kio/kfile/kpreviewwidgetbase.cpp new file mode 100644 index 000000000..43b2b5fdc --- /dev/null +++ b/kio/kfile/kpreviewwidgetbase.cpp @@ -0,0 +1,49 @@ +/* + * This file is part of the KDE project. + * Copyright (C) 2003 Carsten Pfeiffer <pfeiffer@kde.org> + * + * You can Freely distribute this program under the GNU Library General Public + * License. See the file "COPYING" for the exact licensing terms. + */ + +#include "kpreviewwidgetbase.h" +#include <qstringlist.h> + +class KPreviewWidgetBase::KPreviewWidgetBasePrivate +{ +public: + QStringList supportedMimeTypes; +}; + +QPtrDict<KPreviewWidgetBase::KPreviewWidgetBasePrivate> * KPreviewWidgetBase::s_private; + +KPreviewWidgetBase::KPreviewWidgetBase( QWidget *parent, const char *name ) + : QWidget( parent, name ) +{ + if ( !s_private ) + s_private = new QPtrDict<KPreviewWidgetBasePrivate>(); + + s_private->insert( this, new KPreviewWidgetBasePrivate() ); +} + +KPreviewWidgetBase::~KPreviewWidgetBase() +{ + s_private->remove( this ); + if ( s_private->isEmpty() ) + { + delete s_private; + s_private = 0L; + } +} + +void KPreviewWidgetBase::setSupportedMimeTypes( const QStringList& mimeTypes ) +{ + d()->supportedMimeTypes = mimeTypes; +} + +QStringList KPreviewWidgetBase::supportedMimeTypes() const +{ + return d()->supportedMimeTypes; +} + +#include "kpreviewwidgetbase.moc" |