started reworking evidence description
This commit is contained in:
parent
3f97df6174
commit
48f0440872
@ -45,7 +45,8 @@ SOURCES += main.cpp\
|
|||||||
aoevidencebutton.cpp \
|
aoevidencebutton.cpp \
|
||||||
charselect.cpp \
|
charselect.cpp \
|
||||||
aotextarea.cpp \
|
aotextarea.cpp \
|
||||||
aolineedit.cpp
|
aolineedit.cpp \
|
||||||
|
aotextedit.cpp
|
||||||
|
|
||||||
HEADERS += lobby.h \
|
HEADERS += lobby.h \
|
||||||
aoimage.h \
|
aoimage.h \
|
||||||
@ -72,7 +73,8 @@ HEADERS += lobby.h \
|
|||||||
aoblipplayer.h \
|
aoblipplayer.h \
|
||||||
aoevidencebutton.h \
|
aoevidencebutton.h \
|
||||||
aotextarea.h \
|
aotextarea.h \
|
||||||
aolineedit.h
|
aolineedit.h \
|
||||||
|
aotextedit.h
|
||||||
|
|
||||||
unix:LIBS += -L$$PWD -lbass
|
unix:LIBS += -L$$PWD -lbass
|
||||||
win32:LIBS += "$$PWD/bass.dll"
|
win32:LIBS += "$$PWD/bass.dll"
|
||||||
|
21
aotextedit.cpp
Normal file
21
aotextedit.cpp
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#include "aotextedit.h"
|
||||||
|
|
||||||
|
AOTextEdit::AOTextEdit(QWidget *parent) : QPlainTextEdit(parent)
|
||||||
|
{
|
||||||
|
this->setReadOnly(true);
|
||||||
|
|
||||||
|
connect(this, SIGNAL(returnPressed()), this, SLOT(on_enter_pressed()));
|
||||||
|
}
|
||||||
|
|
||||||
|
void AOTextEdit::mouseDoubleClickEvent(QMouseEvent *e)
|
||||||
|
{
|
||||||
|
QPlainTextEdit::mouseDoubleClickEvent(e);
|
||||||
|
|
||||||
|
this->setReadOnly(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AOTextEdit::on_enter_pressed()
|
||||||
|
{
|
||||||
|
this->setReadOnly(true);
|
||||||
|
}
|
||||||
|
|
23
aotextedit.h
Normal file
23
aotextedit.h
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#ifndef AOTEXTEDIT_H
|
||||||
|
#define AOTEXTEDIT_H
|
||||||
|
|
||||||
|
#include <QPlainTextEdit>
|
||||||
|
|
||||||
|
class AOTextEdit : public QPlainTextEdit
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
AOTextEdit(QWidget *parent);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void mouseDoubleClickEvent(QMouseEvent *e);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void double_clicked();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void on_enter_pressed();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // AOTEXTEDIT_H
|
@ -15,6 +15,7 @@
|
|||||||
#include "aoevidencebutton.h"
|
#include "aoevidencebutton.h"
|
||||||
#include "aotextarea.h"
|
#include "aotextarea.h"
|
||||||
#include "aolineedit.h"
|
#include "aolineedit.h"
|
||||||
|
#include "aotextedit.h"
|
||||||
#include "datatypes.h"
|
#include "datatypes.h"
|
||||||
|
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
@ -303,7 +304,7 @@ private:
|
|||||||
AOButton *ui_evidence_right;
|
AOButton *ui_evidence_right;
|
||||||
AOImage *ui_evidence_overlay;
|
AOImage *ui_evidence_overlay;
|
||||||
AOButton *ui_evidence_x;
|
AOButton *ui_evidence_x;
|
||||||
QPlainTextEdit *ui_evidence_description;
|
AOTextEdit *ui_evidence_description;
|
||||||
|
|
||||||
AOImage *ui_char_select_background;
|
AOImage *ui_char_select_background;
|
||||||
|
|
||||||
|
@ -23,8 +23,7 @@ void Courtroom::construct_evidence()
|
|||||||
ui_evidence_x = new AOButton(ui_evidence_overlay, ao_app);
|
ui_evidence_x = new AOButton(ui_evidence_overlay, ao_app);
|
||||||
ui_evidence_x->setText("X");
|
ui_evidence_x->setText("X");
|
||||||
|
|
||||||
ui_evidence_description = new QPlainTextEdit(ui_evidence_overlay);
|
ui_evidence_description = new AOTextEdit(ui_evidence_overlay);
|
||||||
ui_evidence_description->setReadOnly(true);
|
|
||||||
ui_evidence_description->setStyleSheet("background-color: rgba(0, 0, 0, 0);"
|
ui_evidence_description->setStyleSheet("background-color: rgba(0, 0, 0, 0);"
|
||||||
"color: white;");
|
"color: white;");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user