aboutsummaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'SQLiteStudio3/guiSQLiteStudio/multieditor/multieditor.cpp')
-rw-r--r--SQLiteStudio3/guiSQLiteStudio/multieditor/multieditor.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditor.cpp b/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditor.cpp
index 2bae2f9..c99b774 100644
--- a/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditor.cpp
+++ b/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditor.cpp
@@ -26,6 +26,7 @@
#include <QToolButton>
#include <QDebug>
#include <QKeyEvent>
+#include <themetuner.h>
static QHash<QString,bool> missingEditorPluginsAlreadyWarned;
@@ -47,9 +48,17 @@ void MultiEditor::init()
QHBoxLayout* hbox = new QHBoxLayout();
hbox->setMargin(0);
- hbox->setSpacing(0);
+ hbox->setSpacing(10);
top->setLayout(hbox);
+ cornerLabel = new QLabel();
+ QFont font = cornerLabel->font();
+ font.setBold(true);
+ cornerLabel->setFont(font);
+ cornerLabel->setFrameStyle(QFrame::StyledPanel|QFrame::Plain);
+ hbox->addWidget(cornerLabel);
+ cornerLabel->setVisible(false);
+
nullCheck = new QCheckBox(tr("Null value", "multieditor"));
hbox->addWidget(nullCheck);
@@ -156,6 +165,7 @@ void MultiEditor::addEditor(MultiEditorWidget* editorWidget)
connect(editorWidget, SIGNAL(valueModified()), this, SLOT(invalidateValue()));
editors << editorWidget;
tabs->addTab(editorWidget, editorWidget->getTabLabel().replace("&", "&&"));
+ THEME_TUNER->manageCompactLayout(editorWidget);
editorWidget->installEventFilter(this);
}
@@ -241,6 +251,12 @@ void MultiEditor::focusThisEditor()
w->focusThisWidget();
}
+void MultiEditor::setCornerLabel(const QString &label)
+{
+ cornerLabel->setText(label);
+ cornerLabel->setVisible(!label.isNull());
+}
+
void MultiEditor::loadBuiltInEditors()
{
PLUGINS->loadBuiltInPlugin(new MultiEditorBoolPlugin);