File: frame.h

package info (click to toggle)
antimony 0.9.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,476 kB
  • sloc: cpp: 42,596; ansic: 28,661; python: 1,093; yacc: 128; lex: 114; sh: 90; makefile: 10
file content (45 lines) | stat: -rw-r--r-- 908 bytes parent folder | download | duplicates (3)
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
#pragma once

#include <QWidget>
#include <QPlainTextEdit>

struct Script;
class ScriptEditor;

class ScriptFrame : public QWidget
{
public:
    ScriptFrame(Script* script, QWidget* parent=NULL);

    /*
     *  Override paint event so that we can style the widget with CSS.
     */
    void paintEvent(QPaintEvent* event) override;

    /*
     *  On resize event, adjust the box sizes for output and errors.
     */
    void resizeEvent(QResizeEvent* event) override;

    /*
     *  Returns the editor object
     */
    ScriptEditor* getEditor() const { return editor; }

    /*
     *  Fills the output pane and resizes all three panes
     */
    void setOutput(QString out);

    /*
     *  Fills the error pane and resizes all three panes
     */
    void setError(QString err);

protected:
    void resizePanes();

    ScriptEditor* editor;
    QPlainTextEdit* output;
    QPlainTextEdit* error;
};