aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/desktop-utils')
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/MainUI.cpp11
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/MainUI.h3
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/main.cpp4
3 files changed, 17 insertions, 1 deletions
diff --git a/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp b/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp
index b5790cc5..49314e1f 100644
--- a/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp
@@ -24,8 +24,12 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){
fontbox->setFocusPolicy(Qt::NoFocus);
QWidget *spacer = new QWidget(this);
spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ fontSizes = new QSpinBox(this);
+ fontSizes->setRange(5, 72);
+ fontSizes->setValue(9);
ui->toolBar->addWidget(spacer);
ui->toolBar->addWidget(fontbox);
+ ui->toolBar->addWidget(fontSizes);
//Load settings
settings = new QSettings("lumina-desktop","lumina-textedit");
if(settings->contains("lastfont")){
@@ -77,6 +81,7 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){
connect(ui->line_replace, SIGNAL(returnPressed()), this, SLOT(replaceOne()) );
connect(colorDLG, SIGNAL(colorsChanged()), this, SLOT(UpdateHighlighting()) );
connect(fontbox, SIGNAL(currentFontChanged(const QFont&)), this, SLOT(fontChanged(const QFont&)) );
+ connect(fontSizes, SIGNAL(valueChanged(int)), this, SLOT(changeFontSize(int)));
updateIcons();
//Now load the initial size of the window
QSize lastSize = settings->value("lastSize",QSize()).toSize();
@@ -212,6 +217,12 @@ void MainUI::fontChanged(const QFont &font){
QApplication::setFont(font, "PlainTextEditor");
}
+void MainUI::changeFontSize(int newFontSize){
+ QFont currentFont = fontbox->currentFont();
+ currentFont.setPointSize(newFontSize);
+ QApplication::setFont(currentFont, "PlainTextEditor");
+}
+
void MainUI::updateStatusTip(){
QString msg = currentEditor()->statusTip();
//ui->statusbar->clearMessage();
diff --git a/src-qt5/desktop-utils/lumina-textedit/MainUI.h b/src-qt5/desktop-utils/lumina-textedit/MainUI.h
index 097b747e..69ea589c 100644
--- a/src-qt5/desktop-utils/lumina-textedit/MainUI.h
+++ b/src-qt5/desktop-utils/lumina-textedit/MainUI.h
@@ -12,6 +12,7 @@
#include <QSettings>
#include <QShortcut>
#include <QFontComboBox>
+#include <QSpinBox>
#include "PlainTextEditor.h"
#include "ColorDialog.h"
@@ -37,6 +38,7 @@ private:
ColorDialog *colorDLG;
QSettings *settings;
QShortcut *closeFindS;
+ QSpinBox *fontSizes;
//Simplification functions
PlainTextEditor* currentEditor();
@@ -51,6 +53,7 @@ private slots:
void SaveFileAs();
void fontChanged(const QFont &font);
void updateStatusTip();
+ void changeFontSize(int newFontSize);
//Other Menu Actions
void UpdateHighlighting(QAction *act = 0);
diff --git a/src-qt5/desktop-utils/lumina-textedit/main.cpp b/src-qt5/desktop-utils/lumina-textedit/main.cpp
index ec4503a0..61f6672e 100644
--- a/src-qt5/desktop-utils/lumina-textedit/main.cpp
+++ b/src-qt5/desktop-utils/lumina-textedit/main.cpp
@@ -18,12 +18,14 @@ int main(int argc, char *argv[]) {
LUtils::LoadTranslation(&a, "l-te");
//Now go ahead and setup the app
//LuminaThemeEngine theme(&a);
- QStringList args;
+ QStringList args; //list<string> in c++11 stl container.
for(int i=1; i<argc; i++){
+ // qDebug() << argv[i] << endl;
args << QString(argv[i]);
}
//Now start the window
MainUI W;
+
//QObject::connect(&theme, SIGNAL(updateIcons()), &W, SLOT(updateIcons()) );
W.LoadArguments(args);
W.show();
bgstack15