• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

okteta

  • sources
  • kde-4.12
  • kdesdk
  • okteta
  • gui
offsetcolumnrenderer.h
Go to the documentation of this file.
1 /*
2  This file is part of the Okteta Gui library, made within the KDE community.
3 
4  Copyright 2003,2008 Friedrich W. H. Kossebau <kossebau@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) version 3, or any
10  later version accepted by the membership of KDE e.V. (or its
11  successor approved by the membership of KDE e.V.), which shall
12  act as a proxy defined in Section 6 of version 3 of the license.
13 
14  This library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public
20  License along with this library. If not, see <http://www.gnu.org/licenses/>.
21 */
22 
23 #ifndef OKTETA_OFFSETCOLUMNRENDERER_H
24 #define OKTETA_OFFSETCOLUMNRENDERER_H
25 
26 // lib
27 #include "offsetformat.h"
28 #include "abstractcolumnrenderer.h"
29 #include "line.h"
30 
31 class QFontMetrics;
32 
33 
34 namespace Okteta
35 {
36 class ByteArrayTableLayout;
37 
42 class OKTETAGUI_EXPORT OffsetColumnRenderer : public AbstractColumnRenderer
43 {
44  public:
45  OffsetColumnRenderer( AbstractColumnStylist* stylist, ByteArrayTableLayout* layout, OffsetFormat::Format format );
46  virtual ~OffsetColumnRenderer();
47 
48  public: // AbstractColumnRenderer API
49  virtual void renderFirstLine( QPainter* painter, const PixelXRange& Xs, Line firstLineIndex );
50  virtual void renderNextLine( QPainter* painter );
51  virtual void renderColumn( QPainter* painter, const PixelXRange& Xs, const PixelYRange& Ys );
52  virtual void renderEmptyColumn( QPainter *painter, const PixelXRange &Xs, const PixelYRange &Ys );
53 
54  public:
55  void setFormat( OffsetFormat::Format format, const QFontMetrics& fontMetrics );
56  KDE_DEPRECATED void setFormat( OffsetFormat::Format format );
57  void setFontMetrics( const QFontMetrics& fontMetrics );
58 
59  public: // read access
60 // int delta() const;
61  OffsetFormat::Format format() const;
62  OffsetFormat::print printFunction() const;
63 
64 
65  protected:
67  void recalcX();
69  void renderLine( QPainter *painter, Line lineIndex );
71  void renderColumnBackground( QPainter* painter, const PixelXRange& Xs, const PixelYRange& Ys );
72 
73  protected: // user settings
74  ByteArrayTableLayout* mLayout;
75 
76  protected: // pixel related
78  PixelX mOffsetTextWidth;
80  PixelY mDigitBaseLine;
81 
82  protected: // general layout
83  OffsetFormat::Format mFormat;
84 
85  OffsetFormat::print PrintFunction;
86 
88  mutable char mCodedOffset[OffsetFormat::MaxFormatWidth+1];
89 
90  protected: // firstnext trips related
92  Line mRenderLineIndex;
93 };
94 
95 
96 inline OffsetFormat::print OffsetColumnRenderer::printFunction() const { return PrintFunction; }
97 inline OffsetFormat::Format OffsetColumnRenderer::format() const { return mFormat; }
98 
99 
100 }
101 
102 #endif
Okteta::OffsetColumnRenderer::mRenderLineIndex
Line mRenderLineIndex
Definition: offsetcolumnrenderer.h:92
OKTETAGUI_EXPORT
#define OKTETAGUI_EXPORT
Definition: oktetagui_export.h:36
Okteta::OffsetColumnRenderer
Definition: offsetcolumnrenderer.h:42
Okteta::OffsetColumnRenderer::format
OffsetFormat::Format format() const
Definition: offsetcolumnrenderer.h:97
KDE::NumberRange< PixelX >
Okteta::OffsetFormat::print
void(* print)(char *Buffer, unsigned int Offset)
Definition: offsetformat.h:41
Okteta::OffsetFormat::Format
Format
Definition: offsetformat.h:43
Okteta::OffsetColumnRenderer::printFunction
OffsetFormat::print printFunction() const
Definition: offsetcolumnrenderer.h:96
Okteta::Line
qint32 Line
Definition: line.h:33
Okteta::AbstractColumnStylist
Definition: abstractcolumnstylist.h:38
Okteta::ByteArrayTableLayout
the logical layout of a byte array table for a view
Definition: bytearraytablelayout.h:61
Okteta::PixelX
int PixelX
Definition: kadds.h:34
Okteta::OffsetFormat::MaxFormatWidth
static const int MaxFormatWidth
Definition: offsetformat.h:45
abstractcolumnrenderer.h
Okteta::OffsetColumnRenderer::mLayout
ByteArrayTableLayout * mLayout
Definition: offsetcolumnrenderer.h:74
offsetformat.h
Okteta::OffsetColumnRenderer::mFormat
OffsetFormat::Format mFormat
Definition: offsetcolumnrenderer.h:83
Okteta::OffsetColumnRenderer::mDigitBaseLine
PixelY mDigitBaseLine
Definition: offsetcolumnrenderer.h:80
Okteta::AbstractColumnRenderer
base class for columns of the ColumnsView
Definition: abstractcolumnrenderer.h:46
Okteta::OffsetColumnRenderer::mOffsetTextWidth
PixelX mOffsetTextWidth
Definition: offsetcolumnrenderer.h:78
Okteta::OffsetColumnRenderer::PrintFunction
OffsetFormat::print PrintFunction
Definition: offsetcolumnrenderer.h:85
Okteta::PixelY
int PixelY
Definition: kadds.h:35
line.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

okteta

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

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

Search



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