• 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.14
  • kdenetwork
  • kopete
  • kopete
  • config
  • appearance
  • layout
TokenPool.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright (C) 2008 Teo Mrnjavac <teo.mrnjavac@gmail.com> *
3  * 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 TOKENPOOL_H
20 #define TOKENPOOL_H
21 
22 #include "Token.h"
23 
24 #include <KListWidget>
25 #include <QMap>
26 
27 //Holds a number of icons representing parts of the filename that will become tokens when dropped on the TokenLayoutWidget.
28 class TokenPool : public KListWidget
29 {
30  Q_OBJECT
31  Q_PROPERTY(QString mimeType READ mimeType WRITE setMimeType)
32 
33  public:
34  TokenPool( QWidget *parent = 0 );
35  void addToken( Token * token );
36 
37  QString mimeType() const;
38  void setMimeType( const QString& mimeType );
39  protected:
40  void mouseDoubleClickEvent( QMouseEvent *event );
41  void mousePressEvent( QMouseEvent *event );
42  void mouseMoveEvent( QMouseEvent *event );
43  void dragEnterEvent( QDragEnterEvent *event );
44  void dragMoveEvent( QDragMoveEvent *event );
45  void dropEvent( QDropEvent *event );
46 
47  signals:
48  void onDoubleClick( Token *token ); //connects to TokenLayoutWidget::addToken( QString )
49 
50  private:
51  void performDrag( QMouseEvent *event );
52  QPoint m_startPos; //needed for starting the drag
53  QString m_mimeType;
54 
55  QMap<QListWidgetItem*,Token*> m_itemTokenMap;
56 };
57 
58 #endif
59 
QWidget
TokenPool::dropEvent
void dropEvent(QDropEvent *event)
Definition: TokenPool.cpp:111
QDragMoveEvent
QMap< QListWidgetItem *, Token * >
QPoint
QMouseEvent
TokenPool::mousePressEvent
void mousePressEvent(QMouseEvent *event)
Definition: TokenPool.cpp:65
TokenPool::addToken
void addToken(Token *token)
Definition: TokenPool.cpp:32
TokenPool::TokenPool
TokenPool(QWidget *parent=0)
Definition: TokenPool.cpp:25
QDropEvent
QString
TokenPool::mimeType
QString mimeType() const
TokenPool::onDoubleClick
void onDoubleClick(Token *token)
QDragEnterEvent
TokenPool::mouseDoubleClickEvent
void mouseDoubleClickEvent(QMouseEvent *event)
Definition: TokenPool.cpp:56
TokenPool
Definition: TokenPool.h:28
TokenPool::mouseMoveEvent
void mouseMoveEvent(QMouseEvent *event)
Definition: TokenPool.cpp:74
Token
Definition: Token.h:38
KListWidget
TokenPool::setMimeType
void setMimeType(const QString &mimeType)
Definition: TokenPool.cpp:48
TokenPool::dragMoveEvent
void dragMoveEvent(QDragMoveEvent *event)
Definition: TokenPool.cpp:99
TokenPool::dragEnterEvent
void dragEnterEvent(QDragEnterEvent *event)
Definition: TokenPool.cpp:87
Token.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:08 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