-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinterlinearchunkeditor.h
66 lines (48 loc) · 1.56 KB
/
interlinearchunkeditor.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*!
\class InterlinearChunkEditor
\ingroup Interlinear
\brief This in a widget for displaying a portion of an interlinear text, allowing the user to view a few lines at a time (which is helpful for efficiency).
This class keeps track of which lines are being displayed. It contains an instance of TextTabWidget, and updates this as needed. (It contains a TextTabWidget instead of an InterlinearDisplayWidget, because users may have several tabs to choose from, displayed a few lines at a time.)
*/
#ifndef INTERLINEARCHUNKEDITOR_H
#define INTERLINEARCHUNKEDITOR_H
#include <QWidget>
class Text;
class Project;
class TextTabWidget;
class Focus;
#include "view.h"
namespace Ui {
class InterlinearChunkEditor;
}
class InterlinearChunkEditor : public QWidget
{
Q_OBJECT
public:
InterlinearChunkEditor(Text *text, Project *project, View::Type type, int chunkSize, QWidget *parent = nullptr);
~InterlinearChunkEditor();
void moveToLine(int line);
Text * text();
void setFocus( const QList<Focus> & foci );
private:
Ui::InterlinearChunkEditor *ui;
Text * mText;
Project * mProject;
View::Type mType;
TextTabWidget * mTextTabWidget;
int mChunkSize;
int mPosition;
void moveToPosition(int position);
QList<int> makeLines();
void closeEvent(QCloseEvent *event);
void keyReleaseEvent(QKeyEvent * event);
void setPositionIndicatorText();
private slots:
void next();
void previous();
void goTo();
void beginning();
void end();
void refreshLayout();
};
#endif // INTERLINEARCHUNKEDITOR_H