Debian Codegraph @

src/scoreeditor.h

raw symbols SCIP
1 /*
2 Copyright (C) 2011 Andres Cabrera
3 [email protected]
4
5 This file is part of CsoundQt.
6
7 CsoundQt is free software; you can redistribute it
8 and/or modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
11
12 CsoundQt is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with Csound; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20 02111-1307 USA
21 */
22
23 #ifndef SCOREEDITOR_H
24 #define SCOREEDITOR_H
25
26 #include <QWidget>
27 #include <QContextMenuEvent>
28 #include "texteditor.h"
29 #include "eventsheet.h"
30
31 class ScoreEditor : public QWidget
32 {
33 Q_OBJECT
34 public:
35 explicit ScoreEditor(QWidget *parent = 0);
36
37 public slots:
38 void setMode(int mode);
39 void setPlainText(QString text);
40 void setFontPointSize(float size);
41 void setTabStopWidth(int width);
42 void setLineWrapMode(QTextEdit::LineWrapMode mode);
43
44 QString getPlainText();
45 QString getSelection();
46
47 void clearUndoRedoStacks();
48 void modified();
49
50 void cut();
51 void copy();
52 void paste();
53
54 void undo();
55 void redo();
56
57 protected:
58
59 private:
60 int m_mode; // 0=text 1=sheet
61 TextEditor *m_textEditor;
62 EventSheet *m_sheet;
63
64 signals:
65 void textChanged();
66 };
67
68 #endif // SCOREEDITOR_H