summaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/guiSQLiteStudio/dialogs
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2015-05-12 16:19:40 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2015-05-12 16:19:40 -0400
commit9618f0ebbf4b88045247c01ce8c8f58203508ebf (patch)
tree20c9894691353ee8bab4eec668e9b0b6c6426e0f /SQLiteStudio3/guiSQLiteStudio/dialogs
parenta308f430f694423064ebc86fd0506c8c6fdb3d93 (diff)
Imported Upstream version 3.0.6upstream/3.0.6
Diffstat (limited to 'SQLiteStudio3/guiSQLiteStudio/dialogs')
-rw-r--r--SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.cpp29
-rw-r--r--SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.h2
-rw-r--r--SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.ui523
-rw-r--r--SQLiteStudio3/guiSQLiteStudio/dialogs/cssdebugdialog.cpp50
-rw-r--r--SQLiteStudio3/guiSQLiteStudio/dialogs/cssdebugdialog.h32
-rw-r--r--SQLiteStudio3/guiSQLiteStudio/dialogs/cssdebugdialog.ui67
-rw-r--r--SQLiteStudio3/guiSQLiteStudio/dialogs/dbdialog.cpp3
-rw-r--r--SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.cpp11
-rw-r--r--SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.h1
-rw-r--r--SQLiteStudio3/guiSQLiteStudio/dialogs/indexdialog.cpp3
-rw-r--r--SQLiteStudio3/guiSQLiteStudio/dialogs/newversiondialog.cpp4
-rw-r--r--SQLiteStudio3/guiSQLiteStudio/dialogs/newversiondialog.h3
-rw-r--r--SQLiteStudio3/guiSQLiteStudio/dialogs/searchtextdialog.cpp9
-rw-r--r--SQLiteStudio3/guiSQLiteStudio/dialogs/searchtextdialog.h1
14 files changed, 539 insertions, 199 deletions
diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.cpp b/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.cpp
index 1ff053f..627e2c1 100644
--- a/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.cpp
+++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.cpp
@@ -38,6 +38,7 @@
#include <QtUiTools/QUiLoader>
#include <QKeySequenceEdit>
#include <plugins/uiconfiguredplugin.h>
+#include <dbtree/dbtree.h>
#define GET_FILTER_STRING(Widget, WidgetType, Method) \
if (qobject_cast<WidgetType*>(Widget))\
@@ -195,13 +196,24 @@ void ConfigDialog::init()
connect(ui->buttonBox->button(QDialogButtonBox::Apply), SIGNAL(clicked()), this, SLOT(apply()));
connect(ui->hideBuiltInPluginsCheck, SIGNAL(toggled(bool)), this, SLOT(updateBuiltInPluginsVisibility()));
+ QList<CfgEntry*> entries;
+ entries << CFG_UI.General.SortObjects
+ << CFG_UI.General.SortColumns
+ << CFG_UI.General.ShowDbTreeLabels
+ << CFG_UI.General.ShowRegularTableLabels
+ << CFG_UI.General.ShowSystemObjects
+ << CFG_UI.General.ShowVirtualTableLabels;
+
+ for (CfgEntry* cfg : entries)
+ connect(cfg, &CfgEntry::changed, this, &ConfigDialog::markRequiresSchemasRefresh);
+
ui->activeStyleCombo->addItems(QStyleFactory::keys());
connect(ui->stackedWidget, SIGNAL(currentChanged(int)), this, SLOT(pageSwitched()));
ui->hideBuiltInPluginsCheck->setChecked(true);
-#ifdef NO_AUTO_UPDATES
+#ifndef PORTABLE_CONFIG
ui->updatesGroup->setVisible(false);
#endif
@@ -219,7 +231,8 @@ void ConfigDialog::load()
void ConfigDialog::save()
{
- MainWindow::getInstance()->setStyle(ui->activeStyleCombo->currentText());
+ if (MainWindow::getInstance()->currentStyle().compare(ui->activeStyleCombo->currentText(), Qt::CaseInsensitive) != 0)
+ MainWindow::getInstance()->setStyle(ui->activeStyleCombo->currentText());
QString loadedPlugins = collectLoadedPlugins();
storeSelectedFormatters();
@@ -228,6 +241,13 @@ void ConfigDialog::save()
configMapper->saveFromWidget(ui->stackedWidget, true);
commitPluginConfigs();
CFG->commitMassSave();
+
+ if (requiresSchemasRefresh)
+ {
+ requiresSchemasRefresh = false;
+ DBTREE->refreshSchemas();
+ }
+ MainWindow::getInstance()->updateCornerDocking();
}
void ConfigDialog::storeSelectedFormatters()
@@ -927,6 +947,11 @@ void ConfigDialog::applyShortcutsFilter(const QString &filter)
}
}
+void ConfigDialog::markRequiresSchemasRefresh()
+{
+ requiresSchemasRefresh = true;
+}
+
void ConfigDialog::updatePluginCategoriesVisibility(QTreeWidgetItem* categoryItem)
{
categoryItem->setHidden(categoryItem->childCount() == 0);
diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.h b/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.h
index 5661c1a..ae2f3a7 100644
--- a/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.h
+++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.h
@@ -100,6 +100,7 @@ class GUI_API_EXPORT ConfigDialog : public QDialog
bool updatingDataEditorItem = false;
bool modifiedFlag = false;
QList<ConfigNotifiablePlugin*> notifiablePlugins;
+ bool requiresSchemasRefresh = false;
private slots:
void refreshFormattersPage();
@@ -134,6 +135,7 @@ class GUI_API_EXPORT ConfigDialog : public QDialog
void updatePluginCategoriesVisibility();
void updateBuiltInPluginsVisibility();
void applyShortcutsFilter(const QString& filter);
+ void markRequiresSchemasRefresh();
public slots:
void accept();
diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.ui
index 966ebca..1c5515d 100644
--- a/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.ui
+++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.ui
@@ -227,7 +227,7 @@
</sizepolicy>
</property>
<property name="currentIndex">
- <number>6</number>
+ <number>0</number>
</property>
<widget class="QWidget" name="dataBrowsingPage">
<layout class="QVBoxLayout" name="verticalLayout_21">
@@ -296,6 +296,57 @@
</widget>
</item>
<item>
+ <widget class="QGroupBox" name="insertRowPlacementGroup">
+ <property name="title">
+ <string>Inserting new row in data grid</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_33">
+ <item>
+ <widget class="ConfigRadioButton" name="insertRowBeforeRadio">
+ <property name="text">
+ <string>Before currently selected row</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="assignedValue" stdset="0">
+ <number>0</number>
+ </property>
+ <property name="cfg" stdset="0">
+ <string>General.InsertRowPlacement</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="ConfigRadioButton" name="insertRowAfterRadio">
+ <property name="text">
+ <string>After currently selected row</string>
+ </property>
+ <property name="assignedValue" stdset="0">
+ <number>1</number>
+ </property>
+ <property name="cfg" stdset="0">
+ <string>General.InsertRowPlacement</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="ConfigRadioButton" name="insertRowAtEndRadio">
+ <property name="text">
+ <string>At the end of data view</string>
+ </property>
+ <property name="assignedValue" stdset="0">
+ <number>2</number>
+ </property>
+ <property name="cfg" stdset="0">
+ <string>General.InsertRowPlacement</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
<spacer name="verticalSpacer_6">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -594,7 +645,7 @@
<bool>false</bool>
</property>
<property name="selectionMode">
- <enum>QAbstractItemView::SingleSelection</enum>
+ <enum>QAbstractItemView::NoSelection</enum>
</property>
<property name="indentation">
<number>0</number>
@@ -651,197 +702,274 @@
<number>0</number>
</property>
<item>
- <widget class="QGroupBox" name="langGroup">
- <property name="title">
- <string>Language</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_30">
- <item>
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Changing language requires application restart to take effect.</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QComboBox" name="langCombo">
- <property name="cfg" stdset="0">
- <string notr="true">General.Language</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="dbListGroup">
- <property name="title">
- <string>Database list</string>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <item row="4" column="0">
- <widget class="QCheckBox" name="sortColumns">
- <property name="toolTip">
- <string>If switched off, then columns will be sorted in the order they are typed in CREATE TABLE statement.</string>
- </property>
- <property name="text">
- <string>Sort table columns alphabetically</string>
- </property>
- <property name="cfg" stdset="0">
- <string notr="true">General.SortColumns</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QCheckBox" name="expandTablesCheck">
- <property name="text">
- <string>Expand tables node when connected to a database</string>
- </property>
- <property name="cfg" stdset="0">
- <string notr="true">General.ExpandTables</string>
- </property>
- </widget>
- </item>
- <item row="6" column="0">
- <widget class="QGroupBox" name="addLabelsGroup">
- <property name="toolTip">
- <string>&lt;p&gt;Additional labels are those displayed next to the names on the databases list (they are blue, unless configured otherwise). Enabling this option will result in labels for databases, invalid databases and aggregated nodes (column group, index group, trigger group). For more labels see options below.&lt;p&gt;</string>
- </property>
- <property name="title">
- <string>Display additional labels on the list</string>
- </property>
- <property name="checkable">
- <bool>true</bool>
- </property>
- <property name="checked">
- <bool>false</bool>
- </property>
- <property name="cfg" stdset="0">
- <string notr="true">General.ShowDbTreeLabels</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_20">
- <item>
- <widget class="QCheckBox" name="regularTableLabelsCheck">
- <property name="toolTip">
- <string>For regular tables labels will show number of columns, indexes and triggers for each of tables.</string>
- </property>
- <property name="text">
- <string>Display labels for regular tables</string>
- </property>
- <property name="cfg" stdset="0">
- <string notr="true">General.ShowRegularTableLabels</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="virtTableLabelsCheck">
- <property name="toolTip">
- <string>Virtual tables will be marked with a 'virtual' label.</string>
- </property>
- <property name="text">
- <string>Display labels for virtual tables</string>
- </property>
- <property name="cfg" stdset="0">
- <string notr="true">General.ShowVirtualTableLabels</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QCheckBox" name="expandViewsCheck">
- <property name="text">
- <string>Expand views node when connected to a database</string>
- </property>
- <property name="cfg" stdset="0">
- <string notr="true">General.ExpandViews</string>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QCheckBox" name="sortObjects">
- <property name="toolTip">
- <string>If this option is switched off, then objects will be sorted in order they appear in sqlite_master table (which is in order they were created)</string>
- </property>
- <property name="text">
- <string>Sort objects (tables, indexes, triggers and views) alphabetically</string>
- </property>
- <property name="cfg" stdset="0">
- <string notr="true">General.SortObjects</string>
- </property>
- </widget>
- </item>
- <item row="5" column="0">
- <widget class="QCheckBox" name="dispSysTableCheck">
- <property name="text">
- <string>Display system tables and indexes on the list</string>
- </property>
- <property name="cfg" stdset="0">
- <string notr="true">General.ShowSystemObjects</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="tableWinGroup">
- <property name="title">
- <string>Table windows</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_18">
- <item>
- <widget class="QCheckBox" name="openTablesOnDataCheck">
- <property name="toolTip">
- <string>When enabled, Table Windows will show up with the data tab, instead of the structure tab.</string>
- </property>
- <property name="text">
- <string>Open Table Windows with the data tab for start</string>
- </property>
- <property name="cfg" stdset="0">
- <string notr="true">General.OpenTablesOnData</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="viewWinGroup">
- <property name="title">
- <string>View windows</string>
+ <widget class="QScrollArea" name="lookAndFeelScroll">
+ <property name="widgetResizable">
+ <bool>true</bool>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_19">
- <item>
- <widget class="QCheckBox" name="openViewsOnDataCheck">
- <property name="toolTip">
- <string>When enabled, View Windows will show up with the data tab, instead of the structure tab.</string>
- </property>
- <property name="text">
- <string>Open View Windows with the data tab for start</string>
- </property>
- <property name="cfg" stdset="0">
- <string notr="true">General.OpenViewsOnData</string>
- </property>
- </widget>
- </item>
- </layout>
+ <widget class="QWidget" name="lookAndFeelScrollWidget">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>456</width>
+ <height>608</height>
+ </rect>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_31">
+ <item>
+ <widget class="QGroupBox" name="langGroup">
+ <property name="title">
+ <string>Language</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_30">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Changing language requires application restart to take effect.</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="langCombo">
+ <property name="cfg" stdset="0">
+ <string notr="true">General.Language</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="compactLayoutGroup">
+ <property name="title">
+ <string>Compact layout</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_32">
+ <item>
+ <widget class="QCheckBox" name="compactLayoutCheck">
+ <property name="toolTip">
+ <string>&lt;p&gt;Compact layout reduces all margins and spacing on the UI to minimum, making space for displaying more data. It makes the interface a little bit less aesthetic, but allows to display more data at once.&lt;/p&gt;</string>
+ </property>
+ <property name="text">
+ <string>Use compact layout</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="cfg" stdset="0">
+ <string>General.CompactLayout</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="dbListGroup">
+ <property name="title">
+ <string>Database list</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="4" column="0">
+ <widget class="QCheckBox" name="sortColumns">
+ <property name="toolTip">
+ <string>If switched off, then columns will be sorted in the order they are typed in CREATE TABLE statement.</string>
+ </property>
+ <property name="text">
+ <string>Sort table columns alphabetically</string>
+ </property>
+ <property name="cfg" stdset="0">
+ <string notr="true">General.SortColumns</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QCheckBox" name="expandTablesCheck">
+ <property name="text">
+ <string>Expand tables node when connected to a database</string>
+ </property>
+ <property name="cfg" stdset="0">
+ <string notr="true">General.ExpandTables</string>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="0">
+ <widget class="QGroupBox" name="addLabelsGroup">
+ <property name="toolTip">
+ <string>&lt;p&gt;Additional labels are those displayed next to the names on the databases list (they are blue, unless configured otherwise). Enabling this option will result in labels for databases, invalid databases and aggregated nodes (column group, index group, trigger group). For more labels see options below.&lt;p&gt;</string>
+ </property>
+ <property name="title">
+ <string>Display additional labels on the list</string>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ <property name="cfg" stdset="0">
+ <string notr="true">General.ShowDbTreeLabels</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_20">
+ <item>
+ <widget class="QCheckBox" name="regularTableLabelsCheck">
+ <property name="toolTip">
+ <string>For regular tables labels will show number of columns, indexes and triggers for each of tables.</string>
+ </property>
+ <property name="text">
+ <string>Display labels for regular tables</string>
+ </property>
+ <property name="cfg" stdset="0">
+ <string notr="true">General.ShowRegularTableLabels</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="virtTableLabelsCheck">
+ <property name="toolTip">
+ <string>Virtual tables will be marked with a 'virtual' label.</string>
+ </property>
+ <property name="text">
+ <string>Display labels for virtual tables</string>
+ </property>
+ <property name="cfg" stdset="0">
+ <string notr="true">General.ShowVirtualTableLabels</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QCheckBox" name="expandViewsCheck">
+ <property name="text">
+ <string>Expand views node when connected to a database</string>
+ </property>
+ <property name="cfg" stdset="0">
+ <string notr="true">General.ExpandViews</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QCheckBox" name="sortObjects">
+ <property name="toolTip">
+ <string>If this option is switched off, then objects will be sorted in order they appear in sqlite_master table (which is in order they were created)</string>
+ </property>
+ <property name="text">
+ <string>Sort objects (tables, indexes, triggers and views) alphabetically</string>
+ </property>
+ <property name="cfg" stdset="0">
+ <string notr="true">General.SortObjects</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0">
+ <widget class="QCheckBox" name="dispSysTableCheck">
+ <property name="text">
+ <string>Display system tables and indexes on the list</string>
+ </property>
+ <property name="cfg" stdset="0">
+ <string notr="true">General.ShowSystemObjects</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="tableWinGroup">
+ <property name="title">
+ <string>Table windows</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_18">
+ <item>
+ <widget class="QCheckBox" name="openTablesOnDataCheck">
+ <property name="toolTip">
+ <string>When enabled, Table Windows will show up with the data tab, instead of the structure tab.</string>
+ </property>
+ <property name="text">
+ <string>Open Table Windows with the data tab for start</string>
+ </property>
+ <property name="cfg" stdset="0">
+ <string notr="true">General.OpenTablesOnData</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="viewWinGroup">
+ <property name="title">
+ <string>View windows</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_19">
+ <item>
+ <widget class="QCheckBox" name="openViewsOnDataCheck">
+ <property name="toolTip">
+ <string>When enabled, View Windows will show up with the data tab, instead of the structure tab.</string>
+ </property>
+ <property name="text">
+ <string>Open View Windows with the data tab for start</string>
+ </property>
+ <property name="cfg" stdset="0">
+ <string notr="true">General.OpenViewsOnData</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="dockLayoutGroup">
+ <property name="title">
+ <string>Main window dock areas</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_13">
+ <item row="0" column="0">
+ <widget class="ConfigRadioButton" name="dockLayoutVertical">
+ <property name="text">
+ <string>Left and right areas occupy corners</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../icons.qrc">
+ <normaloff>:/icons/img/dock_layout_vertical.png</normaloff>:/icons/img/dock_layout_vertical.png</iconset>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="cfg" stdset="0">
+ <string notr="true">General.DockLayout</string>
+ </property>
+ <property name="assignedValue" stdset="0">
+ <string notr="true">vertical</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="ConfigRadioButton" name="dockLeyoutHorizontal">
+ <property name="text">
+ <string>Top and bottom areas occupy corners</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../icons.qrc">
+ <normaloff>:/icons/img/dock_layout_horizontal.png</normaloff>:/icons/img/dock_layout_horizontal.png</iconset>
+ </property>
+ <property name="cfg" stdset="0">
+ <string notr="true">General.DockLayout</string>
+ </property>
+ <property name="assignedValue" stdset="0">
+ <string notr="true">horizontal</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
</widget>
</item>
- <item>
- <spacer name="verticalSpacer_5">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
</layout>
</widget>
<widget class="QWidget" name="pluginsPage">
@@ -1147,7 +1275,7 @@
<string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'.Helvetica Neue DeskInterface'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;Abcdefgh&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
@@ -1238,8 +1366,8 @@ p, li { white-space: pre-wrap; }
<rect>
<x>0</x>
<y>0</y>
- <width>258</width>
- <height>286</height>
+ <width>249</width>
+ <height>322</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_9">
@@ -1360,8 +1488,8 @@ p, li { white-space: pre-wrap; }
<rect>
<x>0</x>
<y>0</y>
- <width>307</width>
- <height>666</height>
+ <width>329</width>
+ <height>813</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_12">
@@ -1909,6 +2037,11 @@ p, li { white-space: pre-wrap; }
<header>common/fontedit.h</header>
<container>1</container>
</customwidget>
+ <customwidget>
+ <class>ConfigRadioButton</class>
+ <extends>QRadioButton</extends>
+ <header>common/configradiobutton.h</header>
+ </customwidget>
</customwidgets>
<tabstops>
<tabstop>categoriesFilter</tabstop>
diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/cssdebugdialog.cpp b/SQLiteStudio3/guiSQLiteStudio/dialogs/cssdebugdialog.cpp
new file mode 100644
index 0000000..99439e8
--- /dev/null
+++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/cssdebugdialog.cpp
@@ -0,0 +1,50 @@
+#include "cssdebugdialog.h"
+#include "ui_cssdebugdialog.h"
+#include "mainwindow.h"
+#include "themetuner.h"
+#include <QApplication>
+#include <QPushButton>
+
+CssDebugDialog::CssDebugDialog(QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::CssDebugDialog)
+{
+ ui->setupUi(this);
+ connect(ui->buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(buttonClicked(QAbstractButton*)));
+
+ appliedCss = MAINWINDOW->styleSheet();
+ ui->cssEdit->setPlainText(appliedCss);
+ updateState();
+
+ connect(ui->cssEdit, SIGNAL(textChanged()), this, SLOT(updateState()));
+}
+
+CssDebugDialog::~CssDebugDialog()
+{
+ delete ui;
+}
+
+void CssDebugDialog::buttonClicked(QAbstractButton* button)
+{
+ if (ui->buttonBox->standardButton(button) == QDialogButtonBox::RestoreDefaults)
+ {
+ ui->cssEdit->setPlainText(THEME_TUNER->getDefaultCss());
+ }
+ else if (ui->buttonBox->buttonRole(button) == QDialogButtonBox::ApplyRole)
+ {
+ appliedCss = ui->cssEdit->toPlainText();
+ MAINWINDOW->setStyleSheet(appliedCss);
+ }
+
+ updateState();
+}
+
+void CssDebugDialog::updateState()
+{
+ ui->buttonBox->button(QDialogButtonBox::Apply)->setEnabled(ui->cssEdit->toPlainText() != appliedCss);
+}
+
+void CssDebugDialog::closeEvent(QCloseEvent*)
+{
+ deleteLater();
+}
diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/cssdebugdialog.h b/SQLiteStudio3/guiSQLiteStudio/dialogs/cssdebugdialog.h
new file mode 100644
index 0000000..d22dd74
--- /dev/null
+++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/cssdebugdialog.h
@@ -0,0 +1,32 @@
+#ifndef CSSDEBUGDIALOG_H
+#define CSSDEBUGDIALOG_H
+
+#include <QDialog>
+
+namespace Ui {
+ class CssDebugDialog;
+}
+
+class QAbstractButton;
+
+class CssDebugDialog : public QDialog
+{
+ Q_OBJECT
+
+ public:
+ explicit CssDebugDialog(QWidget *parent = 0);
+ ~CssDebugDialog();
+
+ protected:
+ void closeEvent(QCloseEvent*);
+
+ private:
+ Ui::CssDebugDialog *ui;
+ QString appliedCss;
+
+ private slots:
+ void buttonClicked(QAbstractButton* button);
+ void updateState();
+};
+
+#endif // CSSDEBUGDIALOG_H
diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/cssdebugdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/cssdebugdialog.ui
new file mode 100644
index 0000000..e619940
--- /dev/null
+++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/cssdebugdialog.ui
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>CssDebugDialog</class>
+ <widget class="QDialog" name="CssDebugDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>620</width>
+ <height>423</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>SQLiteStudio CSS console</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QPlainTextEdit" name="cssEdit"/>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Apply|QDialogButtonBox::Close|QDialogButtonBox::RestoreDefaults</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>CssDebugDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>248</x>
+ <y>254</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>157</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>CssDebugDialog</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>316</x>
+ <y>260</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>286</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/dbdialog.cpp b/SQLiteStudio3/guiSQLiteStudio/dialogs/dbdialog.cpp
index ac7cd8a..a3d0e65 100644
--- a/SQLiteStudio3/guiSQLiteStudio/dialogs/dbdialog.cpp
+++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/dbdialog.cpp
@@ -9,6 +9,7 @@
#include "common/global.h"
#include "iconmanager.h"
#include "common/unused.h"
+#include "db/sqlquery.h"
#include <QDateTimeEdit>
#include <QSpinBox>
#include <QDebug>
@@ -464,7 +465,7 @@ bool DbDialog::testDatabase()
{
if (testDb->openForProbing())
{
- res = !testDb->getEncoding().isEmpty();
+ res = !testDb->exec("SELECT sqlite_version();")->getSingleCell().toString().isEmpty();
testDb->closeQuiet();
}
delete testDb;
diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.cpp b/SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.cpp
index c16b90e..2f52396 100644
--- a/SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.cpp
+++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.cpp
@@ -17,6 +17,7 @@
#include <QDir>
#include <QDebug>
#include <QFileDialog>
+#include <QKeyEvent>
ImportDialog::ImportDialog(QWidget *parent) :
QWizard(parent),
@@ -369,3 +370,13 @@ void ImportDialog::showEvent(QShowEvent* e)
QWizard::showEvent(e);
ui->tableNameCombo->setFocus();
}
+
+void ImportDialog::keyPressEvent(QKeyEvent* e)
+{
+ if ((e->key() == Qt::Key_Enter || e->key() == Qt::Key_Return) && QApplication::focusWidget() == ui->tableNameCombo)
+ {
+ next();
+ return;
+ }
+ QWizard::keyPressEvent(e);
+}
diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.h b/SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.h
index c50703f..b4c2883 100644
--- a/SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.h
+++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.h
@@ -29,6 +29,7 @@ class GUI_API_EXPORT ImportDialog : public QWizard
protected:
void showEvent(QShowEvent* e);
+ void keyPressEvent(QKeyEvent* e);
private:
void init();
diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/indexdialog.cpp b/SQLiteStudio3/guiSQLiteStudio/dialogs/indexdialog.cpp
index efb2e6c..cdae91d 100644
--- a/SQLiteStudio3/guiSQLiteStudio/dialogs/indexdialog.cpp
+++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/indexdialog.cpp
@@ -333,6 +333,7 @@ void IndexDialog::rebuildCreateIndex()
createIndex->uniqueKw = ui->uniqueCheck->isChecked();
+ Dialect dialect = db->getDialect();
SqliteIndexedColumn* idxCol = nullptr;
int i = -1;
for (const QString& column : tableColumns)
@@ -343,7 +344,7 @@ void IndexDialog::rebuildCreateIndex()
continue;
idxCol = addIndexedColumn(column);
- if (!collateComboBoxes[i]->currentText().isEmpty())
+ if (dialect == Dialect::Sqlite3 && !collateComboBoxes[i]->currentText().isEmpty())
idxCol->collate = collateComboBoxes[i]->currentText();
if (sortComboBoxes[i]->currentIndex() > 0)
diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/newversiondialog.cpp b/SQLiteStudio3/guiSQLiteStudio/dialogs/newversiondialog.cpp
index 1c73de0..d0976a3 100644
--- a/SQLiteStudio3/guiSQLiteStudio/dialogs/newversiondialog.cpp
+++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/newversiondialog.cpp
@@ -1,3 +1,5 @@
+#ifdef PORTABLE_CONFIG
+
#include "newversiondialog.h"
#include "services/pluginmanager.h"
#include "sqlitestudio.h"
@@ -66,3 +68,5 @@ void NewVersionDialog::showEvent(QShowEvent*)
{
ui->checkOnStartupCheck->setChecked(CFG_CORE.General.CheckUpdatesOnStartup.get());
}
+
+#endif // PORTABLE_CONFIG
diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/newversiondialog.h b/SQLiteStudio3/guiSQLiteStudio/dialogs/newversiondialog.h
index 784c6cf..fc62d6d 100644
--- a/SQLiteStudio3/guiSQLiteStudio/dialogs/newversiondialog.h
+++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/newversiondialog.h
@@ -1,6 +1,8 @@
#ifndef NEWVERSIONDIALOG_H
#define NEWVERSIONDIALOG_H
+#ifdef PORTABLE_CONFIG
+
#include "services/updatemanager.h"
#include "guiSQLiteStudio_global.h"
#include <QDialog>
@@ -31,4 +33,5 @@ class GUI_API_EXPORT NewVersionDialog : public QDialog
void installUpdates();
};
+#endif // PORTABLE_CONFIG
#endif // NEWVERSIONDIALOG_H
diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/searchtextdialog.cpp b/SQLiteStudio3/guiSQLiteStudio/dialogs/searchtextdialog.cpp
index 87a6d88..578a253 100644
--- a/SQLiteStudio3/guiSQLiteStudio/dialogs/searchtextdialog.cpp
+++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/searchtextdialog.cpp
@@ -9,6 +9,10 @@ SearchTextDialog::SearchTextDialog(SearchTextLocator* textLocator, QWidget *pare
{
ui->setupUi(this);
connect(textLocator, SIGNAL(replaceAvailable(bool)), this, SLOT(setReplaceAvailable(bool)));
+ connect(ui->findEdit, SIGNAL(textChanged(QString)), this, SLOT(markModifiedState()));
+ connect(ui->caseSensitiveCheck, SIGNAL(toggled(bool)), this, SLOT(markModifiedState()));
+ connect(ui->backwardsCheck, SIGNAL(toggled(bool)), this, SLOT(markModifiedState()));
+ connect(ui->regExpCheck, SIGNAL(toggled(bool)), this, SLOT(markModifiedState()));
}
SearchTextDialog::~SearchTextDialog()
@@ -73,3 +77,8 @@ void SearchTextDialog::on_replaceAllButton_clicked()
textLocator->setReplaceString(ui->replaceEdit->text());
textLocator->replaceAll();
}
+
+void SearchTextDialog::markModifiedState()
+{
+ configModifiedState = true;
+}
diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/searchtextdialog.h b/SQLiteStudio3/guiSQLiteStudio/dialogs/searchtextdialog.h
index 54f6f72..ae33856 100644
--- a/SQLiteStudio3/guiSQLiteStudio/dialogs/searchtextdialog.h
+++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/searchtextdialog.h
@@ -34,6 +34,7 @@ class GUI_API_EXPORT SearchTextDialog : public QDialog
void on_findButton_clicked();
void on_replaceButton_clicked();
void on_replaceAllButton_clicked();
+ void markModifiedState();
};
#endif // SEARCHTEXTDIALOG_H