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

Nepomuk

  • Nepomuk
  • TagWidget
Public Types | Public Slots | Signals | Public Member Functions | List of all members
Nepomuk::TagWidget Class Reference

#include <Nepomuk/TagWidget>

Inheritance diagram for Nepomuk::TagWidget:
Inheritance graph
[legend]

Public Types

enum  ModeFlag { MiniMode = 0x1, StandardMode = 0x2, ReadOnly = 0x4, DisableTagClicking = 0x8 }
 

Public Slots

void setAlignment (Qt::Alignment alignment)
 
void setAssignedTags (const QList< Nepomuk::Tag > &tags)
 
void setMaxTagsShown (int max)
 
void setModeFlags (ModeFlags flags)
 
void setSelectedTags (const QList< Nepomuk::Tag > &tags)
 
void setTaggedResource (const Resource &resource)
 
void setTaggedResources (const QList< Resource > &resources)
 

Signals

void selectionChanged (const QList< Nepomuk::Tag > &tags)
 
void tagClicked (Nepomuk::Tag)
 

Public Member Functions

 TagWidget (const Resource &resource, QWidget *parent=0)
 
 TagWidget (QWidget *parent=0)
 
 ~TagWidget ()
 
Qt::Alignment alignment () const
 
QList< Tag > assignedTags () const
 
int maxTagsShown () const
 
ModeFlags modeFlags () const
 
QList< Nepomuk::Tag > selectedTags () const
 
QList< Resource > taggedResources () const
 

Detailed Description

Allows to change a selection of tags.

TagWidget provides a simple GUI interface to assign tags. It has two basic modes:

  • If resources are set via setTaggedResource() or setTaggedResources() the changes in the tag selection are automatically assigned to the selected resources.
  • If no resources have been set the widget simply emits the selectionChanged() signal.
Author
Sebastian Trueg trueg.nosp@m.@kde.nosp@m..org

Definition at line 48 of file tagwidget.h.

Member Enumeration Documentation

enum Nepomuk::TagWidget::ModeFlag

Flags to configure the widget.

Since
4.5
Enumerator
MiniMode 

The mini mode which tries to display the tags on the least space possible.

StandardMode 

The standard mode which is used by default provides a set of check boxes for the most frequently used tags.

ReadOnly 

Read only mode which prevents the changing of tags by the user.

DisableTagClicking 

Disable the clicking of the tags.

This will also disable the emitting of the tagClicked() signal.

Definition at line 119 of file tagwidget.h.

Constructor & Destructor Documentation

Nepomuk::TagWidget::TagWidget ( const Resource &  resource,
QWidget *  parent = 0 
)
explicit

Creates a new TagWidget for resource.

The assigned tags are loaded instantly.

Nepomuk::TagWidget::TagWidget ( QWidget *  parent = 0)

Constructor.

Nepomuk::TagWidget::~TagWidget ( )

Destructor.

Member Function Documentation

Qt::Alignment Nepomuk::TagWidget::alignment ( ) const

The alignment of the tags in the widget.

Since
4.5
QList<Tag> Nepomuk::TagWidget::assignedTags ( ) const
Deprecated:
use selectedTags() instead
int Nepomuk::TagWidget::maxTagsShown ( ) const

By default the TagWidget shows the most often used tags in the main window and allows access to all tags via an additional button.

This is the maximum number of tags that should be shown unless they are selected.

See also
setMaxTagsShown()
Since
4.5
ModeFlags Nepomuk::TagWidget::modeFlags ( ) const

Flags the widget is configured with.

See also
setModeFlags()
Since
4.5
QList<Nepomuk::Tag> Nepomuk::TagWidget::selectedTags ( ) const

The list of selected tags.

Returns
The list of all tags that are currently selected. In case resources to be tagged have been selected this list matches the tags assigned to the resources.
See also
setTaggedResource, taggedResource, Resource::getTags
Since
4.5
void Nepomuk::TagWidget::selectionChanged ( const QList< Nepomuk::Tag > &  tags)
signal

Emitted whenever the selection of tags changes.

Since
4.5
void Nepomuk::TagWidget::setAlignment ( Qt::Alignment  alignment)
slot

Set the alignment to use.

Only horizontal alignment flags make a difference.

Since
4.5
void Nepomuk::TagWidget::setAssignedTags ( const QList< Nepomuk::Tag > &  tags)
slot
Deprecated:
use setSelectedTags() instead
void Nepomuk::TagWidget::setMaxTagsShown ( int  max)
slot

By default the TagWidget shows the most often used tags in the main window and allows access to all tags via an additional button.

The number of tags that are shown by default can be changed.

Parameters
maxThe maximum number of tags that should be shown in the main window. Set to 0 for no limit. Be aware that more tags might be shown since selected tags are always shown.
Since
4.5
void Nepomuk::TagWidget::setModeFlags ( ModeFlags  flags)
slot

Set flags to change the behaviour and look of the tag widget.

Since
4.5
void Nepomuk::TagWidget::setSelectedTags ( const QList< Nepomuk::Tag > &  tags)
slot

Set the list of selected tags.

In case resources have been set via setTaggedResource() or setTaggedResources() their list of tags is changed automatically.

Since
4.5
void Nepomuk::TagWidget::setTaggedResource ( const Resource &  resource)
slot

Set the Resource to be tagged.

The assigned tags will be loaded instantly.

void Nepomuk::TagWidget::setTaggedResources ( const QList< Resource > &  resources)
slot

Set the resources to be tagged.

If the list of resources is empty TagWidget will only emit the selectionChanged() signal.

void Nepomuk::TagWidget::tagClicked ( Nepomuk::Tag  )
signal

This signal is emitted whenever a tag is clicked.

QList<Resource> Nepomuk::TagWidget::taggedResources ( ) const
Returns
The resources that are supposed to be tagged or an empty list if none have been set.

The documentation for this class was generated from the following file:
  • tagwidget.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:02 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