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

knotes

  • sources
  • kde-4.12
  • kdepim
  • knotes
knoteedit.h
Go to the documentation of this file.
1 /*******************************************************************
2  KNotes -- Notes for the KDE project
3 
4  Copyright (c) 1997-2005, The KNotes Developers
5 
6  This program is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public License
8  as published by the Free Software Foundation; either version 2
9  of the License, or (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 *******************************************************************/
20 
21 #ifndef KNOTEEDIT_H
22 #define KNOTEEDIT_H
23 
24 #include "knotes_export.h"
25 #include <QTextCharFormat>
26 #include <QWidget>
27 
28 #include "pimcommon/widgets/customtextedit.h"
29 
30 class QFont;
31 
32 class KAction;
33 class KActionCollection;
34 class KFontAction;
35 class KFontSizeAction;
36 class KToggleAction;
37 class KNote;
38 
39 class KNOTES_EXPORT KNoteEdit : public PimCommon::CustomTextEdit
40 {
41  Q_OBJECT
42 public:
43  explicit KNoteEdit(const QString &configFile, KActionCollection *actions, QWidget *parent = 0 );
44  ~KNoteEdit();
45 
46  void setNote( KNote *_note );
47 
48  void setText( const QString &text );
49  QString text() const;
50 
51  void setTextFont( const QFont &font );
52  void setTabStop( int tabs );
53  void setAutoIndentMode( bool newmode );
54 
55 public slots:
56  void setRichText( bool );
57 
58  void textBold( bool );
59  void textStrikeOut( bool );
60 
61  void slotTextColor();
62 
63  void textAlignLeft();
64  void textAlignCenter();
65  void textAlignRight();
66  void textAlignBlock();
67 
68  void textList();
69 
70  void textSuperScript();
71  void textSubScript();
72 
73  void textIncreaseIndent();
74  void textDecreaseIndent();
75  void setTextFontSize( int );
76 
77  void slotTextBackgroundColor();
78  void slotInsertDate();
79 
80 protected:
81  virtual void keyPressEvent( QKeyEvent * );
82  virtual void focusInEvent( QFocusEvent * );
83  virtual void focusOutEvent( QFocusEvent * );
84 
85 protected slots:
86  void mousePopupMenuImplementation(const QPoint& pos);
87 
88 private slots:
89  void slotCurrentCharFormatChanged( const QTextCharFormat & );
90  void slotCursorPositionChanged();
91  void slotUpperCase();
92  void slotLowerCase();
93 
94 private:
95  void autoIndent();
96 
97  void enableRichTextActions(bool enabled);
98 
99 private:
100 
101  KToggleAction *m_textBold;
102  KToggleAction *m_textItalic;
103  KToggleAction *m_textUnderline;
104  KToggleAction *m_textStrikeOut;
105 
106  KToggleAction *m_textAlignLeft;
107  KToggleAction *m_textAlignCenter;
108  KToggleAction *m_textAlignRight;
109  KToggleAction *m_textAlignBlock;
110 
111  KToggleAction *m_textList;
112  KToggleAction *m_textSuper;
113  KToggleAction *m_textSub;
114 
115  KAction *m_textIncreaseIndent;
116  KAction *m_textDecreaseIndent;
117 
118  KAction *m_textColor;
119  KFontAction *m_textFont;
120  KFontSizeAction *m_textSize;
121  KNote *m_note;
122  KActionCollection *m_actions;
123  bool m_autoIndentMode;
124 };
125 
126 #endif
KNoteEdit
Definition: knoteedit.h:39
QWidget
KNote
Definition: knote.h:50
KNOTES_EXPORT
#define KNOTES_EXPORT
Definition: knotes_export.h:35
knotes_export.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:56:33 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

knotes

Skip menu "knotes"
  • 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