aboutsummaryrefslogtreecommitdiff
path: root/src/evidence.cpp
diff options
context:
space:
mode:
authorCrystalwarrior <varsash@gmail.com>2019-09-25 02:05:52 +0300
committerCrystalwarrior <varsash@gmail.com>2019-09-25 02:05:52 +0300
commit923548c99746858846764e47fa96899e7c5ef2ab (patch)
tree5418619cdc32395229c87227ae8ba3f9c13c0a01 /src/evidence.cpp
parent7097053723bab5cb91c312abaafeb69dc07dd4ac (diff)
Hellcommit of doom and suffering
Create two new helper functions - get_chat_markdown and remake read_char_ini_tag to be read_ini_tags for more general purpose Modify aolineedit to support preserving selection after unfocusing (building this for using dropdown list for setting colors), as well as remove the setReadOnly functionality and use it in signals instead Overhaul the color system to get rid of inline colors, allow full customization of colors and usage of configuration files for every facet of how a color functions (should we be talking, should we remove that markdown char, etc.) Complete overhaul of color markdowns system TODO: Make this thing not lag to hell, fix chat messages hogging the IC as the animation never ends apparently
Diffstat (limited to 'src/evidence.cpp')
-rw-r--r--src/evidence.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/evidence.cpp b/src/evidence.cpp
index b04a9d60..dfbc675f 100644
--- a/src/evidence.cpp
+++ b/src/evidence.cpp
@@ -26,7 +26,7 @@ void Courtroom::initialize_evidence()
ui_evidence_description->setStyleSheet("background-color: rgba(0, 0, 0, 0);"
"color: white;");
- connect(ui_evidence_name, SIGNAL(textEdited(QString)), this, SLOT(on_evidence_name_edited(QString)));
+ connect(ui_evidence_name, SIGNAL(returnPressed()), this, SLOT(on_evidence_name_edited()));
connect(ui_evidence_name, SIGNAL(double_clicked()), this, SLOT(on_evidence_name_double_clicked()));
connect(ui_evidence_left, SIGNAL(clicked()), this, SLOT(on_evidence_left_clicked()));
connect(ui_evidence_right, SIGNAL(clicked()), this, SLOT(on_evidence_right_clicked()));
@@ -179,8 +179,9 @@ void Courtroom::set_evidence_page()
}
}
-void Courtroom::on_evidence_name_edited(QString text)
+void Courtroom::on_evidence_name_edited()
{
+ ui_evidence_name->setReadOnly(true);
if (current_evidence >= local_evidence_list.size())
return;
@@ -206,6 +207,7 @@ void Courtroom::on_evidence_name_double_clicked()
void Courtroom::on_evidence_image_name_edited()
{
+ ui_evidence_image_name->setReadOnly(true);
if (current_evidence >= local_evidence_list.size())
return;