Qt logo

qpicture.h


This is the verbatim text of the qpicture.h include file. It is is provided only for illustration; the copyright remains with Troll Tech.
/****************************************************************************
** $Id: qpicture.h,v 2.6.2.2 1998/08/21 19:13:23 hanord Exp $
**
** Definition of QPicture class
**
** Created : 940729
**
** Copyright (C) 1992-1998 Troll Tech AS.  All rights reserved.
**
** This file is part of Troll Tech's internal development tree for Qt.
**
** This header text will be replaced by an appropriate text by the
** mkdist script which generates external distributions.
**
** If you are using the Qt Professional Edition or the Qt Free Edition,
** please notify Troll Tech at <info@troll.no> if you see this text.
**
** To Troll Tech developers: This header was generated by the script
** fixcopyright-int. It has the same number of text lines as the free
** and professional editions to avoid line number inconsistency.
**
*****************************************************************************/

#ifndef QPICTURE_H
#define QPICTURE_H

#ifndef QT_H
#include "qpaintdevice.h"
#include "qbuffer.h"
#endif // QT_H


class Q_EXPORT QPicture : public QPaintDevice           // picture class
{
public:
    QPicture();
   ~QPicture();

    bool        isNull() const;

    uint        size() const;
    const char *data() const;
    void        setData( const char *data, uint size );

    bool        play( QPainter * );

    bool        load( const char *fileName );
    bool        save( const char *fileName );

protected:
    bool        cmd( int, QPainter *, QPDevCmdParam * );
    int         metric( int ) const;

private:
    bool        exec( QPainter *, QDataStream &, int );
    QBuffer     pictb;
    int         trecs;
    bool        formatOk;

private:        // Disabled copy constructor and operator=
#if defined(Q_DISABLE_COPY)
    QPicture( const QPicture & );
    QPicture &operator=( const QPicture & );
#endif
};


inline bool QPicture::isNull() const
{
    return pictb.buffer().isNull();
}

inline uint QPicture::size() const
{
    return pictb.buffer().size();
}

inline const char *QPicture::data() const
{
    return pictb.buffer().data();
}


#endif // QPICTURE_H


Copyright © 1998 Troll TechTrademarks
Qt version 1.41