You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.2 KiB
50 lines
1.2 KiB
15 years ago
|
/*
|
||
|
* 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"
|
||
15 years ago
|
#include <tqstringlist.h>
|
||
15 years ago
|
|
||
|
class KPreviewWidgetBase::KPreviewWidgetBasePrivate
|
||
|
{
|
||
|
public:
|
||
15 years ago
|
TQStringList supportedMimeTypes;
|
||
15 years ago
|
};
|
||
|
|
||
15 years ago
|
TQPtrDict<KPreviewWidgetBase::KPreviewWidgetBasePrivate> * KPreviewWidgetBase::s_private;
|
||
15 years ago
|
|
||
15 years ago
|
KPreviewWidgetBase::KPreviewWidgetBase( TQWidget *parent, const char *name )
|
||
|
: TQWidget( parent, name )
|
||
15 years ago
|
{
|
||
|
if ( !s_private )
|
||
15 years ago
|
s_private = new TQPtrDict<KPreviewWidgetBasePrivate>();
|
||
15 years ago
|
|
||
|
s_private->insert( this, new KPreviewWidgetBasePrivate() );
|
||
|
}
|
||
|
|
||
|
KPreviewWidgetBase::~KPreviewWidgetBase()
|
||
|
{
|
||
|
s_private->remove( this );
|
||
|
if ( s_private->isEmpty() )
|
||
|
{
|
||
|
delete s_private;
|
||
|
s_private = 0L;
|
||
|
}
|
||
|
}
|
||
|
|
||
15 years ago
|
void KPreviewWidgetBase::setSupportedMimeTypes( const TQStringList& mimeTypes )
|
||
15 years ago
|
{
|
||
|
d()->supportedMimeTypes = mimeTypes;
|
||
|
}
|
||
|
|
||
15 years ago
|
TQStringList KPreviewWidgetBase::supportedMimeTypes() const
|
||
15 years ago
|
{
|
||
|
return d()->supportedMimeTypes;
|
||
|
}
|
||
|
|
||
|
#include "kpreviewwidgetbase.moc"
|