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

libs/libksane/libksane

  • sources
  • kde-4.14
  • kdegraphics
  • libs
  • libksane
  • libksane
selectionitem.h
Go to the documentation of this file.
1 /* ============================================================
2 *
3 * This file is part of the KDE project
4 *
5 * Date : 2008-11-15
6 * Description :Selection QGraphicsItem for the image viewer.
7 *
8 * Copyright (C) 2008 by Kare Sars <kare dot sars at iki dot fi>
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) version 3, or any
14 * later version accepted by the membership of KDE e.V. (or its
15 * successor approved by the membership of KDE e.V.), which shall
16 * act as a proxy defined in Section 6 of version 3 of the license.
17 *
18 * This library is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * Lesser General Public License for more details.
22 *
23 * You should have received a copy of the GNU Lesser General Public
24 * License along with this program. If not, see <http://www.gnu.org/licenses/>.
25 *
26 * ============================================================ */
27 #ifndef SELECTIONITEM_H
28 #define SELECTIONITEM_H
29 
30 #include <QGraphicsPixmapItem>
31 #include <QPainter>
32 
33 namespace KSaneIface
34 {
35 
36 class SelectionItem : public QGraphicsItem
37 {
38  public:
39  typedef enum
40  {
41  None,
42  Top,
43  TopRight,
44  Right,
45  BottomRight,
46  Bottom,
47  BottomLeft,
48  Left,
49  TopLeft,
50  Move,
51  AddRemove
52  } Intersects;
53 
54  explicit SelectionItem(QRectF rect);
55  ~SelectionItem();
56 
57  void setMaxRight(qreal maxRight);
58  void setMaxBottom(qreal maxBottom);
59  void setSaved(bool isSaved);
60 
61  Intersects intersects(QPointF point);
62 
63  void saveZoom(qreal zoom);
64 
65  void setRect(QRectF rect);
66  QPointF fixTranslation(QPointF dp);
67  QRectF rect();
68 
69  public:
70  // Graphics Item methods
71  QRectF boundingRect() const;
72  void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
73 
74  private:
75  struct Private;
76  Private * const d;
77 };
78 
79 } // NameSpace KSaneIface
80 
81 #endif
82 
QWidget
KSaneIface::SelectionItem::None
Definition: selectionitem.h:41
KSaneIface::SelectionItem::Right
Definition: selectionitem.h:44
KSaneIface::SelectionItem::saveZoom
void saveZoom(qreal zoom)
Definition: selectionitem.cpp:92
KSaneIface::SelectionItem::paint
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
Definition: selectionitem.cpp:238
QGraphicsItem
KSaneIface::SelectionItem::rect
QRectF rect()
Definition: selectionitem.cpp:212
KSaneIface::SelectionItem
Definition: selectionitem.h:36
KSaneIface::SelectionItem::Move
Definition: selectionitem.h:50
KSaneIface::SelectionItem::Intersects
Intersects
Definition: selectionitem.h:39
KSaneIface::SelectionItem::SelectionItem
SelectionItem(QRectF rect)
Definition: selectionitem.cpp:62
KSaneIface::SelectionItem::Top
Definition: selectionitem.h:42
QPointF
KSaneIface::SelectionItem::setMaxBottom
void setMaxBottom(qreal maxBottom)
Definition: selectionitem.cpp:128
KSaneIface::SelectionItem::Left
Definition: selectionitem.h:48
QPainter
KSaneIface::SelectionItem::intersects
Intersects intersects(QPointF point)
Definition: selectionitem.cpp:135
KSaneIface::SelectionItem::setSaved
void setSaved(bool isSaved)
Definition: selectionitem.cpp:105
KSaneIface::SelectionItem::TopLeft
Definition: selectionitem.h:49
KSaneIface::SelectionItem::setMaxRight
void setMaxRight(qreal maxRight)
Definition: selectionitem.cpp:121
KSaneIface::SelectionItem::TopRight
Definition: selectionitem.h:43
QRectF
KSaneIface::SelectionItem::BottomLeft
Definition: selectionitem.h:47
QStyleOptionGraphicsItem
KSaneIface::SelectionItem::~SelectionItem
~SelectionItem()
Definition: selectionitem.cpp:87
KSaneIface::SelectionItem::AddRemove
Definition: selectionitem.h:51
KSaneIface::SelectionItem::boundingRect
QRectF boundingRect() const
Definition: selectionitem.cpp:217
KSaneIface::SelectionItem::Bottom
Definition: selectionitem.h:46
KSaneIface::SelectionItem::setRect
void setRect(QRectF rect)
Definition: selectionitem.cpp:185
KSaneIface::SelectionItem::fixTranslation
QPointF fixTranslation(QPointF dp)
Definition: selectionitem.cpp:203
KSaneIface::SelectionItem::BottomRight
Definition: selectionitem.h:45
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:19:47 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libs/libksane/libksane

Skip menu "libs/libksane/libksane"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdegraphics API Reference

Skip menu "kdegraphics API Reference"
  •     libkdcraw
  •     libkexiv2
  •     libkipi
  •     libksane
  • okular

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