summaryrefslogtreecommitdiffstats
path: root/kio/kfile/kpreviewwidgetbase.cpp
blob: 979da919ebab132503c772c8cc97b3fdcc346e9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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 <tqstringlist.h>

class KPreviewWidgetBase::KPreviewWidgetBasePrivate
{
public:
    TQStringList supportedMimeTypes;
};

TQPtrDict<KPreviewWidgetBase::KPreviewWidgetBasePrivate> * KPreviewWidgetBase::s_private;

KPreviewWidgetBase::KPreviewWidgetBase( TQWidget *parent, const char *name )
    : TQWidget( parent, name )
{
    if ( !s_private )
        s_private = new TQPtrDict<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 TQStringList& mimeTypes )
{
    d()->supportedMimeTypes = mimeTypes;
}

TQStringList KPreviewWidgetBase::supportedMimeTypes() const
{
    return d()->supportedMimeTypes;
}

#include "kpreviewwidgetbase.moc"