KHexEdit
valuecolumninterface.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 valuecolumninterface.h - description 00003 ------------------- 00004 begin : Fri Sep 12 2003 00005 copyright : (C) 2003 by Friedrich W. H. Kossebau 00006 email : kossebau@kde.org 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 KHE_VALUECOLUMNINTERFACE_H 00019 #define KHE_VALUECOLUMNINTERFACE_H 00020 00021 #include <QtCore/QObject> 00022 00023 namespace KHE 00024 { 00025 00033 class ValueColumnInterface 00034 { 00035 public: 00036 virtual ~ValueColumnInterface() {} 00037 00038 public: 00040 enum KCoding 00041 { 00043 HexadecimalCoding=0, 00045 DecimalCoding=1, 00047 OctalCoding=2, 00049 BinaryCoding=3, 00051 MaxCodingId=0xFFFF 00052 }; 00053 00055 enum KResizeStyle 00056 { 00060 NoResize=0, 00065 LockGrouping=1, 00068 FullSizeUsage=2, 00070 MaxResizeStyleId=0xFF 00071 }; 00072 00073 00074 public: // get methods 00078 virtual KResizeStyle resizeStyle() const = 0; 00082 virtual int noOfBytesPerLine() const = 0; 00083 00087 virtual KCoding coding() const = 0; 00091 virtual int byteSpacingWidth() const = 0; 00092 00096 virtual int noOfGroupedBytes() const = 0; 00100 virtual int groupSpacingWidth() const = 0; 00101 00105 virtual int binaryGapWidth() const = 0; 00106 00107 00108 public: // set methods 00114 virtual void setResizeStyle( KResizeStyle Style ) = 0; 00120 virtual void setNoOfBytesPerLine( int NoCpL ) = 0; 00121 00128 virtual void setCoding( KCoding C ) = 0; 00134 virtual void setByteSpacingWidth( int BSW ) = 0; 00135 00141 virtual void setNoOfGroupedBytes( int NoGB ) = 0; 00147 virtual void setGroupSpacingWidth( int GSW ) = 0; 00148 00154 virtual void setBinaryGapWidth( int BGW ) = 0; 00155 }; 00156 00157 00162 template<class T> 00163 ValueColumnInterface *valueColumnInterface( T *t ) 00164 { 00165 return t ? qobject_cast<KHE::ValueColumnInterface *>( t ) : 0; 00166 } 00167 00168 } 00169 00170 Q_DECLARE_INTERFACE( KHE::ValueColumnInterface, "org.kde.khe.valuecolumninterface/1.0" ) 00171 00172 #endif