diff options
| author | 2017-02-09 04:37:26 -0500 | |
|---|---|---|
| committer | 2017-02-09 04:37:26 -0500 | |
| commit | c9d6debf9015b7853c3e061bbc64a555d85e2fcd (patch) | |
| tree | 53341bc57ae9fbad2beb5b6c08d97a68bee0ec8e /SQLiteStudio3/guiSQLiteStudio/dialogs | |
| parent | d5caba2b1f36dc3b92fa705a06097d0597fa2ddd (diff) | |
| parent | d9aa870e5d509cc7309ab82dd102a937ab58613a (diff) | |
Merge tag 'upstream/3.1.1+dfsg1'
Upstream version 3.1.1+dfsg1
# gpg: Signature made Thu 09 Feb 2017 04:37:24 AM EST
# gpg: using RSA key 5001E1B09AA3744B
# gpg: issuer "unit193@ubuntu.com"
# gpg: Good signature from "Unit 193 <unit193@ubuntu.com>" [unknown]
# gpg: aka "Unit 193 <unit193@gmail.com>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 8DB3 E586 865D 2B4A 2B18 5A5C 5001 E1B0 9AA3 744B
Diffstat (limited to 'SQLiteStudio3/guiSQLiteStudio/dialogs')
10 files changed, 196 insertions, 108 deletions
diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.cpp b/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.cpp index 42c7099..85ae12d 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.cpp @@ -199,7 +199,7 @@ void ConfigDialog::init() << CFG_UI.General.ShowVirtualTableLabels;
for (CfgEntry* cfg : entries)
- connect(cfg, &CfgEntry::changed, this, &ConfigDialog::markRequiresSchemasRefresh);
+ connect(cfg, SIGNAL(changed(QVariant)), this, SLOT(markRequiresSchemasRefresh()));
ui->activeStyleCombo->addItems(QStyleFactory::keys());
diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.ui index c69ad20..6bedd25 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.ui @@ -229,7 +229,7 @@ </sizepolicy>
</property>
<property name="currentIndex">
- <number>5</number>
+ <number>1</number>
</property>
<widget class="QWidget" name="databaseListPage">
<layout class="QVBoxLayout" name="verticalLayout_36">
@@ -408,7 +408,7 @@ <x>0</x>
<y>0</y>
<width>564</width>
- <height>504</height>
+ <height>580</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_34">
@@ -418,10 +418,13 @@ <string>Data browsing and editing</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
- <item row="0" column="0">
- <widget class="QLabel" name="rowsPerPageLabel">
+ <item row="1" column="0">
+ <widget class="QLabel" name="initColWidthLimitLabel">
+ <property name="toolTip">
+ <string><p>When the data is read into grid view columns width is automatically adjusted. This value limits the initial width for the adjustment, but user can still resize the column manually over this limit.</p></string>
+ </property>
<property name="text">
- <string>Number of data rows per page:</string>
+ <string>Limit initial data column width to (in pixels):</string>
</property>
</widget>
</item>
@@ -444,16 +447,6 @@ </property>
</widget>
</item>
- <item row="1" column="0">
- <widget class="QLabel" name="initColWidthLimitLabel">
- <property name="toolTip">
- <string><p>When the data is read into grid view columns width is automatically adjusted. This value limits the initial width for the adjustment, but user can still resize the column manually over this limit.</p></string>
- </property>
- <property name="text">
- <string>Limit initial data column width to (in pixels):</string>
- </property>
- </widget>
- </item>
<item row="1" column="1">
<widget class="QSpinBox" name="initColWidthLimitSpin">
<property name="toolTip">
@@ -473,7 +466,7 @@ </property>
</widget>
</item>
- <item row="2" column="0" colspan="2">
+ <item row="2" column="0">
<widget class="QCheckBox" name="tolltipInDataViewCheck">
<property name="toolTip">
<string><p>When this is enabled and user holds mouse pointer over a cell in any data view (query results, a table data, a view data) a tooltip will appear with details about the cell - it includes details like column data type, constraints, ROWID and others.</p></string>
@@ -486,6 +479,39 @@ </property>
</widget>
</item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="rowsPerPageLabel">
+ <property name="text">
+ <string>Number of data rows per page:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QCheckBox" name="keepNullWhenEmptyCheck">
+ <property name="toolTip">
+ <string><p>When editing a cell which used to have NULL value and entering empty string as new value, then this option determinates whether the new value should remain NULL (have this option enabled), or should it be overwritten with empty string value (have this option disabled).</p></string>
+ </property>
+ <property name="text">
+ <string>Keep NULL value when entering empty value</string>
+ </property>
+ <property name="cfg" stdset="0">
+ <string notr="true">General.KeepNullWhenEmptyValue</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0" colspan="2">
+ <widget class="QCheckBox" name="useDefaultForNullCheck">
+ <property name="toolTip">
+ <string><html><head/><body><p>Enable this to always enforce DEFAULT value when committing a NULL value for a column that has DEFAULT value defined, even though the column is allowed to contain NULL values.</p><p>Disable this option to use DEFAULT value exclusively when NULL value is committed for column with NOT NULL constraint.</p></body></html></string>
+ </property>
+ <property name="text">
+ <string>Use DEFAULT value (if defined), when committing NULL value</string>
+ </property>
+ <property name="cfg" stdset="0">
+ <string notr="true">General.UseDefaultValueForNull</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
@@ -766,7 +792,7 @@ <item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="dontShowDdlPreview">
<property name="text">
- <string>Don't show DDL preview dialog when commiting schema changes</string>
+ <string>Don't show DDL preview dialog when committing schema changes</string>
</property>
<property name="cfg" stdset="0">
<string notr="true">General.DontShowDdlPreview</string>
@@ -1001,8 +1027,8 @@ <rect>
<x>0</x>
<y>0</y>
- <width>596</width>
- <height>487</height>
+ <width>447</width>
+ <height>307</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_31">
@@ -1422,7 +1448,7 @@ <string notr="true"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Sans Serif'; font-size:11pt; font-weight:400; font-style:normal;">
+</style></head><body style=" font-family:'Noto Sans'; font-size:10pt; font-weight:400; font-style:normal;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:8pt;">Abcdefgh</span></p></body></html></string>
</property>
</widget>
@@ -1513,8 +1539,8 @@ p, li { white-space: pre-wrap; } <rect>
<x>0</x>
<y>0</y>
- <width>290</width>
- <height>323</height>
+ <width>268</width>
+ <height>328</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_9">
@@ -1635,8 +1661,8 @@ p, li { white-space: pre-wrap; } <rect>
<x>0</x>
<y>0</y>
- <width>352</width>
- <height>806</height>
+ <width>331</width>
+ <height>829</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_12">
@@ -1921,17 +1947,17 @@ p, li { white-space: pre-wrap; } </property>
<layout class="QGridLayout" name="gridLayout_6">
<item row="0" column="0">
- <widget class="QLabel" name="dataViewUncommitedLabel">
+ <widget class="QLabel" name="dataViewUncommittedLabel">
<property name="toolTip">
- <string><p>Any data changes will be outlined with this color, until they're commited to the database.</p></string>
+ <string><p>Any data changes will be outlined with this color, until they're committed to the database.</p></string>
</property>
<property name="text">
- <string>Uncommited data outline color</string>
+ <string>Uncommitted data outline color</string>
</property>
</widget>
</item>
<item row="0" column="1">
- <widget class="ColorButton" name="dataViewUncommitedButton">
+ <widget class="ColorButton" name="dataViewUncommittedButton">
<property name="maximumSize">
<size>
<width>50</width>
@@ -1942,14 +1968,14 @@ p, li { white-space: pre-wrap; } <string/>
</property>
<property name="cfg" stdset="0">
- <string notr="true">Colors.DataUncommited</string>
+ <string notr="true">Colors.DataUncommitted</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="dataViewErrorLabel">
<property name="toolTip">
- <string><p>In case of error while commiting data changes, the problematic cell will be outlined with this color.</p></string>
+ <string><p>In case of error while committing data changes, the problematic cell will be outlined with this color.</p></string>
</property>
<property name="text">
<string>Commit error outline color</string>
@@ -1968,7 +1994,7 @@ p, li { white-space: pre-wrap; } <string/>
</property>
<property name="cfg" stdset="0">
- <string notr="true">Colors.DataUncommitedError</string>
+ <string notr="true">Colors.DataUncommittedError</string>
</property>
</widget>
</item>
@@ -2238,7 +2264,7 @@ p, li { white-space: pre-wrap; } <tabstop>sqlEditorNumberFgButton</tabstop>
<tabstop>sqlEditorBindParamFgButton</tabstop>
<tabstop>sqlEditorValidObjectsButton</tabstop>
- <tabstop>dataViewUncommitedButton</tabstop>
+ <tabstop>dataViewUncommittedButton</tabstop>
<tabstop>dataViewErrorButton</tabstop>
<tabstop>dataViewNullFgButton</tabstop>
<tabstop>dataViewDeletedRowBgButton</tabstop>
diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/dbdialog.cpp b/SQLiteStudio3/guiSQLiteStudio/dialogs/dbdialog.cpp index 6bdf41f..781e25e 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/dbdialog.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/dbdialog.cpp @@ -81,7 +81,6 @@ void DbDialog::showEvent(QShowEvent *e) int idx = ui->typeCombo->findText(db->getTypeLabel()); ui->typeCombo->setCurrentIndex(idx); - ui->generateCheckBox->setChecked(false); ui->fileEdit->setText(db->getPath()); ui->nameEdit->setText(db->getName()); disableTypeAutodetection = false; @@ -126,19 +125,18 @@ void DbDialog::init() ui->testConnIcon->setVisible(false); connect(ui->fileEdit, SIGNAL(textChanged(QString)), this, SLOT(fileChanged(QString))); - connect(ui->nameEdit, SIGNAL(textChanged(QString)), this, SLOT(nameModified(QString))); - connect(ui->generateCheckBox, SIGNAL(toggled(bool)), this, SLOT(generateNameSwitched(bool))); + connect(ui->nameEdit, SIGNAL(textEdited(QString)), this, SLOT(nameModified(QString))); connect(ui->browseCreateButton, SIGNAL(clicked()), this, SLOT(browseClicked())); connect(ui->browseOpenButton, SIGNAL(clicked()), this, SLOT(browseClicked())); connect(ui->testConnButton, SIGNAL(clicked()), this, SLOT(testConnectionClicked())); connect(ui->typeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(dbTypeChanged(int))); - generateNameSwitched(true); - layout()->setSizeConstraint(QLayout::SetFixedSize); if (mode == Mode::ADD && CFG_UI.General.NewDbNotPermanentByDefault.get()) ui->permamentCheckBox->setChecked(false); + + validate(); } void DbDialog::updateOptions() @@ -462,55 +460,76 @@ bool DbDialog::testDatabase() bool DbDialog::validate() { // Name - if (!ui->generateCheckBox->isChecked()) + bool nameState = true; + if (ui->nameEdit->text().isEmpty()) + { + nameState = false; + setValidState(ui->nameEdit, false, tr("Enter an unique database name.")); + } + + Db* registeredDb = nullptr; + if (nameState) { - if (ui->nameEdit->text().isEmpty()) + registeredDb = DBLIST->getByName(ui->nameEdit->text(), Qt::CaseInsensitive); + if (registeredDb && (mode == Mode::ADD || registeredDb != db)) { - setValidState(ui->nameEdit, false, tr("Enter an unique database name.")); - return false; + nameState = false; + setValidState(ui->nameEdit, false, tr("This name is already in use. Please enter unique name.")); } } - Db* registeredDb = DBLIST->getByName(ui->nameEdit->text(), Qt::CaseInsensitive); - if (registeredDb && (mode == Mode::ADD || registeredDb != db)) + if (nameState) { - setValidState(ui->nameEdit, false, tr("This name is already in use. Please enter unique name.")); - return false; + if (nameManuallyEdited) + setValidStateInfo(ui->nameEdit, tr("<p>Automatic name generation was disabled, becuase the name was edited manually. To restore automatic generation please erase contents of the name field.</p>")); + else + setValidState(ui->nameEdit, true); } - setValidState(ui->nameEdit, true); // File + bool fileState = true; if (ui->fileEdit->text().isEmpty()) { setValidState(ui->fileEdit, false, tr("Enter a database file path.")); - return false; + fileState = false; } - registeredDb = DBLIST->getByPath(ui->fileEdit->text()); - if (registeredDb && (mode == Mode::ADD || registeredDb != db)) + if (fileState) { - setValidState(ui->fileEdit, false, tr("This database is already on the list under name: %1").arg(registeredDb->getName())); - return false; + registeredDb = DBLIST->getByPath(ui->fileEdit->text()); + if (registeredDb && (mode == Mode::ADD || registeredDb != db)) + { + setValidState(ui->fileEdit, false, tr("This database is already on the list under name: %1").arg(registeredDb->getName())); + fileState = false; + } } - setValidState(ui->fileEdit, true); + + if (fileState) + setValidState(ui->fileEdit, true); // Type + bool typeState = true; if (ui->typeCombo->count() == 0) { // No need to set validation message here. SQLite3 plugin is built in, // so if this happens, something is really, really wrong. qCritical() << "No db plugins loaded in db dialog!"; - return false; + typeState = false; } - if (ui->typeCombo->currentIndex() < 0) + if (typeState) { - setValidState(ui->typeCombo, false, tr("Select a database type.")); - return false; + if (ui->typeCombo->currentIndex() < 0) + { + setValidState(ui->typeCombo, false, tr("Select a database type.")); + typeState = false; + } } - setValidState(ui->typeCombo, true); - return true; + if (typeState) + setValidState(ui->typeCombo, true); + + return nameState && fileState && typeState; } void DbDialog::updateState() @@ -532,13 +551,12 @@ void DbDialog::typeChanged(int index) { UNUSED(index); updateOptions(); - valueForNameGenerationChanged(); } void DbDialog::valueForNameGenerationChanged() { updateState(); - if (!ui->generateCheckBox->isChecked()) + if (nameManuallyEdited) return; QString generatedName; @@ -566,21 +584,6 @@ void DbDialog::browseForFile() setFileDialogInitPathByFile(path); } -void DbDialog::generateNameSwitched(bool checked) -{ - if (checked) - { - ui->nameEdit->setPlaceholderText(tr("Auto-generated")); - valueForNameGenerationChanged(); - } - else - { - ui->nameEdit->setPlaceholderText(tr("Type the name")); - } - - ui->nameEdit->setReadOnly(checked); -} - void DbDialog::fileChanged(const QString &arg1) { UNUSED(arg1); @@ -637,9 +640,9 @@ void DbDialog::dbTypeChanged(int index) propertyChanged(); } -void DbDialog::nameModified(const QString &arg1) +void DbDialog::nameModified(const QString &value) { - UNUSED(arg1); + nameManuallyEdited = !value.isEmpty(); updateState(); } diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/dbdialog.h b/SQLiteStudio3/guiSQLiteStudio/dialogs/dbdialog.h index 2beea3e..3d1a9da 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/dbdialog.h +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/dbdialog.h @@ -70,6 +70,7 @@ class GUI_API_EXPORT DbDialog : public QDialog DbPluginOption::CustomBrowseHandler customBrowseHandler = nullptr; bool disableTypeAutodetection = false; bool doAutoTest = false; + bool nameManuallyEdited = false; static const constexpr int ADDITIONAL_ROWS_BEGIN_INDEX = 1; @@ -77,13 +78,12 @@ class GUI_API_EXPORT DbDialog : public QDialog void typeChanged(int index); void valueForNameGenerationChanged(); void browseForFile(); - void generateNameSwitched(bool checked); void fileChanged(const QString &arg1); void browseClicked(); void testConnectionClicked(); void propertyChanged(); void dbTypeChanged(int index); - void nameModified(const QString &arg1); + void nameModified(const QString &value); public slots: void accept(); diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/dbdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/dbdialog.ui index 6f35079..9878bec 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/dbdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/dbdialog.ui @@ -7,7 +7,7 @@ <x>0</x> <y>0</y> <width>455</width> - <height>365</height> + <height>366</height> </rect> </property> <property name="minimumSize"> @@ -80,24 +80,7 @@ </property> <layout class="QHBoxLayout" name="horizontalLayout_6"> <item> - <widget class="QLineEdit" name="nameEdit"> - <property name="readOnly"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <widget class="QCheckBox" name="generateCheckBox"> - <property name="toolTip"> - <string>Generate name basing on file path</string> - </property> - <property name="text"> - <string>Generate automatically</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> + <widget class="QLineEdit" name="nameEdit"/> </item> </layout> </widget> diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/quitconfirmdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/quitconfirmdialog.ui index 6f97934..20d4f21 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/quitconfirmdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/quitconfirmdialog.ui @@ -11,7 +11,7 @@ </rect> </property> <property name="windowTitle"> - <string>Uncommited changes</string> + <string>Uncommitted changes</string> </property> <layout class="QGridLayout" name="gridLayout"> <item row="0" column="1"> diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/triggercolumnsdialog.cpp b/SQLiteStudio3/guiSQLiteStudio/dialogs/triggercolumnsdialog.cpp index 462e57f..7890b3c 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/triggercolumnsdialog.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/triggercolumnsdialog.cpp @@ -1,13 +1,18 @@ #include "triggercolumnsdialog.h" #include "ui_triggercolumnsdialog.h" - +#include "uiutils.h" #include <QCheckBox> -TriggerColumnsDialog::TriggerColumnsDialog(QWidget *parent) : +TriggerColumnsDialog::TriggerColumnsDialog(QWidget *parent, int globalX, int globalY) : QDialog(parent, Qt::Popup), + globalX(globalX), + globalY(globalY), ui(new Ui::TriggerColumnsDialog) { ui->setupUi(this); + + connect(ui->selectAllBtn, SIGNAL(clicked(bool)), this, SLOT(selectAll())); + connect(ui->deselectAllBtn, SIGNAL(clicked(bool)), this, SLOT(deselectAll())); } TriggerColumnsDialog::~TriggerColumnsDialog() @@ -26,7 +31,7 @@ void TriggerColumnsDialog::addColumn(const QString& name, bool checked) QStringList TriggerColumnsDialog::getCheckedColumns() const { QStringList columns; - foreach (QCheckBox* cb, checkBoxList) + for (QCheckBox* cb : checkBoxList) { if (cb->isChecked()) columns << cb->text(); @@ -49,4 +54,17 @@ void TriggerColumnsDialog::changeEvent(QEvent *e) void TriggerColumnsDialog::showEvent(QShowEvent*) { adjustSize(); + move(globalX, globalY); +} + +void TriggerColumnsDialog::selectAll() +{ + for (QCheckBox* cb : checkBoxList) + cb->setChecked(true); +} + +void TriggerColumnsDialog::deselectAll() +{ + for (QCheckBox* cb : checkBoxList) + cb->setChecked(false); } diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/triggercolumnsdialog.h b/SQLiteStudio3/guiSQLiteStudio/dialogs/triggercolumnsdialog.h index 1ba0d69..d7e719c 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/triggercolumnsdialog.h +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/triggercolumnsdialog.h @@ -15,7 +15,7 @@ class GUI_API_EXPORT TriggerColumnsDialog : public QDialog Q_OBJECT public: - explicit TriggerColumnsDialog(QWidget *parent = 0); + explicit TriggerColumnsDialog(QWidget *parent, int globalX, int globalY); ~TriggerColumnsDialog(); void addColumn(const QString& name, bool checked); @@ -27,7 +27,13 @@ class GUI_API_EXPORT TriggerColumnsDialog : public QDialog private: QList<QCheckBox*> checkBoxList; + int globalX; + int globalY; Ui::TriggerColumnsDialog *ui = nullptr; + + private slots: + void selectAll(); + void deselectAll(); }; #endif // TRIGGERCOLUMNSDIALOG_H diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/triggercolumnsdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/triggercolumnsdialog.ui index 861e17b..b01e01d 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/triggercolumnsdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/triggercolumnsdialog.ui @@ -6,7 +6,7 @@ <rect> <x>0</x> <y>0</y> - <width>334</width> + <width>232</width> <height>300</height> </rect> </property> @@ -61,8 +61,8 @@ <rect> <x>0</x> <y>0</y> - <width>316</width> - <height>237</height> + <width>212</width> + <height>205</height> </rect> </property> <layout class="QVBoxLayout" name="verticalLayout_2"> @@ -83,6 +83,56 @@ </widget> </item> <item> + <widget class="QFrame" name="selectionButtons"> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Raised</enum> + </property> + <layout class="QHBoxLayout" name="horizontalLayout"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QToolButton" name="selectAllBtn"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Select all</string> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="deselectAllBtn"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Deselect all</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> <widget class="QDialogButtonBox" name="buttonBox"> <property name="orientation"> <enum>Qt::Horizontal</enum> diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/triggerdialog.cpp b/SQLiteStudio3/guiSQLiteStudio/dialogs/triggerdialog.cpp index 12baafd..3254f26 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/triggerdialog.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/triggerdialog.cpp @@ -360,7 +360,9 @@ void TriggerDialog::updateValidation() void TriggerDialog::showColumnsDialog() { - TriggerColumnsDialog dialog(this); + QPoint topRight = ui->actionColumns->mapToGlobal(ui->actionColumns->rect().topRight()); + + TriggerColumnsDialog dialog(this, topRight.x(), topRight.y()); foreach (const QString& colName, targetColumns) dialog.addColumn(colName, selectedColumns.contains(colName, Qt::CaseInsensitive)); |
