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

Nepomuk

  • sources
  • kde-4.12
  • kdelibs
  • nepomuk
  • ui
tagwidget.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Nepomuk KDE project.
3  * Copyright (C) 2006-2010 Sebastian Trueg <trueg@kde.org>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library 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 GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef _NEPOMUK_TAG_WIDGET_H_
22 #define _NEPOMUK_TAG_WIDGET_H_
23 
24 #include "nepomuk_export.h"
25 
26 #include <QtGui/QWidget>
27 
28 namespace Nepomuk {
29  class Resource;
30  class Tag;
31  class TagWidgetPrivate;
32 
48  class NEPOMUK_EXPORT TagWidget : public QWidget
49  {
50  Q_OBJECT
51 
52  public:
57  explicit TagWidget( const Resource& resource, QWidget* parent = 0 );
58 
62  TagWidget( QWidget* parent = 0 );
63 
67  ~TagWidget();
68 
73  QList<Resource> taggedResources() const;
74 
78 #ifndef KDE_NO_DEPRECATED
79  KDE_DEPRECATED QList<Tag> assignedTags() const;
80 #endif
81 
93  QList<Nepomuk::Tag> selectedTags() const;
94 
105  int maxTagsShown() const;
106 
112  Qt::Alignment alignment() const;
113 
119  enum ModeFlag {
125  MiniMode = 0x1,
126 
132  StandardMode = 0x2,
133 
138  ReadOnly = 0x4,
139 
145  DisableTagClicking = 0x8
146  };
147  Q_DECLARE_FLAGS( ModeFlags, ModeFlag )
148 
149 
156  ModeFlags modeFlags() const;
157 
158  Q_SIGNALS:
162  void tagClicked( Nepomuk::Tag );
163 
169  void selectionChanged( const QList<Nepomuk::Tag>& tags );
170 
171  public Q_SLOTS:
176  void setTaggedResource( const Resource& resource );
177 
182  void setTaggedResources( const QList<Resource>& resources );
183 
187 #ifndef KDE_NO_DEPRECATED
188  KDE_DEPRECATED void setAssignedTags( const QList<Nepomuk::Tag>& tags );
189 #endif
190 
198  void setSelectedTags( const QList<Nepomuk::Tag>& tags );
199 
212  void setMaxTagsShown( int max );
213 
220  void setAlignment( Qt::Alignment alignment );
221 
227  void setModeFlags( ModeFlags flags );
228 
229  private Q_SLOTS:
230  void slotShowAll();
231  void slotTagUpdateDone();
232  void slotTagStateChanged( const Nepomuk::Tag&, int );
233  void slotKEditTagDialogFinished( int result );
234 
235  private:
236  TagWidgetPrivate* const d;
237  };
238 }
239 
240 Q_DECLARE_OPERATORS_FOR_FLAGS( Nepomuk::TagWidget::ModeFlags )
241 
242 #endif
Nepomuk::Resource
Resource is the central object type in Nepomuk.
Definition: resource.h:94
Nepomuk::Tag
A Tag can be assigned to any Thing.
Definition: tag.h:38
QWidget
Nepomuk::TagWidget
Allows to change a selection of tags.
Definition: tagwidget.h:48
Nepomuk::TagWidget::ModeFlag
ModeFlag
Flags to configure the widget.
Definition: tagwidget.h:119
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Nepomuk

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

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