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

kopete/kopete

  • sources
  • kde-4.12
  • kdenetwork
  • kopete
  • kopete
  • config
  • appearance
  • layout
Token.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright (C) 2008 Teo Mrnjavac <teo.mrnjavac@gmail.com> *
3  * (C) 2008-2009 Seb Ruiz <ruiz@kde.org> *
4  * *
5  * This program is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU General Public License as *
7  * published by the Free Software Foundation; either version 2 of *
8  * the License, or (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program. If not, see <http://www.gnu.org/licenses/>. *
17  ******************************************************************************/
18 
19 #ifndef AMAROK_TOKEN_H
20 #define AMAROK_TOKEN_H
21 
22 #include <KIcon>
23 #include <QWidget>
24 #include <QLabel>
25 #include <QPixmap>
26 
27 class Token;
28 
29 class TokenFactory
30 {
31 
32 public:
33  virtual ~TokenFactory() {}
34  virtual Token * createToken( const QString &text, const QString &iconName, int value, QWidget *parent = 0 );
35 };
36 
37 //Defines a part of a filename, drag&droppable in the TokenLayoutWidget bar from the TokenPool list.
38 class Token : public QWidget
39 {
40  Q_OBJECT
41 
42  public:
43 
44  explicit Token( const QString &text, const QString &iconName, int value, QWidget *parent = 0 );
45 
46  KIcon icon() const;
47  QString iconName() const;
48  QString name() const;
49  int value() const;
50 
51  signals:
52  void changed();
53 
54  protected:
55  virtual void paintEvent(QPaintEvent *pe);
56 
57  protected:
58 
59  QString m_name;
60  KIcon m_icon;
61  QString m_iconName;
62  int m_value;
63 
64  QLabel *m_iconContainer;
65  QLabel *m_label;
66 };
67 
68 #endif // AMAROK_TOKEN_H
69 
Token::m_value
int m_value
Definition: Token.h:62
TokenFactory::~TokenFactory
virtual ~TokenFactory()
Definition: Token.h:33
Token::changed
void changed()
QWidget
Token::m_label
QLabel * m_label
Definition: Token.h:65
Token::value
int value() const
Definition: Token.cpp:83
Token::name
QString name() const
Definition: Token.cpp:77
Token::m_icon
KIcon m_icon
Definition: Token.h:60
Token::icon
KIcon icon() const
Definition: Token.cpp:89
Token::m_name
QString m_name
Definition: Token.h:59
Token::paintEvent
virtual void paintEvent(QPaintEvent *pe)
Definition: Token.cpp:99
Token::m_iconContainer
QLabel * m_iconContainer
Definition: Token.h:64
QLabel
TokenFactory::createToken
virtual Token * createToken(const QString &text, const QString &iconName, int value, QWidget *parent=0)
Definition: Token.cpp:29
TokenFactory
Definition: Token.h:29
Token
Definition: Token.h:38
Token::iconName
QString iconName() const
Definition: Token.cpp:94
Token::m_iconName
QString m_iconName
Definition: Token.h:61
Token::Token
Token(const QString &text, const QString &iconName, int value, QWidget *parent=0)
Definition: Token.cpp:35
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:53:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kopete/kopete

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

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

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