• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.10.5 API Reference
  • KDE Home
  • Contact Us
 

KHexEdit

  • interfaces
  • khexedit
byteseditinterface.h
Go to the documentation of this file.
1 /***************************************************************************
2  byteseditinterface.h - description
3  -------------------
4  begin : Fri Sep 12 2003
5  copyright : (C) 2003 by Friedrich W. H. Kossebau
6  email : kossebau@kde.org
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This library is free software; you can redistribute it and/or *
12  * modify it under the terms of the GNU Library General Public *
13  * License version 2 as published by the Free Software Foundation. *
14  * *
15  ***************************************************************************/
16 
17 
18 #ifndef KHE_BYTESEDITINTERFACE_H
19 #define KHE_BYTESEDITINTERFACE_H
20 
21 // KDE
22 #include <kservicetypetrader.h>
23 // Qt
24 #include <QtGui/QWidget>
25 
30 namespace KHE
31 {
32 
73 class BytesEditInterface
74 {
75  public:
76  virtual ~BytesEditInterface() {}
77 
78  public: // set methods
86  virtual void setData( char *D, int S, int RS = -1, bool KM = true ) = 0;
88  virtual void setReadOnly( bool RO = true ) = 0;
97  virtual void setMaxDataSize( int MS ) = 0;
101  virtual void setAutoDelete( bool AD = true ) = 0;
103 // virtual void resetData( char *D, int S, bool Repaint ) = 0;
111  virtual void setKeepsMemory( bool KM = true ) = 0;
112  //
114  virtual void setOverwriteOnly( bool b ) = 0;
116  virtual void setOverwriteMode( bool b ) = 0;
118  virtual void setModified( bool b ) = 0;
119 
120 
121  public: // get methods
123  virtual char *data() const = 0;
125  virtual int dataSize() const = 0;
127  virtual int maxDataSize () const = 0;
129  virtual bool isAutoDelete() const = 0;
131  virtual bool keepsMemory() const = 0;
132 
134  virtual bool isOverwriteMode() const = 0;
136  virtual bool isOverwriteOnly() const = 0;
138  virtual bool isReadOnly() const = 0;
140  virtual bool isModified() const = 0;
141 
142  public: // call for action
144  virtual void repaintRange( int i1, int i2 ) = 0;
145 };
146 
147 
152 template<class T>
153 inline BytesEditInterface *bytesEditInterface( T *t )
154 {
155  return t ? qobject_cast<KHE::BytesEditInterface *>( t ) : 0;
156 }
157 
165 inline QWidget *createBytesEditWidget( QWidget *Parent = 0 )
166 {
167  return KServiceTypeTrader::createInstanceFromQuery<QWidget>
168  ( QString::fromLatin1("KHexEdit/KBytesEdit"), QString(), Parent );
169 }
170 
171 }
172 
173 Q_DECLARE_INTERFACE( KHE::BytesEditInterface, "org.kde.khe.byteseditinterface/1.0" )
174 
175 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Mon Jul 15 2013 13:10:10 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHexEdit

Skip menu "KHexEdit"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Members
  • File List
  • Related Pages

kdelibs-4.10.5 API Reference

Skip menu "kdelibs-4.10.5 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal