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

libkdepim

  • sources
  • kde-4.12
  • kdepim
  • libkdepim
  • addressline
completionordereditor.h
Go to the documentation of this file.
1 /* -*- c++ -*-
2  * completionordereditor.h
3  *
4  * Copyright (c) 2004 David Faure <faure@kde.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; version 2 of the License
9  *
10  * This program 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
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  *
19  * In addition, as a special exception, the copyright holders give
20  * permission to link the code of this program with any edition of
21  * the Qt library by Trolltech AS, Norway (or with modified versions
22  * of Qt that use the same license as Qt), and distribute linked
23  * combinations including the two. You must obey the GNU General
24  * Public License in all respects for all of the code used other than
25  * Qt. If you modify this file, you may extend this exception to
26  * your version of the file, but you are not obligated to do so. If
27  * you do not wish to do so, delete this exception statement from
28  * your version.
29  */
30 
31 #ifndef KDEPIM_COMPLETIONORDEREDITOR_H
32 #define KDEPIM_COMPLETIONORDEREDITOR_H
33 
34 #include "kdepim_export.h"
35 
36 #include <KDE/KConfig>
37 #include <KDE/KDialog>
38 
39 class KPushButton;
40 class QAbstractItemModel;
41 class QModelIndex;
42 class QTreeWidget;
43 
44 namespace KLDAP {
45 class LdapClientSearch;
46 }
47 
48 namespace KPIM {
49 
50 class CompletionOrderEditor;
51 
52 // Base class for items in the list
53 class CompletionItem
54 {
55  public:
56  virtual ~CompletionItem() {}
57  virtual QString label() const = 0;
58  virtual QIcon icon() const = 0;
59  virtual int completionWeight() const = 0;
60  virtual void setCompletionWeight( int weight ) = 0;
61  virtual void save( CompletionOrderEditor* ) = 0;
62 };
63 
64 
65 class KDEPIM_EXPORT CompletionOrderEditor : public KDialog
66 {
67  Q_OBJECT
68 
69  public:
70  CompletionOrderEditor( KLDAP::LdapClientSearch* ldapSearch, QWidget* parent );
71  ~CompletionOrderEditor();
72 
73  KConfig* configFile() { return &mConfig; }
74 
75  Q_SIGNALS:
76  void completionOrderChanged();
77 
78  private Q_SLOTS:
79  void rowsInserted( const QModelIndex &parent, int start, int end );
80  void slotSelectionChanged();
81  void slotMoveUp();
82  void slotMoveDown();
83  void slotOk();
84 
85  private:
86  void readConfig();
87  void writeConfig();
88  void loadCompletionItems();
89  void addCompletionItemForIndex( const QModelIndex& );
90 
91  KConfig mConfig;
92  QTreeWidget* mListView;
93  KPushButton* mUpButton;
94  KPushButton* mDownButton;
95  QAbstractItemModel *mCollectionModel;
96  KLDAP::LdapClientSearch *mLdapSearch;
97 
98  bool mDirty;
99 };
100 
101 } // namespace
102 
103 #endif /* COMPLETIONORDEREDITOR_H */
104 
KPIM::CompletionItem::~CompletionItem
virtual ~CompletionItem()
Definition: completionordereditor.h:56
kdepim_export.h
KPIM::CompletionOrderEditor
Definition: completionordereditor.h:65
KLDAP::LdapClientSearch
Definition: ldapclientsearch.h:60
QWidget
KDialog
KPIM::CompletionOrderEditor::configFile
KConfig * configFile()
Definition: completionordereditor.h:73
KPIM::CompletionItem::setCompletionWeight
virtual void setCompletionWeight(int weight)=0
KPIM::CompletionItem::completionWeight
virtual int completionWeight() const =0
KPIM::CompletionItem::icon
virtual QIcon icon() const =0
KPIM::CompletionItem::save
virtual void save(CompletionOrderEditor *)=0
KPIM::CompletionItem::label
virtual QString label() const =0
KPIM::CompletionItem
Definition: completionordereditor.h:53
KDEPIM_EXPORT
#define KDEPIM_EXPORT
Definition: kdepim_export.h:35
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libkdepim

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

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