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

marble

  • sources
  • kde-4.12
  • kdeedu
  • marble
  • src
  • lib
  • marble
PopupItem.h
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2012 Torsten Rahn <tackat@kde.org>
9 // Copyright 2012 Mohammed Nafees <nafees.technocool@gmail.com>
10 // Copyright 2012 Illya Kovalevskyy <illya.kovalevskyy@gmail.com>
11 //
12 
13 #ifndef POPUPITEM_H
14 #define POPUPITEM_H
15 
16 #include <QObject>
17 #include <QUrl>
18 #include <QLabel>
19 
20 #include "BillboardGraphicsItem.h"
21 #include "ui_WebPopupWidget.h"
22 
23 class QPainter;
24 
25 namespace Marble
26 {
27 
37 class PopupItem : public QObject, public BillboardGraphicsItem
38 {
39  Q_OBJECT
40 public:
41  explicit PopupItem( QObject* parent = 0 );
42  ~PopupItem();
43 
55  bool isPrintButtonVisible() const;
56 
70  void setPrintButtonVisible(bool display);
71 
82  void setUrl( const QUrl &url );
83 
92  void setContent( const QString &html );
93 
105  void setTextColor( const QColor &color );
106 
115  void setBackgroundColor( const QColor &color );
116 
117  virtual bool eventFilter( QObject *, QEvent *e );
118 
119  void clearHistory();
120 
121 private Q_SLOTS:
125  void requestUpdate();
126 
134  void printContent();
135 
151  void updateBackButton();
152 
160  void goBack();
161 
162 protected:
163  void paint( QPainter *painter );
164 
165 Q_SIGNALS:
166  void repaintNeeded();
167  void hide();
168 
169 private:
170  QPixmap pixmap( const QString &imageid ) const;
171  void colorize( QImage &img, const QColor &col ) const;
172  QWidget* transform( QPoint &point ) const;
173 
174  QWidget *m_widget;
175  Ui::WebPopupWidget m_ui;
176  QString m_content;
177  QColor m_textColor;
178  QColor m_backColor;
179  bool m_needMouseRelease;
180 };
181 
182 }
183 
184 #endif
QPainter
BillboardGraphicsItem.h
Marble::BillboardGraphicsItem
Base class for all 2D labels (a.k.a.
Definition: BillboardGraphicsItem.h:32
Marble::PopupItem::repaintNeeded
void repaintNeeded()
Marble::PopupItem::setUrl
void setUrl(const QUrl &url)
Set URL for web window.
Definition: PopupItem.cpp:92
Marble::PopupItem::setTextColor
void setTextColor(const QColor &color)
Sets text color of the header.
Definition: PopupItem.cpp:114
QWidget
QObject
Marble::PopupItem::setPrintButtonVisible
void setPrintButtonVisible(bool display)
Sets visibility of the print button.
Definition: PopupItem.cpp:87
Marble::PopupItem
The PopupItem Class.
Definition: PopupItem.h:37
Marble::PopupItem::setContent
void setContent(const QString &html)
Set content of the popup.
Definition: PopupItem.cpp:106
Marble::PopupItem::PopupItem
PopupItem(QObject *parent=0)
Definition: PopupItem.cpp:37
Marble::PopupItem::eventFilter
virtual bool eventFilter(QObject *, QEvent *e)
Definition: PopupItem.cpp:221
Marble::PopupItem::clearHistory
void clearHistory()
Definition: PopupItem.cpp:324
Marble::PopupItem::isPrintButtonVisible
bool isPrintButtonVisible() const
Print button visibility indicator.
Definition: PopupItem.cpp:82
Marble::PopupItem::paint
void paint(QPainter *painter)
Paints the item in item coordinates.
Definition: PopupItem.cpp:147
Marble::PopupItem::hide
void hide()
Marble::PopupItem::setBackgroundColor
void setBackgroundColor(const QColor &color)
Sets background color of the bubble.
Definition: PopupItem.cpp:124
Marble::PopupItem::~PopupItem
~PopupItem()
Definition: PopupItem.cpp:77
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

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

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

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