• 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.cpp
Go to the documentation of this file.
1 /*******************************************************************
2  KNotes -- Notes for the KDE project
3 
4  Copyright (c) 1997-2006, 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 #include "knoteedit.h"
22 #include "notes/knote.h"
23 
24 #include <kaction.h>
25 #include <kactioncollection.h>
26 #include <kcolordialog.h>
27 #include <kdebug.h>
28 #include <kfontaction.h>
29 #include <kfontsizeaction.h>
30 #include <kicon.h>
31 #include <klocale.h>
32 #include <kmenu.h>
33 #include <kstandardaction.h>
34 #include <ktoggleaction.h>
35 #include <kurl.h>
36 
37 #include <QFont>
38 #include <QPixmap>
39 #include <QKeyEvent>
40 
41 static const short SEP = 5;
42 static const short ICON_SIZE = 10;
43 
44 
45 KNoteEdit::KNoteEdit( const QString &configFile, KActionCollection *actions, QWidget *parent )
46  : PimCommon::CustomTextEdit(configFile, parent ),
47  m_note( 0 ),
48  m_actions( actions )
49 {
50  setAcceptDrops( true );
51  setWordWrapMode( QTextOption::WordWrap );
52  setLineWrapMode( WidgetWidth );
53  if ( acceptRichText() ) {
54  setAutoFormatting( AutoAll );
55  } else {
56  setAutoFormatting( AutoNone );
57  }
58 
59  // create the actions modifying the text format
60  m_textBold = new KToggleAction( KIcon( QLatin1String("format-text-bold") ), i18n( "Bold" ),
61  this );
62  actions->addAction( QLatin1String("format_bold"), m_textBold );
63  m_textBold->setShortcut( QKeySequence( Qt::CTRL + Qt::Key_B ) );
64  m_textItalic = new KToggleAction( KIcon( QLatin1String("format-text-italic") ),
65  i18n( "Italic" ), this );
66  actions->addAction( QLatin1String("format_italic"), m_textItalic );
67  m_textItalic->setShortcut( QKeySequence( Qt::CTRL + Qt::Key_I ) );
68  m_textUnderline = new KToggleAction( KIcon( QLatin1String("format-text-underline") ),
69  i18n( "Underline" ), this );
70  actions->addAction( QLatin1String("format_underline"), m_textUnderline );
71  m_textUnderline->setShortcut( QKeySequence( Qt::CTRL + Qt::Key_U ) );
72  m_textStrikeOut = new KToggleAction( KIcon( QLatin1String("format-text-strikethrough") ),
73  i18n( "Strike Out" ), this );
74  actions->addAction( QLatin1String("format_strikeout"), m_textStrikeOut );
75  m_textStrikeOut->setShortcut( QKeySequence( Qt::CTRL + Qt::Key_S ) );
76 
77  connect( m_textBold, SIGNAL(toggled(bool)), SLOT(textBold(bool)) );
78  connect( m_textItalic, SIGNAL(toggled(bool)),
79  SLOT(setFontItalic(bool)) );
80  connect( m_textUnderline, SIGNAL(toggled(bool)),
81  SLOT(setFontUnderline(bool)) );
82  connect( m_textStrikeOut, SIGNAL(toggled(bool)),
83  SLOT(textStrikeOut(bool)) );
84 
85  m_textAlignLeft = new KToggleAction( KIcon( QLatin1String("format-justify-left") ),
86  i18n( "Align Left" ), this );
87  actions->addAction( QLatin1String("format_alignleft"), m_textAlignLeft );
88  connect( m_textAlignLeft, SIGNAL(triggered(bool)),
89  SLOT(textAlignLeft()) );
90  m_textAlignLeft->setShortcut( QKeySequence( Qt::ALT + Qt::Key_L ) );
91  m_textAlignLeft->setChecked( true ); // just a dummy, will be updated later
92  m_textAlignCenter = new KToggleAction( KIcon( QLatin1String("format-justify-center") ),
93  i18n( "Align Center" ), this );
94  actions->addAction( QLatin1String("format_aligncenter"), m_textAlignCenter );
95  connect( m_textAlignCenter, SIGNAL(triggered(bool)),
96  SLOT(textAlignCenter()) );
97  m_textAlignCenter->setShortcut( QKeySequence( Qt::ALT + Qt::Key_C ) );
98  m_textAlignRight = new KToggleAction( KIcon( QLatin1String("format-justify-right") ),
99  i18n( "Align Right" ), this );
100  actions->addAction( QLatin1String("format_alignright"), m_textAlignRight );
101  connect( m_textAlignRight, SIGNAL(triggered(bool)),
102  SLOT(textAlignRight()) );
103  m_textAlignRight->setShortcut( QKeySequence( Qt::ALT + Qt::Key_R ) );
104  m_textAlignBlock = new KToggleAction( KIcon( QLatin1String("format-justify-fill") ),
105  i18n( "Align Block" ), this );
106  actions->addAction( QLatin1String("format_alignblock"), m_textAlignBlock );
107  connect( m_textAlignBlock, SIGNAL(triggered(bool)),
108  SLOT(textAlignBlock()) );
109  m_textAlignBlock->setShortcut( QKeySequence( Qt::ALT + Qt::Key_B ) );
110 
111  QActionGroup *group = new QActionGroup( this );
112  group->addAction( m_textAlignLeft );
113  group->addAction( m_textAlignCenter );
114  group->addAction( m_textAlignRight );
115  group->addAction( m_textAlignBlock );
116 
117  m_textList = new KToggleAction( KIcon( QLatin1String("format-list-ordered") ), i18n( "List" ), this );
118  actions->addAction( QLatin1String("format_list"), m_textList );
119  connect( m_textList, SIGNAL(triggered(bool)), SLOT(textList()) );
120 
121  m_textSuper = new KToggleAction( KIcon( QLatin1String("format-text-superscript") ),
122  i18n( "Superscript" ), this );
123  actions->addAction( QLatin1String("format_super"), m_textSuper );
124  connect( m_textSuper, SIGNAL(triggered(bool)),
125  SLOT(textSuperScript()) );
126  m_textSub = new KToggleAction( KIcon( QLatin1String("format-text-subscript") ), i18n( "Subscript" ),
127  this );
128  actions->addAction( QLatin1String("format_sub"), m_textSub );
129  connect( m_textSub, SIGNAL(triggered(bool)), SLOT(textSubScript()) );
130 
131 
132  m_textIncreaseIndent = new KAction( KIcon( QLatin1String("format-indent-more") ),
133  i18n( "Increase Indent" ), this );
134  actions->addAction( QLatin1String("format_increaseindent"), m_textIncreaseIndent );
135  m_textIncreaseIndent->setShortcut( QKeySequence( Qt::CTRL + Qt::ALT +
136  Qt::Key_I ) );
137  connect( m_textIncreaseIndent, SIGNAL(triggered(bool)),
138  SLOT(textIncreaseIndent()) );
139 
140  m_textDecreaseIndent = new KAction( KIcon( QLatin1String("format-indent-less") ),
141  i18n( "Decrease Indent" ), this );
142  actions->addAction( QLatin1String("format_decreaseindent"), m_textDecreaseIndent );
143  m_textDecreaseIndent->setShortcut( QKeySequence( Qt::CTRL + Qt::ALT +
144  Qt::Key_D ) );
145  connect( m_textDecreaseIndent, SIGNAL(triggered(bool)), SLOT(
146  textDecreaseIndent() ) );
147 
148  group = new QActionGroup( this );
149  group->addAction( m_textIncreaseIndent );
150  group->addAction( m_textDecreaseIndent );
151 
152  QPixmap pix( ICON_SIZE, ICON_SIZE );
153  pix.fill( Qt::black ); // just a dummy, gets updated before widget is shown
154  m_textColor = new KAction( i18n( "Text Color..." ), this );
155  actions->addAction( QLatin1String("format_color"), m_textColor );
156  m_textColor->setIcon( pix );
157  connect( m_textColor, SIGNAL(triggered(bool)), SLOT(slotTextColor()) );
158 
159  KAction *act = new KAction(KIcon( QLatin1String("format-fill-color") ), i18n( "Text Background Color..." ), this );
160  actions->addAction( QLatin1String("text_background_color"), act );
161  connect( act, SIGNAL(triggered(bool)), SLOT(slotTextBackgroundColor()) );
162 
163  m_textFont = new KFontAction( i18n( "Text Font" ), this );
164  actions->addAction( QLatin1String("format_font"), m_textFont );
165  connect( m_textFont, SIGNAL(triggered(QString)),
166  this, SLOT(setFontFamily(QString)) );
167 
168  m_textSize = new KFontSizeAction( i18n( "Text Size" ), this );
169  actions->addAction( QLatin1String("format_size"), m_textSize );
170  connect( m_textSize, SIGNAL(fontSizeChanged(int)),
171  this, SLOT(setTextFontSize(int)) );
172 
173  KAction *action = new KAction( i18n("Uppercase"), this );
174  actions->addAction( QLatin1String("change_to_uppercase"), action );
175  connect( action, SIGNAL(triggered(bool)), this, SLOT(slotUpperCase()) );
176 
177  action = new KAction( i18n("Lowercase"), this );
178  actions->addAction( QLatin1String("change_to_lowercase"), action );
179  connect( action, SIGNAL(triggered(bool)), this, SLOT(slotLowerCase()) );
180 
181  action = new KAction( KIcon( QLatin1String("knotes_date") ), i18n( "Insert Date" ), this );
182  actions->addAction( QLatin1String("insert_date"), action );
183  connect( action, SIGNAL(triggered(bool)), SLOT(slotInsertDate()) );
184 
185  // QTextEdit connections
186  connect( this, SIGNAL(currentCharFormatChanged(QTextCharFormat)),
187  SLOT(slotCurrentCharFormatChanged(QTextCharFormat)) );
188  connect( this, SIGNAL(cursorPositionChanged()),
189  SLOT(slotCursorPositionChanged()) );
190  slotCurrentCharFormatChanged( currentCharFormat() );
191  slotCursorPositionChanged();
192 }
193 
194 KNoteEdit::~KNoteEdit()
195 {
196 }
197 
198 void KNoteEdit::setNote( KNote *_note )
199 {
200  m_note = _note;
201 }
202 
203 void KNoteEdit::slotUpperCase()
204 {
205  QTextCursor cursor = textCursor();
206  if (cursor.hasSelection()) {
207  const QString newText = cursor.selectedText().toUpper();
208  cursor.insertText(newText);
209  }
210 }
211 
212 void KNoteEdit::slotLowerCase()
213 {
214  QTextCursor cursor = textCursor();
215  if (cursor.hasSelection()) {
216  const QString newText = cursor.selectedText().toLower();
217  cursor.insertText(newText);
218  }
219 }
220 
221 
222 void KNoteEdit::mousePopupMenuImplementation(const QPoint& pos)
223 {
224  QMenu *popup = mousePopupMenu();
225  if ( popup ) {
226  QTextCursor cursor = textCursor();
227  if (!isReadOnly() ) {
228  if (cursor.hasSelection()) {
229  popup->addSeparator();
230  QMenu *changeCaseMenu = new QMenu(i18n("Change case..."), popup);
231  QAction * act = m_actions->action(QLatin1String("change_to_lowercase"));
232  changeCaseMenu->addAction(act);
233  act = m_actions->action(QLatin1String("change_to_uppercase"));
234  changeCaseMenu->addAction(act);
235  popup->addMenu(changeCaseMenu);
236  }
237  popup->addSeparator();
238  QAction * act = m_actions->action(QLatin1String("insert_date"));
239  popup->addAction(act);
240  }
241  aboutToShowContextMenu(popup);
242  popup->exec( pos );
243  delete popup;
244  }
245 }
246 
247 void KNoteEdit::setText( const QString& text )
248 {
249  if ( acceptRichText() && Qt::mightBeRichText( text ) ) {
250  setHtml( text );
251  } else {
252  setPlainText( text );
253  }
254 }
255 
256 QString KNoteEdit::text() const
257 {
258  if ( acceptRichText() ) {
259  return toHtml();
260  } else {
261  return toPlainText();
262  }
263 }
264 
265 void KNoteEdit::setTextFont( const QFont &font )
266 {
267  setCurrentFont( font );
268 
269  // make this font default so that if user deletes note content
270  // font is remembered
271  document()->setDefaultFont( font );
272 }
273 
274 void KNoteEdit::setTextFontSize( int size )
275 {
276  setFontPointSize( size );
277 }
278 
279 void KNoteEdit::setTabStop( int tabs )
280 {
281  QFontMetrics fm( font() );
282  setTabStopWidth( fm.width( QLatin1Char('x') ) * tabs );
283 }
284 
285 void KNoteEdit::setAutoIndentMode( bool newmode )
286 {
287  m_autoIndentMode = newmode;
288 }
289 
290 
293 void KNoteEdit::setRichText( bool f )
294 {
295  if ( f == acceptRichText() ) {
296  return;
297  }
298 
299  setAcceptRichText( f );
300 
301  if ( f ) {
302  setAutoFormatting( AutoAll );
303  } else {
304  setAutoFormatting( AutoNone );
305  }
306 
307  const QString t = toPlainText();
308  if ( f ) {
309  // if the note contains html source try to render it
310  if ( Qt::mightBeRichText( t ) ) {
311  setHtml( t );
312  } else {
313  setPlainText( t );
314  }
315 
316  enableRichTextActions(true);
317  } else {
318  setPlainText( t );
319  enableRichTextActions(false);
320  }
321 }
322 
323 void KNoteEdit::textBold( bool b )
324 {
325  if (!acceptRichText())
326  return;
327 
328  QTextCharFormat f;
329  f.setFontWeight( b ? QFont::Bold : QFont::Normal );
330  mergeCurrentCharFormat( f );
331 }
332 
333 void KNoteEdit::textStrikeOut( bool s )
334 {
335  if (!acceptRichText())
336  return;
337 
338  QTextCharFormat f;
339  f.setFontStrikeOut( s );
340  mergeCurrentCharFormat( f );
341 }
342 
343 void KNoteEdit::slotTextColor()
344 {
345  if (!acceptRichText())
346  return;
347 
348  if ( m_note )
349  m_note->blockEmitDataChanged( true );
350  QColor c = textColor();
351  if ( KColorDialog::getColor( c, this ) ) {
352  setTextColor( c );
353  }
354  if ( m_note )
355  m_note->blockEmitDataChanged( false );
356 }
357 
358 void KNoteEdit::slotTextBackgroundColor()
359 {
360  if (!acceptRichText())
361  return;
362 
363  if ( m_note )
364  m_note->blockEmitDataChanged( true );
365  QColor c = textBackgroundColor();
366  if ( KColorDialog::getColor( c, this ) ) {
367  setTextBackgroundColor( c );
368  }
369  if ( m_note )
370  m_note->blockEmitDataChanged( false );
371 }
372 
373 void KNoteEdit::textAlignLeft()
374 {
375  if (!acceptRichText())
376  return;
377  setAlignment( Qt::AlignLeft );
378  m_textAlignLeft->setChecked( true );
379 }
380 
381 void KNoteEdit::textAlignCenter()
382 {
383  if (!acceptRichText())
384  return;
385  setAlignment( Qt::AlignCenter );
386  m_textAlignCenter->setChecked( true );
387 }
388 
389 void KNoteEdit::textAlignRight()
390 {
391  if (!acceptRichText())
392  return;
393  setAlignment( Qt::AlignRight );
394  m_textAlignRight->setChecked( true );
395 }
396 
397 void KNoteEdit::textAlignBlock()
398 {
399  if (!acceptRichText())
400  return;
401  setAlignment( Qt::AlignJustify );
402  m_textAlignBlock->setChecked( true );
403 }
404 
405 void KNoteEdit::textList()
406 {
407  if (!acceptRichText())
408  return;
409  QTextCursor c = textCursor();
410  c.beginEditBlock();
411 
412  if ( m_textList->isChecked() ) {
413  QTextListFormat lf;
414  QTextBlockFormat bf = c.blockFormat();
415 
416  lf.setIndent( bf.indent() + 1 );
417  bf.setIndent( 0 );
418 
419  lf.setStyle( QTextListFormat::ListDisc );
420 
421  c.setBlockFormat( bf );
422  c.createList( lf );
423  } else {
424  QTextBlockFormat bf;
425  bf.setObjectIndex( -1 );
426  c.setBlockFormat( bf );
427 
428  }
429 
430  c.endEditBlock();
431 }
432 
433 void KNoteEdit::textSuperScript()
434 {
435  if (!acceptRichText())
436  return;
437  QTextCharFormat f;
438  if ( m_textSuper->isChecked() ) {
439  if ( m_textSub->isChecked() )
440  m_textSub->setChecked( false );
441  f.setVerticalAlignment( QTextCharFormat::AlignSuperScript );
442  } else {
443  f.setVerticalAlignment( QTextCharFormat::AlignNormal );
444  }
445  mergeCurrentCharFormat( f );
446 }
447 
448 void KNoteEdit::textSubScript()
449 {
450  if (!acceptRichText())
451  return;
452  QTextCharFormat f;
453  if ( m_textSub->isChecked() ) {
454  if ( m_textSuper->isChecked() )
455  m_textSuper->setChecked( false );
456  f.setVerticalAlignment( QTextCharFormat::AlignSubScript );
457  } else {
458  f.setVerticalAlignment( QTextCharFormat::AlignNormal );
459  }
460  mergeCurrentCharFormat( f );
461 }
462 
463 void KNoteEdit::textIncreaseIndent()
464 {
465  if (!acceptRichText())
466  return;
467  QTextBlockFormat f = textCursor().blockFormat();
468  f.setIndent( f.indent() + 1 );
469  textCursor().setBlockFormat( f );
470 }
471 
472 void KNoteEdit::textDecreaseIndent()
473 {
474  if (!acceptRichText())
475  return;
476  QTextBlockFormat f = textCursor().blockFormat();
477  short int curIndent = f.indent();
478 
479  if ( curIndent > 0 ) {
480  f.setIndent( curIndent - 1 );
481  }
482  textCursor().setBlockFormat( f );
483 }
484 
485 
488 void KNoteEdit::keyPressEvent( QKeyEvent *e )
489 {
490  KTextEdit::keyPressEvent( e );
491 
492  if ( m_autoIndentMode &&
493  ( ( e->key() == Qt::Key_Return ) || ( e->key() == Qt::Key_Enter ) ) ) {
494  autoIndent();
495  }
496 }
497 
498 void KNoteEdit::focusInEvent( QFocusEvent *e )
499 {
500  KTextEdit::focusInEvent( e );
501 
502  setVerticalScrollBarPolicy( Qt::ScrollBarAsNeeded );
503  setHorizontalScrollBarPolicy( Qt::ScrollBarAsNeeded );
504 }
505 
506 void KNoteEdit::focusOutEvent( QFocusEvent *e )
507 {
508  setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
509  setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
510 
511  KTextEdit::focusOutEvent( e );
512 }
513 
516 void KNoteEdit::slotCurrentCharFormatChanged( const QTextCharFormat &f )
517 {
518  if (!acceptRichText())
519  return;
520 
521  // font changes
522  m_textFont->setFont( f.fontFamily() );
523  m_textSize->setFontSize( (f.fontPointSize()>0 ) ? ( int ) f.fontPointSize() :10);
524 
525  m_textBold->setChecked( f.font().bold() );
526  m_textItalic->setChecked( f.fontItalic() );
527  m_textUnderline->setChecked( f.fontUnderline() );
528  m_textStrikeOut->setChecked( f.fontStrikeOut() );
529 
530  // color changes
531  QPixmap pix( ICON_SIZE, ICON_SIZE );
532  pix.fill( f.foreground().color() );
533  m_textColor->QAction::setIcon( pix );
534 
535  // vertical alignment changes
536  QTextCharFormat::VerticalAlignment va = f.verticalAlignment();
537  if ( va == QTextCharFormat::AlignNormal ) {
538  m_textSuper->setChecked( false );
539  m_textSub->setChecked( false );
540  } else if ( va == QTextCharFormat::AlignSuperScript ) {
541  m_textSuper->setChecked( true );
542  } else if ( va == QTextCharFormat::AlignSubScript ) {
543  m_textSub->setChecked( true );
544  }
545 }
546 
547 
548 void KNoteEdit::slotCursorPositionChanged()
549 {
550  if (!acceptRichText())
551  return;
552  // alignment changes
553  const Qt::Alignment a = alignment();
554  if ( a & Qt::AlignLeft ) {
555  m_textAlignLeft->setChecked( true );
556  } else if ( a & Qt::AlignHCenter ) {
557  m_textAlignCenter->setChecked( true );
558  } else if ( a & Qt::AlignRight ) {
559  m_textAlignRight->setChecked( true );
560  } else if ( a & Qt::AlignJustify ) {
561  m_textAlignBlock->setChecked( true );
562  }
563 }
564 
567 void KNoteEdit::autoIndent()
568 {
569  QTextCursor c = textCursor();
570  QTextBlock b = c.block();
571 
572  QString string;
573  while ( ( b.previous().length() > 0 ) && string.trimmed().isEmpty() ) {
574  b = b.previous();
575  string = b.text();
576  }
577 
578  if ( string.trimmed().isEmpty() ) {
579  return;
580  }
581 
582  // This routine returns the whitespace before the first non white space
583  // character in string.
584  // It is assumed that string contains at least one non whitespace character
585  // ie \n \r \t \v \f and space
586  QString indentString;
587 
588  const int len = string.length();
589  int i = 0;
590  while ( i < len && string.at( i ).isSpace() ) {
591  indentString += string.at( i++ );
592  }
593 
594  if ( !indentString.isEmpty() ) {
595  c.insertText( indentString );
596  }
597 }
598 
599 void KNoteEdit::enableRichTextActions(bool enabled)
600 {
601  m_textColor->setEnabled( enabled );
602  m_textFont->setEnabled( enabled );
603  m_textSize->setEnabled( enabled );
604 
605  m_textBold->setEnabled( enabled );
606  m_textItalic->setEnabled( enabled );
607  m_textUnderline->setEnabled( enabled );
608  m_textStrikeOut->setEnabled( enabled );
609 
610  m_textAlignLeft->setEnabled( enabled );
611  m_textAlignCenter->setEnabled( enabled );
612  m_textAlignRight->setEnabled( enabled );
613  m_textAlignBlock->setEnabled( enabled );
614 
615  m_textList->setEnabled( enabled );
616  m_textSuper->setEnabled( enabled );
617  m_textSub->setEnabled( enabled );
618 
619  m_textIncreaseIndent->setEnabled( enabled );
620  m_textDecreaseIndent->setEnabled( enabled );
621 }
622 
623 void KNoteEdit::slotInsertDate()
624 {
625  insertPlainText( KGlobal::locale()->formatDateTime( QDateTime::currentDateTime() ) );
626 }
627 
628 
629 #include "knoteedit.moc"
KNoteEdit::textBold
void textBold(bool)
Definition: knoteedit.cpp:323
KNoteEdit::focusInEvent
virtual void focusInEvent(QFocusEvent *)
Definition: knoteedit.cpp:498
KNoteEdit::slotTextColor
void slotTextColor()
Definition: knoteedit.cpp:343
KNoteEdit::setTextFont
void setTextFont(const QFont &font)
Definition: knoteedit.cpp:265
KNoteEdit::slotTextBackgroundColor
void slotTextBackgroundColor()
Definition: knoteedit.cpp:358
KNoteEdit::textAlignLeft
void textAlignLeft()
Definition: knoteedit.cpp:373
KNoteEdit::textAlignRight
void textAlignRight()
Definition: knoteedit.cpp:389
KNoteEdit::slotInsertDate
void slotInsertDate()
Definition: knoteedit.cpp:623
QWidget
KNote
Definition: knote.h:50
KNoteEdit::textList
void textList()
Definition: knoteedit.cpp:405
ICON_SIZE
static const short ICON_SIZE
Definition: knoteedit.cpp:42
KNoteEdit::setAutoIndentMode
void setAutoIndentMode(bool newmode)
Definition: knoteedit.cpp:285
KNoteEdit::text
QString text() const
Definition: knoteedit.cpp:256
KNoteEdit::setTextFontSize
void setTextFontSize(int)
Definition: knoteedit.cpp:274
KNoteEdit::setTabStop
void setTabStop(int tabs)
Definition: knoteedit.cpp:279
knote.h
KNoteEdit::setRichText
void setRichText(bool)
public slots
Definition: knoteedit.cpp:293
KNoteEdit::~KNoteEdit
~KNoteEdit()
Definition: knoteedit.cpp:194
KNoteEdit::KNoteEdit
KNoteEdit(const QString &configFile, KActionCollection *actions, QWidget *parent=0)
Definition: knoteedit.cpp:45
SEP
static const short SEP
Definition: knoteedit.cpp:41
KNoteEdit::focusOutEvent
virtual void focusOutEvent(QFocusEvent *)
Definition: knoteedit.cpp:506
KNoteEdit::setText
void setText(const QString &text)
Definition: knoteedit.cpp:247
KNoteEdit::mousePopupMenuImplementation
void mousePopupMenuImplementation(const QPoint &pos)
Definition: knoteedit.cpp:222
KNoteEdit::setNote
void setNote(KNote *_note)
Definition: knoteedit.cpp:198
KNoteEdit::keyPressEvent
virtual void keyPressEvent(QKeyEvent *)
protected methods
Definition: knoteedit.cpp:488
KNoteEdit::textSubScript
void textSubScript()
Definition: knoteedit.cpp:448
KNoteEdit::textStrikeOut
void textStrikeOut(bool)
Definition: knoteedit.cpp:333
KNote::blockEmitDataChanged
void blockEmitDataChanged(bool _b)
Definition: knote.h:74
KNoteEdit::textAlignCenter
void textAlignCenter()
Definition: knoteedit.cpp:381
KNoteEdit::textDecreaseIndent
void textDecreaseIndent()
Definition: knoteedit.cpp:472
KNoteEdit::textSuperScript
void textSuperScript()
Definition: knoteedit.cpp:433
knoteedit.h
KNoteEdit::textIncreaseIndent
void textIncreaseIndent()
Definition: knoteedit.cpp:463
KNoteEdit::textAlignBlock
void textAlignBlock()
Definition: knoteedit.cpp:397
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