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

calendarsupport

  • sources
  • kde-4.12
  • kdepim
  • calendarsupport
categoryhierarchyreader.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2005 Rafal Rzepecki <divide@users.sourceforge.net>
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 as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 #ifndef CALENDARSUPPORT_CATEGORYHIERARCHYREADER_H
20 #define CALENDARSUPPORT_CATEGORYHIERARCHYREADER_H
21 
22 #include "calendarsupport_export.h"
23 
24 #include <QVariant>
25 
26 class KComboBox;
27 
28 class QTreeWidget;
29 class QTreeWidgetItem;
30 
31 namespace CalendarSupport {
32 
33 class CALENDARSUPPORT_EXPORT CategoryHierarchyReader
34 {
35  public:
36  void read( QStringList categories );
37  virtual ~CategoryHierarchyReader() {}
38  static QStringList path( QString string );
39 
40  protected:
41  CategoryHierarchyReader() {}
42  virtual void clear() = 0;
43  virtual void goUp() = 0;
44  virtual void addChild( const QString &label, const QVariant &userData = QVariant() ) = 0;
45  virtual int depth() const = 0;
46 };
47 
48 class CALENDARSUPPORT_EXPORT CategoryHierarchyReaderQComboBox : public CategoryHierarchyReader
49 {
50  public:
51  CategoryHierarchyReaderQComboBox( KComboBox *box ) : mBox( box ), mCurrentDepth( 0 ) {}
52  virtual ~CategoryHierarchyReaderQComboBox() {}
53 
54  protected:
55  virtual void clear();
56  virtual void goUp();
57  virtual void addChild( const QString &label, const QVariant &userData = QVariant() );
58  virtual int depth() const;
59 
60  private:
61  KComboBox *mBox;
62  int mCurrentDepth;
63 };
64 
65 #ifndef QT_NO_TREEWIDGET
66 class CALENDARSUPPORT_EXPORT CategoryHierarchyReaderQTreeWidget : public CategoryHierarchyReader
67 {
68  public:
69  explicit CategoryHierarchyReaderQTreeWidget( QTreeWidget *tree )
70  : mTree( tree ), mItem( 0 ), mCurrentDepth( 0 ) {}
71  virtual ~CategoryHierarchyReaderQTreeWidget() {}
72 
73  protected:
74  virtual void clear();
75  virtual void goUp();
76  virtual void addChild( const QString &label, const QVariant &userData = QVariant() );
77  virtual int depth() const;
78 
79  private:
80  QTreeWidget *mTree;
81  QTreeWidgetItem *mItem;
82  int mCurrentDepth;
83 };
84 #endif
85 
86 }
87 
88 #endif
CalendarSupport::CategoryHierarchyReaderQComboBox
Definition: categoryhierarchyreader.h:48
CalendarSupport::CategoryHierarchyReaderQTreeWidget::~CategoryHierarchyReaderQTreeWidget
virtual ~CategoryHierarchyReaderQTreeWidget()
Definition: categoryhierarchyreader.h:71
CalendarSupport::CategoryHierarchyReaderQComboBox::CategoryHierarchyReaderQComboBox
CategoryHierarchyReaderQComboBox(KComboBox *box)
Definition: categoryhierarchyreader.h:51
CalendarSupport::CategoryHierarchyReaderQTreeWidget::CategoryHierarchyReaderQTreeWidget
CategoryHierarchyReaderQTreeWidget(QTreeWidget *tree)
Definition: categoryhierarchyreader.h:69
calendarsupport_export.h
CalendarSupport::CategoryHierarchyReader
Definition: categoryhierarchyreader.h:33
CalendarSupport::categories
CALENDARSUPPORT_EXPORT QStringList categories(const KCalCore::Incidence::List &incidences)
Definition: utils.cpp:746
CalendarSupport::CategoryHierarchyReader::CategoryHierarchyReader
CategoryHierarchyReader()
Definition: categoryhierarchyreader.h:41
CalendarSupport::CategoryHierarchyReaderQTreeWidget
Definition: categoryhierarchyreader.h:66
CALENDARSUPPORT_EXPORT
#define CALENDARSUPPORT_EXPORT
Definition: calendarsupport_export.h:36
CalendarSupport::CategoryHierarchyReader::~CategoryHierarchyReader
virtual ~CategoryHierarchyReader()
Definition: categoryhierarchyreader.h:37
CalendarSupport::CategoryHierarchyReaderQComboBox::~CategoryHierarchyReaderQComboBox
virtual ~CategoryHierarchyReaderQComboBox()
Definition: categoryhierarchyreader.h:52
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:54:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

calendarsupport

Skip menu "calendarsupport"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

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