• 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
  • kasten
  • controllers
  • view
  • print
abstractcolumnframerenderer.h
Go to the documentation of this file.
1 /*
2  This file is part of the Okteta Kasten module, 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 ABSTRACTCOLUMNFRAMERENDERER_H
24 #define ABSTRACTCOLUMNFRAMERENDERER_H
25 
26 
27 // lib
28 #include "abstractframerenderer.h"
29 // Okteta gui
30 #include <kadds.h>
31 #include <line.h>
32 // Okteta core
33 #include <addressrange.h>
34 // Qt
35 #include <QtCore/QList>
36 
37 namespace Okteta {
38 class AbstractColumnRenderer;
39 }
40 
41 
42 class AbstractColumnFrameRendererPrivate;
43 
50 class AbstractColumnFrameRenderer : public AbstractFrameRenderer
51 {
52  public:
53  AbstractColumnFrameRenderer();
54  virtual ~AbstractColumnFrameRenderer();
55 
56  public: // AbstractFrameRenderer API
57 // virtual int height() const;
58 // virtual int width() const;
59  virtual void renderFrame( QPainter* painter, int frameIndex );
60 
61  public: // data-wise sizes
63  Okteta::LineSize noOfLines() const;
67  Okteta::LineSize noOfLinesPerFrame() const;
68 
69  public: // pixel-wise sizes
71  Okteta::PixelY lineHeight() const;
73  Okteta::PixelX columnsWidth() const;
75  Okteta::PixelY columnsHeight() const;
76 
77  public:
79  void setColumnsPos( Okteta::PixelX x, Okteta::PixelY y );
80 
81  protected: // our API
83  virtual void drawEmptyArea( QPainter* painter, int cx, int cy, int cw, int ch );
84 
85  protected: //
90  virtual void setLineHeight( Okteta::PixelY NewLineHeight );
95  virtual void setNoOfLines( Okteta::LineSize NewNoOfLines );
96 
97  protected:
99  void addColumn( Okteta::AbstractColumnRenderer* column );
100  void removeColumn( Okteta::AbstractColumnRenderer* column );
101 
102  protected: // recalculations
104  void updateWidths();
105 
106  private:
107  AbstractColumnFrameRendererPrivate* const d;
108 };
109 
110 #endif
AbstractColumnFrameRenderer::updateWidths
void updateWidths()
recalculates the positions of the columns and the total width
Definition: abstractcolumnframerenderer.cpp:115
AbstractColumnFrameRenderer::noOfLines
Okteta::LineSize noOfLines() const
returns the number of all lines
Definition: abstractcolumnframerenderer.cpp:85
AbstractColumnFrameRenderer::AbstractColumnFrameRenderer
AbstractColumnFrameRenderer()
Definition: abstractcolumnframerenderer.cpp:79
AbstractFrameRenderer
Definition: abstractframerenderer.h:32
AbstractColumnFrameRenderer::~AbstractColumnFrameRenderer
virtual ~AbstractColumnFrameRenderer()
Definition: abstractcolumnframerenderer.cpp:256
AbstractColumnFrameRenderer::noOfLinesPerFrame
Okteta::LineSize noOfLinesPerFrame() const
returns number of fully visible lines, at least 1 (as needed by page down/up) doesn't care about the ...
Definition: abstractcolumnframerenderer.cpp:121
abstractframerenderer.h
AbstractColumnFrameRenderer
class to render columns with the same lineheight for all lines
Definition: abstractcolumnframerenderer.h:50
AbstractFrameRenderer::x
int x() const
Definition: abstractframerenderer.cpp:47
AbstractColumnFrameRenderer::setLineHeight
virtual void setLineHeight(Okteta::PixelY NewLineHeight)
sets height of all lines and propagates this information to all columns doesn't update the content si...
Definition: abstractcolumnframerenderer.cpp:100
AbstractColumnFrameRenderer::columnsHeight
Okteta::PixelY columnsHeight() const
returns the height of all lines together
Definition: abstractcolumnframerenderer.cpp:88
AbstractColumnFrameRenderer::drawEmptyArea
virtual void drawEmptyArea(QPainter *painter, int cx, int cy, int cw, int ch)
draws area without columns in columns coordinates
Definition: abstractcolumnframerenderer.cpp:250
Okteta::PixelX
int PixelX
Definition: kadds.h:34
addressrange.h
AbstractColumnFrameRenderer::setColumnsPos
void setColumnsPos(Okteta::PixelX x, Okteta::PixelY y)
AbstractColumnFrameRenderer::removeColumn
void removeColumn(Okteta::AbstractColumnRenderer *column)
Definition: abstractcolumnframerenderer.cpp:145
AbstractColumnFrameRenderer::setNoOfLines
virtual void setNoOfLines(Okteta::LineSize NewNoOfLines)
sets the number of lines doesn't update the content size
Definition: abstractcolumnframerenderer.cpp:91
AbstractColumnFrameRenderer::renderFrame
virtual void renderFrame(QPainter *painter, int frameIndex)
Definition: abstractcolumnframerenderer.cpp:157
AbstractColumnFrameRenderer::lineHeight
Okteta::PixelY lineHeight() const
returns the height of each line
Definition: abstractcolumnframerenderer.cpp:86
AbstractColumnFrameRenderer::columnsWidth
Okteta::PixelX columnsWidth() const
returns the width of all visible columns together
Definition: abstractcolumnframerenderer.cpp:89
AbstractColumnFrameRenderer::addColumn
void addColumn(Okteta::AbstractColumnRenderer *column)
takes ownership of column renderer
Definition: abstractcolumnframerenderer.cpp:137
kadds.h
Okteta::AbstractColumnRenderer
base class for columns of the ColumnsView
Definition: abstractcolumnrenderer.h:46
AbstractFrameRenderer::y
int y() const
Definition: abstractframerenderer.cpp:48
Okteta::LineSize
qint32 LineSize
Definition: line.h:34
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:06 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