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

lokalize

  • sources
  • kde-4.14
  • kdesdk
  • lokalize
  • src
noteeditor.h
Go to the documentation of this file.
1 /* ****************************************************************************
2  This file is part of Lokalize
3 
4  Copyright (C) 2009 by Nick Shaforostoff <shafff@ukr.net>
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 as
8  published by the Free Software Foundation; either version 2 of
9  the License or (at your option) version 3 or any later version
10  accepted by the membership of KDE e.V. (or its successor approved
11  by the membership of KDE e.V.), which shall act as a proxy
12  defined in Section 14 of version 3 of the license.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program. If not, see <http://www.gnu.org/licenses/>.
21 
22 **************************************************************************** */
23 
24 #ifndef NOTEEDITOR_H
25 #define NOTEEDITOR_H
26 
27 #include "note.h"
28 
29 #include <KTextEdit>
30 #include <QPlainTextEdit>
31 class QStringListModel;
32 class QLabel;
33 class KComboBox;
34 class KTextBrowser;
35 class TextEdit;
36 
37 int displayNotes(KTextBrowser* m_browser, const QVector<Note>& notes, int active=0, bool multiple=true);
38 
39 class NoteEditor: public QWidget
40 {
41 Q_OBJECT
42 public:
43  NoteEditor(QWidget* parent);
44  ~NoteEditor(){}
45 
46  Note note();
47  void setNote(const Note&, int idx);
48  int noteIndex(){return m_idx;}
49 
50  void setNoteAuthors(const QStringList&);
51  void setFromFieldVisible(bool);
52 
53 signals:
54  void accepted();
55  void rejected();
56 
57 private:
58  KComboBox* m_from;
59  QLabel* m_fromLabel;
60  QStringListModel* m_authors;
61  TextEdit* m_edit;
62  int m_idx;
63  Note m_note;
64 };
65 
66 
67 class TextEdit: public QPlainTextEdit
68 {
69 Q_OBJECT
70 public:
71  TextEdit(QWidget* parent): QPlainTextEdit(parent){}
72  void keyPressEvent(QKeyEvent* e);
73 signals:
74  void accepted();
75  void rejected();
76 };
77 
78 #endif
QWidget
NoteEditor::rejected
void rejected()
TextEdit::TextEdit
TextEdit(QWidget *parent)
Definition: noteeditor.h:71
NoteEditor::~NoteEditor
~NoteEditor()
Definition: noteeditor.h:44
Note
Definition: note.h:29
QPlainTextEdit
displayNotes
int displayNotes(KTextBrowser *m_browser, const QVector< Note > &notes, int active=0, bool multiple=true)
Definition: noteeditor.cpp:124
TextEdit::accepted
void accepted()
NoteEditor::NoteEditor
NoteEditor(QWidget *parent)
Definition: noteeditor.cpp:55
NoteEditor
Definition: noteeditor.h:39
QStringListModel
QStringList
KTextBrowser
NoteEditor::accepted
void accepted()
QKeyEvent
QVector
note.h
NoteEditor::setNoteAuthors
void setNoteAuthors(const QStringList &)
Definition: noteeditor.cpp:117
TextEdit::keyPressEvent
void keyPressEvent(QKeyEvent *e)
Definition: noteeditor.cpp:44
NoteEditor::setFromFieldVisible
void setFromFieldVisible(bool)
Definition: noteeditor.cpp:93
NoteEditor::note
Note note()
Definition: noteeditor.cpp:99
NoteEditor::noteIndex
int noteIndex()
Definition: noteeditor.h:48
TextEdit::rejected
void rejected()
NoteEditor::setNote
void setNote(const Note &, int idx)
Definition: noteeditor.cpp:106
QLabel
QObject::parent
QObject * parent() const
TextEdit
Definition: noteeditor.h:67
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

lokalize

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

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • umbrello
  •   umbrello

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