akonadi/contact
kedittagsdialog_p.h
00001 /***************************************************************************** 00002 * Copyright (C) 2009 by Peter Penz <peter.penz@gmx.at> * 00003 * * 00004 * This library is free software; you can redistribute it and/or * 00005 * modify it under the terms of the GNU Library General Public * 00006 * License version 2 as published by the Free Software Foundation. * 00007 * * 00008 * This library is distributed in the hope that it will be useful, * 00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00011 * Library General Public License for more details. * 00012 * * 00013 * You should have received a copy of the GNU Library General Public License * 00014 * along with this library; see the file COPYING.LIB. If not, write to * 00015 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 00016 * Boston, MA 02110-1301, USA. * 00017 *****************************************************************************/ 00018 00019 #ifndef KEDIT_TAGS_DIALOG_H 00020 #define KEDIT_TAGS_DIALOG_H 00021 00022 #include <kdialog.h> 00023 #include <nepomuk/tag.h> 00024 00025 class KLineEdit; 00026 class QListWidget; 00027 class QListWidgetItem; 00028 class QPushButton; 00029 class QTimer; 00030 00039 class KEditTagsDialog : public KDialog 00040 { 00041 Q_OBJECT 00042 00043 public: 00044 explicit KEditTagsDialog(const QVector<Nepomuk::Tag>& tags, 00045 QWidget* parent = 0, 00046 Qt::WFlags flags = 0); 00047 00048 virtual ~KEditTagsDialog(); 00049 00050 QVector<Nepomuk::Tag> tags() const; 00051 00052 virtual bool eventFilter(QObject* watched, QEvent* event); 00053 00054 protected slots: 00055 virtual void slotButtonClicked(int button); 00056 00057 private slots: 00058 void slotTextEdited(const QString& text); 00059 void slotItemEntered(QListWidgetItem* item); 00060 void showDeleteButton(); 00061 void deleteTag(); 00062 00063 private: 00064 void loadTags(); 00065 void removeNewTagItem(); 00066 00067 private: 00068 QVector<Nepomuk::Tag> m_tags; 00069 QListWidget* m_tagsList; 00070 QListWidgetItem* m_newTagItem; 00071 QListWidgetItem* m_deleteCandidate; 00072 KLineEdit* m_newTagEdit; 00073 00074 QPushButton* m_deleteButton; 00075 QTimer* m_deleteButtonTimer; 00076 }; 00077 00078 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon May 14 2012 05:01:48 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon May 14 2012 05:01:48 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.