interfaces Library: byteseditinterface.h Source File (interfaces Library)

| # interfaces Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# byteseditinterface.h

    00001 /***************************************************************************
    00002                           byteseditinterface.h  -  description
    00003                              -------------------
    00004     begin                : Fri Sep 12 2003
    00005     copyright            : (C) 2003 by Friedrich W. H. Kossebau
    00006     email                : Friedrich.W.H@Kossebau.de
    00007  ***************************************************************************/
    00008
    00009 /***************************************************************************
    00010  *                                                                         *
    00011  *   This library is free software; you can redistribute it and/or         *
    00012  *   modify it under the terms of the GNU Library General Public           *
    00013  *   License version 2 as published by the Free Software Foundation.       *
    00014  *                                                                         *
    00015  ***************************************************************************/
    00016
    00017
    00018 #ifndef BYTESEDITINTERFACE_H
    00019 #define BYTESEDITINTERFACE_H
    00020
    00021 // kde specific
    00022 #include <kparts/componentfactory.h>
    00023
    00024 #include <qwidget.h>
    00025
    00032 namespace KHE
    00033 {
    00034
    00076 class BytesEditInterface
    00077 {
    00078   public:
    00079     //static const char Name[] = "KHE::BytesEditInterface";
    00080
    00081   public: // set methods
    00089     virtual void setData( char *D, int S, int RS = -1, bool KM = true ) = 0;
    00091     virtual void setReadOnly( bool RO = true ) = 0;
    00100     virtual void setMaxDataSize( int MS ) = 0;
    00104     virtual void setAutoDelete( bool AD = true ) = 0;
    00106 //    virtual void resetData( char *D, int S, bool Repaint ) = 0;
    00114     virtual void setKeepsMemory( bool KM = true ) = 0;
    00115   //
    00117     virtual void setOverwriteOnly( bool b ) = 0;
    00119     virtual void setOverwriteMode( bool b ) = 0;
    00121     virtual void setModified( bool b ) = 0;
    00122
    00123
    00124   public: // get methods
    00126     virtual char *data() const = 0;
    00128     virtual int dataSize() const = 0;
    00130     virtual int maxDataSize () const = 0;
    00132     virtual bool isAutoDelete() const = 0;
    00134     virtual bool keepsMemory() const = 0;
    00135
    00137     virtual bool isOverwriteMode() const = 0;
    00139     virtual bool isOverwriteOnly() const = 0;
    00141     virtual bool isReadOnly() const = 0;
    00143     virtual bool isModified() const = 0;
    00144
    00145   public: // call for action
    00147     virtual void repaintRange( int i1, int i2 ) = 0;
    00148 };
    00149
    00150
    00156 template<class T>
    00157 inline BytesEditInterface *bytesEditInterface( T *t )
    00158 {
    00159   if( !t )
    00160     return 0;
    00161
    00162   return static_cast<BytesEditInterface*>( t->qt_cast("KHE::BytesEditInterface") );
    00163 }
    00164
    00221 inline QWidget *createBytesEditWidget( QWidget *Parent = 0, const char *Name = 0 )
    00222 {
    00223   return KParts::ComponentFactory::createInstanceFromQuery<QWidget>
    00224       ( QString::fromLatin1("KHexEdit/KBytesEdit"), QString::null, Parent, Name );
    00225 }
    00226
    00227 }
    00228
    00229 #endif

This file is part of the documentation for interfaces Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:34:56 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003