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

kig

  • sources
  • kde-4.12
  • kdeedu
  • kig
  • modes
linkslabel.h
Go to the documentation of this file.
1 // Copyright (C) 2002 Dominique Devriese <devriese@kde.org>
2 
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
12 
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16 // 02110-1301 USA
17 
18 #ifndef KIG_lINKS_LABEL_H
19 #define KIG_lINKS_LABEL_H
20 
21 #include <qwidget.h>
22 
23 #include <vector>
24 #include <utility>
25 
30 class LinksLabel : public QWidget
31 {
32  Q_OBJECT
33 
34 public:
35  LinksLabel( QWidget* parent = 0 );
36  ~LinksLabel();
37 
38  class LinksLabelEditBuf
39  {
40  public:
41  friend class LinksLabel;
42  ~LinksLabelEditBuf() {}
43  private:
44  // declare these private so only LinksLabel can use them...
45  LinksLabelEditBuf() {}
46  typedef std::vector<std::pair<bool,QString> > vec;
47  vec data;
48  };
49 
54  LinksLabelEditBuf startEdit();
58  void addText( const QString& s, LinksLabelEditBuf& buf );
62  void addLink( const QString& s, LinksLabelEditBuf& buf );
67  void applyEdit( LinksLabelEditBuf& buf );
68 
69 signals:
75  void linkClicked( int i );
76 
80  void changed();
81 
82 private slots:
83  void urlClicked();
84 
85 private:
86  class Private;
87  Private* p;
88 };
89 
90 #endif // KDE_URLS_LABEL_H
LinksLabel::applyEdit
void applyEdit(LinksLabelEditBuf &buf)
apply the changes...
Definition: linkslabel.cpp:95
QWidget
LinksLabel::linkClicked
void linkClicked(int i)
the user clicked on a link.
LinksLabel::LinksLabelEditBuf::~LinksLabelEditBuf
~LinksLabelEditBuf()
Definition: linkslabel.h:42
LinksLabel::addLink
void addLink(const QString &s, LinksLabelEditBuf &buf)
add a link...
Definition: linkslabel.cpp:86
LinksLabel::LinksLabel
LinksLabel(QWidget *parent=0)
Definition: linkslabel.cpp:41
LinksLabel::~LinksLabel
~LinksLabel()
Definition: linkslabel.cpp:63
LinksLabel::startEdit
LinksLabelEditBuf startEdit()
start editing, start recording changes in a LinksLabelEditBuf, but don't apply them until after endEd...
Definition: linkslabel.cpp:76
LinksLabel::LinksLabelEditBuf
Definition: linkslabel.h:38
LinksLabel::changed
void changed()
the structure of links and texts was changed
LinksLabel::addText
void addText(const QString &s, LinksLabelEditBuf &buf)
add a piece of normal text.
Definition: linkslabel.cpp:81
LinksLabel
this widget shows a line of text, with some links underlined, and emits a signal if one of the links ...
Definition: linkslabel.h:30
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:35:39 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kig

Skip menu "kig"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

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