From 9618f0ebbf4b88045247c01ce8c8f58203508ebf Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Tue, 12 May 2015 16:19:40 -0400 Subject: Imported Upstream version 3.0.6 --- .../guiSQLiteStudio/multieditor/multieditor.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'SQLiteStudio3/guiSQLiteStudio/multieditor/multieditor.cpp') 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 #include #include +#include static QHash 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); -- cgit v1.2.3