aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2016-09-12 10:47:47 -0400
committerKen Moore <ken@pcbsd.org>2016-09-12 10:47:47 -0400
commit11f26a3cb825823f2e89b2b3d2a5a1a34965d73e (patch)
tree548315c7ab55de2b984e206ffb0291efa032ccd6 /src-qt5/desktop-utils/lumina-textedit/MainUI.cpp
parentAdd a font selector option to LTE, so monospaced fonts can be used as needed ... (diff)
downloadlumina-11f26a3cb825823f2e89b2b3d2a5a1a34965d73e.tar.gz
lumina-11f26a3cb825823f2e89b2b3d2a5a1a34965d73e.tar.bz2
lumina-11f26a3cb825823f2e89b2b3d2a5a1a34965d73e.zip
Add status tips for the cursor position.
Now you can see which column the cursor is on if the user needs to keep under a particular number.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-textedit/MainUI.cpp')
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/MainUI.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp b/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp
index aacb0424..1dd8cd2f 100644
--- a/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp
@@ -159,6 +159,7 @@ void MainUI::OpenFile(QString file){
PlainTextEditor *edit = new PlainTextEditor(settings, this);
connect(edit, SIGNAL(FileLoaded(QString)), this, SLOT(updateTab(QString)) );
connect(edit, SIGNAL(UnsavedChanges(QString)), this, SLOT(updateTab(QString)) );
+ connect(edit, SIGNAL(statusTipChanged()), this, SLOT(updateStatusTip()) );
ui->tabWidget->addTab(edit, files[i].section("/",-1));
edit->showLineNumbers(ui->actionLine_Numbers->isChecked());
edit->setLineWrapMode( ui->actionWrap_Lines->isChecked() ? QPlainTextEdit::WidgetWidth : QPlainTextEdit::NoWrap);
@@ -194,6 +195,12 @@ void MainUI::fontChanged(const QFont &font){
QApplication::setFont(font, "PlainTextEditor");
}
+void MainUI::updateStatusTip(){
+ QString msg = currentEditor()->statusTip();
+ //ui->statusbar->clearMessage();
+ ui->statusbar->showMessage(msg);
+}
+
void MainUI::UpdateHighlighting(QAction *act){
if(act!=0){
//Single-editor change
bgstack15