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

kontact

  • sources
  • kde-4.12
  • kdepim
  • kontact
  • plugins
  • knotes
knotes_part.h
Go to the documentation of this file.
1 /*
2  This file is part of the KDE project
3 
4  Copyright (C) 2002 Daniel Molkentin <molkentin@kde.org>
5  Copyright (C) 2004 Michael Brade <brade@kde.org>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public
9  License as published by the Free Software Foundation; either
10  version 2 of the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; see the file COPYING. If not, write to
19  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  Boston, MA 02110-1301, USA.
21 */
22 
23 #ifndef KNOTES_PART_H
24 #define KNOTES_PART_H
25 
26 #include <KParts/ReadOnlyPart>
27 #include <QListWidgetItem>
28 
29 class KNotesIconView;
30 class KNotesWidget;
31 class KNotesIconViewItem;
32 class KNotesResourceManager;
33 class KNoteTip;
34 class KNotesAlarm;
35 class KAction;
36 class KToggleAction;
37 class QTcpServer;
38 
39 namespace DNSSD {
40 class PublicService;
41 }
42 
43 namespace KCal {
44 class Journal;
45 }
46 using namespace KCal;
47 
48 class KNotesPart : public KParts::ReadOnlyPart
49 {
50  Q_OBJECT
51 
52 public:
53  explicit KNotesPart(KNotesResourceManager *manager, QObject *parent = 0 );
54  ~KNotesPart();
55 
56  bool openFile();
57 
58 public slots:
59  QString newNote( const QString &name = QString(),
60  const QString &text = QString() );
61  QString newNoteFromClipboard( const QString &name = QString() );
62  QStringList notesList() const;
63 
64 public:
65  void killNote( const QString &id );
66  void killNote( const QString &id, bool force );
67 
68  QString name( const QString &id ) const;
69  QString text( const QString &id ) const;
70 
71  void setName( const QString &id, const QString &newName );
72  void setText( const QString &id, const QString &newText );
73 
74  QMap<QString, QString> notes() const;
75  void popupRMB( QListWidgetItem *item, const QPoint &pos, const QPoint &globalPos );
76 
77 private slots:
78  void createNote( KCal::Journal *journal );
79  void killNote( KCal::Journal *journal );
80 
81  void editNote( QListWidgetItem *item );
82  void editNote();
83 
84  void renameNote();
85 
86  void slotOnCurrentChanged( );
87 
88  void killSelectedNotes();
89 
90  void slotPrintSelectedNotes();
91  void slotPrintPreviewSelectedNotes();
92  void requestToolTip( const QModelIndex & );
93 
94  void hideToolTip();
95  void slotNotePreferences();
96  void slotPreferences();
97  void slotApplyConfig();
98  void slotMail();
99  void slotSendToNetwork();
100  void slotConfigUpdated();
101  void slotAcceptConnection();
102  void slotSetAlarm();
103  void slotNewNoteFromClipboard();
104  void slotSaveAs();
105  void slotUpdateReadOnly();
106 
107 private:
108  void updateNetworkListener();
109  void printSelectedNotes(bool preview);
110  KNotesWidget *mNotesWidget;
111  KNoteTip *mNoteTip;
112 
113  KNotesResourceManager *mManager;
114  QMultiHash<QString, KNotesIconViewItem*> mNoteList;
115  QTcpServer *mListener;
116  DNSSD::PublicService *mPublisher;
117  KNotesAlarm *mAlarm;
118  KAction *mNoteEdit;
119  KAction *mNoteRename;
120  KAction *mNoteDelete;
121  KAction *mNotePrint;
122  KAction *mNotePrintPreview;
123  KAction *mNoteConfigure;
124  KAction *mNoteSendMail;
125  KAction *mNoteSendNetwork;
126  KAction *mNoteSetAlarm;
127  KAction *mNewNote;
128  KAction *mSaveAs;
129  KToggleAction *mReadOnly;
130 };
131 
132 #endif
text
virtual QByteArray text(quint32 serialNumber) const =0
KNoteTip
Definition: knotetip.h:43
QObject
KNotesWidget
Definition: knoteswidget.h:25
KNotesPart
Definition: knotes_part.h:48
QListWidgetItem
KNotesIconViewItem
Definition: knotesiconview.h:37
KNotesIconView
Definition: knotesiconview.h:25
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:30 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kontact

Skip menu "kontact"
  • Main Page
  • Namespace List
  • 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