Canorus
0.7
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
widgets
sourceviewport.h
Go to the documentation of this file.
1
8
#ifndef SOURCEVIEWPORT_H_
9
#define SOURCEVIEWPORT_H_
10
11
#include <QTextEdit>
12
13
#include "
widgets/viewport.h
"
14
15
class
QPushButton;
16
class
QGridLayout;
17
18
class
CADocument
;
19
class
CAVoice
;
20
class
CALyricsContext
;
21
22
class
CASourceViewPort
:
public
CAViewPort
{
23
Q_OBJECT
24
25
enum
CASourceViewPortType
{
26
LilyPond
,
27
CanorusML
28
};
29
30
public
:
31
CASourceViewPort
(
CADocument
*doc,
QWidget
*parent=0);
32
CASourceViewPort
(
CAVoice
*
voice
,
QWidget
*parent=0);
33
CASourceViewPort
(
CALyricsContext
*lc,
QWidget
*parent=0);
34
virtual
~CASourceViewPort
();
35
36
CASourceViewPort
*
clone
();
37
CASourceViewPort
*
clone
(
QWidget
*parent);
38
39
inline
CASourceViewPortType
sourceViewPortType
() {
return
_sourceViewPortType
; }
40
inline
void
setSourceViewPortType
(
CASourceViewPortType
t ) {
_sourceViewPortType
= t; }
41
42
inline
CADocument
*
document
() {
return
_document
; };
43
inline
CAVoice
*
voice
() {
return
_voice
; }
44
inline
CALyricsContext
*
lyricsContext
() {
return
_lyricsContext
; }
45
inline
void
setDocument
(
CADocument
*doc ) {
_document
= doc; }
46
inline
void
setVoice
(
CAVoice
*
voice
) {
_voice
=
voice
; }
47
inline
void
setLyricsContext
(
CALyricsContext
*c ) {
_lyricsContext
= c; }
48
49
inline
void
selectAll
() {
_textEdit
->selectAll(); }
50
signals:
51
void
CACommit
( QString documentString );
52
53
public
slots:
54
void
rebuild
();
55
56
private
slots:
57
void
on_commit_clicked
();
58
59
private
:
60
void
setupUI
();
61
62
class
CATextEdit
;
63
friend
class
CASourceViewPort::CATextEdit
;
64
66
// Widgets //
68
QTextEdit
*
_textEdit
;
69
QPushButton *
_commit
;
70
QPushButton *
_revert
;
71
QGridLayout *
_layout
;
72
74
// Properties //
76
CASourceViewPortType
_sourceViewPortType
;
77
CADocument
*
_document
;
78
CAVoice
*
_voice
;
79
CALyricsContext
*
_lyricsContext
;
80
};
81
82
#endif
/* SOURCEVIEWPORT_H_ */
Generated on Fri Jan 11 2013 14:40:13 for Canorus by
1.8.3