• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.11.3 API Reference
  • KDE Home
  • Contact Us
 

akonadi

  • akonadi
  • contact
  • editor
kedittagsdialog_p.h
1 /*****************************************************************************
2  * Copyright (C) 2009 by Peter Penz <peter.penz@gmx.at> *
3  * *
4  * This library is free software; you can redistribute it and/or *
5  * modify it under the terms of the GNU Library General Public *
6  * License version 2 as published by the Free Software Foundation. *
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  * Library General Public License for more details. *
12  * *
13  * You should have received a copy of the GNU Library General Public License *
14  * along with this library; see the file COPYING.LIB. If not, write to *
15  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *
16  * Boston, MA 02110-1301, USA. *
17  *****************************************************************************/
18 
19 #ifndef KEDIT_TAGS_DIALOG_H
20 #define KEDIT_TAGS_DIALOG_H
21 
22 #include <kdialog.h>
23 #include <nepomuk2/tag.h>
24 
25 class KLineEdit;
26 class QListWidget;
27 class QListWidgetItem;
28 class QPushButton;
29 class QTimer;
30 
39 class KEditTagsDialog : public KDialog
40 {
41  Q_OBJECT
42 
43 public:
44  explicit KEditTagsDialog(const QVector<Nepomuk2::Tag>& tags,
45  QWidget* parent = 0,
46  Qt::WindowFlags flags = 0);
47 
48  virtual ~KEditTagsDialog();
49 
50  QVector<Nepomuk2::Tag> tags() const;
51 
52  virtual bool eventFilter(QObject* watched, QEvent* event);
53 
54 protected slots:
55  virtual void slotButtonClicked(int button);
56 
57 private slots:
58  void slotTextEdited(const QString& text);
59  void slotItemEntered(QListWidgetItem* item);
60  void showDeleteButton();
61  void deleteTag();
62 
63 private:
64  void loadTags();
65  void removeNewTagItem();
66 
67 private:
68  void writeConfig();
69  void readConfig();
70  enum ItemType {
71  UrlTag = Qt::UserRole + 1
72  };
73 
74  QVector<Nepomuk2::Tag> m_tags;
75  QListWidget* m_tagsList;
76  QListWidgetItem* m_newTagItem;
77  QListWidgetItem* m_deleteCandidate;
78  KLineEdit* m_newTagEdit;
79 
80  QPushButton* m_deleteButton;
81  QTimer* m_deleteButtonTimer;
82 };
83 
84 #endif
KEditTagsDialog
Dialog to edit a list of Nepomuk tags.
Definition: kedittagsdialog_p.h:39
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Nov 26 2013 09:03:18 by doxygen 1.8.5 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

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

kdepimlibs-4.11.3 API Reference

Skip menu "kdepimlibs-4.11.3 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
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