4 // Copyright (C) 1997 Christoph Neerfeld <Christoph.Neerfeld@home.ivm.de>
5 // Copyright (C) 2002, 2003 Aaron J. Seigo <aseigo@kde.org>
6 // Copyright (C) 2003 Stanislav Kljuhhin <crz@hot.ee>
7 // Copyright (C) 2005-2006 Jaison Lee <lee.jaison@gmail.com>
8 // Copyright (C) 2007-2008 Stephen Kelly <steveire@gmail.com>
10 // This program is free software; you can redistribute it and/or modify
11 // it under the terms of the GNU General Public License as published by
12 // the Free Software Foundation; either version 2 of the License, or
13 // (at your option) any later version.
15 // This program is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
20 // You should have received a copy of the GNU General Public License
21 // along with this program; if not, write to the Free Software
22 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
28 #include <KRichTextWidget>
31 class QItemSelectionModel
;
33 class KActionCollection
;
35 class KJotsEdit
: public KRichTextWidget
39 explicit KJotsEdit ( QItemSelectionModel
*selectionModel
, QWidget
* );
40 virtual ~KJotsEdit ();
42 void delayedInitialization ( KActionCollection
* );
43 virtual bool canInsertFromMimeData ( const QMimeData
*) const;
44 virtual void insertFromMimeData ( const QMimeData
*);
47 virtual void contextMenuEvent( QContextMenuEvent
* );
49 /** Override to make ctrl+click follow links */
50 virtual void mouseReleaseEvent(QMouseEvent
*);
52 virtual void focusOutEvent( QFocusEvent
* );
54 virtual bool event( QEvent
*event
);
57 void selectionChanged(const QItemSelection
&selected
, const QItemSelection
&deselected
);
58 void tryDisableEditing();
59 void onBookshelfSelection ( void );
60 void onAutoBullet ( void );
61 void onLinkify ( void );
62 void addCheckmark( void );
63 void onAutoDecimal( void );
64 void DecimalList( void );
65 void pastePlainText( void );
71 void createAutoDecimalList();
72 KActionCollection
*actionCollection
;
73 bool allowAutoDecimal
;
74 QItemSelectionModel
*m_selectionModel
;
78 #endif // __KJOTSEDIT_H
79 /* ex: set tabstop=4 softtabstop=4 shiftwidth=4 expandtab: */
80 /* kate: tab-indents off; replace-tabs on; tab-width 4; remove-trailing-space on; encoding utf-8;*/