From 016003905ca0e8e459e3dc33e786beda8ec92f45 Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Fri, 30 Jan 2015 17:00:07 -0500 Subject: Imported Upstream version 3.0.2 --- .../guiSQLiteStudio/dialogs/aboutdialog.cpp | 56 ++++++- .../guiSQLiteStudio/dialogs/aboutdialog.h | 5 +- .../guiSQLiteStudio/dialogs/aboutdialog.ui | 93 ++++++++++- .../guiSQLiteStudio/dialogs/bugdialog.cpp | 1 - SQLiteStudio3/guiSQLiteStudio/dialogs/bugdialog.ui | 4 +- .../dialogs/bugreportlogindialog.ui | 2 +- .../guiSQLiteStudio/dialogs/columndialog.ui | 2 +- .../guiSQLiteStudio/dialogs/configdialog.cpp | 22 ++- .../guiSQLiteStudio/dialogs/configdialog.h | 1 + .../guiSQLiteStudio/dialogs/configdialog.ui | 180 ++++++++++++--------- .../guiSQLiteStudio/dialogs/constraintdialog.ui | 2 +- .../guiSQLiteStudio/dialogs/dbconverterdialog.cpp | 1 - .../guiSQLiteStudio/dialogs/dbconverterdialog.ui | 2 +- .../guiSQLiteStudio/dialogs/errorsconfirmdialog.ui | 2 +- .../guiSQLiteStudio/dialogs/exportdialog.ui | 20 +-- .../guiSQLiteStudio/dialogs/importdialog.ui | 8 +- .../guiSQLiteStudio/dialogs/indexdialog.ui | 2 +- .../guiSQLiteStudio/dialogs/languagedialog.cpp | 34 ++++ .../guiSQLiteStudio/dialogs/languagedialog.h | 27 ++++ .../guiSQLiteStudio/dialogs/languagedialog.ui | 77 +++++++++ .../guiSQLiteStudio/dialogs/messagelistdialog.ui | 2 +- .../guiSQLiteStudio/dialogs/searchtextdialog.ui | 4 +- .../dialogs/triggercolumnsdialog.ui | 28 +++- .../guiSQLiteStudio/dialogs/triggerdialog.ui | 4 +- 24 files changed, 457 insertions(+), 122 deletions(-) create mode 100644 SQLiteStudio3/guiSQLiteStudio/dialogs/languagedialog.cpp create mode 100644 SQLiteStudio3/guiSQLiteStudio/dialogs/languagedialog.h create mode 100644 SQLiteStudio3/guiSQLiteStudio/dialogs/languagedialog.ui (limited to 'SQLiteStudio3/guiSQLiteStudio/dialogs') diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/aboutdialog.cpp b/SQLiteStudio3/guiSQLiteStudio/dialogs/aboutdialog.cpp index df790de..0d291e5 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/aboutdialog.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/aboutdialog.cpp @@ -4,6 +4,9 @@ #include "sqlitestudio.h" #include "iconmanager.h" #include "services/extralicensemanager.h" +#include "services/pluginmanager.h" +#include "formmanager.h" +#include "iconmanager.h" #include #include @@ -26,6 +29,7 @@ void AboutDialog::init(InitialMode initialMode) ui->tabWidget->setCurrentWidget(initialMode == ABOUT ? ui->about : ui->license); + // About QString distName; switch (getDistributionType()) { @@ -43,15 +47,23 @@ void AboutDialog::init(InitialMode initialMode) QString newLabelValue = ui->aboutLabel->text().arg(SQLITESTUDIO->getVersionString(), distName); ui->aboutLabel->setText(newLabelValue); + // Licenses licenseContents = ""; int row = 1; - QHash licenses = SQLITESTUDIO->getExtraLicenseManager()->getLicenses(); + QHash licenses = SQLITESTUDIO->getExtraLicenseManager()->getLicensesContents(); + QString violation; + QString title; QHashIterator it(licenses); while (it.hasNext()) { it.next(); - readLicense(row++, it.key(), it.value()); + violation = QString(); + title = it.key(); + if (SQLITESTUDIO->getExtraLicenseManager()->isViolatedLicense(title)) + violation = SQLITESTUDIO->getExtraLicenseManager()->getViolationMessage(title); + + addLicense(row++, title, it.value(), violation); } buildIndex(); @@ -59,6 +71,18 @@ void AboutDialog::init(InitialMode initialMode) ui->licenseEdit->setHtml(licenseContents); indexContents.clear(); licenseContents.clear(); + + // Environment + copyAct = new QAction(tr("Copy"), this); + ui->appDirEdit->setText(qApp->applicationDirPath()); + ui->cfgDirEdit->setText(CFG->getConfigDir()); + ui->pluginDirList->addItems(filterResourcePaths(PLUGINS->getPluginDirs())); + ui->iconDirList->addItems(filterResourcePaths(ICONMANAGER->getIconDirs())); + ui->formDirList->addItems(filterResourcePaths(FORMS->getFormDirs())); + ui->qtVerEdit->setText(QT_VERSION_STR); + ui->pluginDirList->addAction(copyAct); + ui->iconDirList->addAction(copyAct); + ui->formDirList->addAction(copyAct); } void AboutDialog::buildIndex() @@ -68,16 +92,19 @@ void AboutDialog::buildIndex() for (const QString& idx : indexContents) entries += entryTpl.arg(idx); - licenseContents.prepend("

Table of contents:

    " + entries.join("") + "
"); + licenseContents.prepend(tr("

Table of contents:

    %2
").arg(entries.join(""))); } -void AboutDialog::readLicense(int row, const QString& title, const QString& path) +void AboutDialog::addLicense(int row, const QString& title, const QString& contents, const QString& violation) { + static_qstring(violatedTpl, "%1 (%2)"); + + QString escapedTitle = title.toHtmlEscaped(); + QString finalTitle = violation.isNull() ? escapedTitle : violatedTpl.arg(escapedTitle, violation); QString rowNum = QString::number(row); - QString contents = readFile(path); - licenseContents += "

" + rowNum + ". " + title + "

"; - licenseContents += "
" + contents + "
"; - indexContents += title; + licenseContents += "

" + rowNum + ". " + finalTitle + "

"; + licenseContents += "
" + contents.toHtmlEscaped() + "
"; + indexContents += finalTitle; } QString AboutDialog::readFile(const QString& path) @@ -92,3 +119,16 @@ QString AboutDialog::readFile(const QString& path) file.close(); return contents; } + +QStringList AboutDialog::filterResourcePaths(const QStringList& paths) +{ + QStringList output; + for (const QString& path : paths) + { + if (path.startsWith(":")) + continue; + + output << path; + } + return output; +} diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/aboutdialog.h b/SQLiteStudio3/guiSQLiteStudio/dialogs/aboutdialog.h index 3c828c0..4d49145 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/aboutdialog.h +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/aboutdialog.h @@ -26,12 +26,15 @@ class GUI_API_EXPORT AboutDialog : public QDialog private: void init(InitialMode initialMode); void buildIndex(); - void readLicense(int row, const QString& title, const QString& path); + void addLicense(int row, const QString& title, const QString& contents, const QString& violation); QString readFile(const QString& path); + static QStringList filterResourcePaths(const QStringList& paths); + Ui::AboutDialog *ui = nullptr; QStringList indexContents; QString licenseContents; + QAction* copyAct = nullptr; }; #endif // ABOUTDIALOG_H diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/aboutdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/aboutdialog.ui index 67fa632..1239cf5 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/aboutdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/aboutdialog.ui @@ -17,7 +17,7 @@ - 1 + 2 @@ -50,6 +50,97 @@ + + + Environment + + + + + + Icon directories + + + + + + + Qt::ActionsContextMenu + + + + + + + Form directories + + + + + + + Qt::ActionsContextMenu + + + + + + + Plugin directories + + + + + + + Application directory + + + + + + + true + + + + + + + Configuration directory + + + + + + + Qt::ActionsContextMenu + + + + + + + true + + + + + + + Qt version: + + + + + + + + + + + + diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/bugdialog.cpp b/SQLiteStudio3/guiSQLiteStudio/dialogs/bugdialog.cpp index 7ab9c67..59a2ec6 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/bugdialog.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/bugdialog.cpp @@ -65,7 +65,6 @@ QString BugDialog::getMessageAboutReportHistory() { return tr("You can see all your reported bugs and ideas by selecting menu '%1' and then '%2'.").arg(MAINWINDOW->getSQLiteStudioMenu()->title()) .arg(MAINWINDOW->getAction(MainWindow::BUG_REPORT_HISTORY)->text()); - return ""; } void BugDialog::finishedBugReport(bool success, const QString& errorMsg) diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/bugdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/bugdialog.ui index f2dbcf3..3871436 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/bugdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/bugdialog.ui @@ -11,7 +11,7 @@ - Dialog + Bugs and ideas @@ -51,7 +51,7 @@ - ... + ... diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/bugreportlogindialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/bugreportlogindialog.ui index f6597bc..d1d26e6 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/bugreportlogindialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/bugreportlogindialog.ui @@ -33,7 +33,7 @@ - Password + Password: diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/columndialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/columndialog.ui index ac7e5ae..2133aca 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/columndialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/columndialog.ui @@ -36,7 +36,7 @@ - , + , diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.cpp b/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.cpp index 932036e..b22ee6e 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.cpp @@ -21,6 +21,7 @@ #include "configmapper.h" #include "datatype.h" #include "uiutils.h" +#include "translations.h" #include #include #include @@ -186,6 +187,7 @@ void ConfigDialog::init() initFormatterPlugins(); initDataEditors(); initShortcuts(); + initLangs(); connect(ui->categoriesTree, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), this, SLOT(switchPage(QTreeWidgetItem*))); connect(ui->previewTabs, SIGNAL(currentChanged(int)), this, SLOT(updateStylePreview())); @@ -959,6 +961,7 @@ void ConfigDialog::initInternalCustomConfigWidgets() QList customWidgets; customWidgets << new StyleConfigWidget(); customWidgets << new ListToStringListHash(&CFG_UI.General.DataEditorsOrder); + customWidgets << new ComboDataWidget(&CFG_CORE.General.Language); configMapper->setInternalCustomConfigWidgets(customWidgets); } @@ -1235,7 +1238,7 @@ void ConfigDialog::initPluginsPage() builtIn = PLUGINS->isBuiltIn(pluginName); title = PLUGINS->getTitle(pluginName); if (builtIn) - title += tr(" (built-in)", "plugins manager in configuration dialog"); + title += tr("%1 (built-in)", "plugins manager in configuration dialog").arg(title); item = new QTreeWidgetItem({title}); item->setCheckState(0, PLUGINS->isLoaded(pluginName) ? Qt::Checked : Qt::Unchecked); @@ -1489,6 +1492,23 @@ void ConfigDialog::initShortcuts(CfgCategory *cfgCategory) category->setExpanded(true); } +void ConfigDialog::initLangs() +{ + QMap langs = getAvailableLanguages(); + int idx = 0; + int selected = -1; + for (const QString& lang : langs.keys()) + { + ui->langCombo->addItem(lang, langs[lang]); + if (langs[lang] == SQLITESTUDIO->getCurrentLang()) + selected = idx; + + idx++; + } + + ui->langCombo->setCurrentIndex(selected); +} + bool ConfigDialog::isPluginCategoryItem(QTreeWidgetItem *item) const { return item->parent() && item->parent()->parent() && item->parent()->parent() == getPluginsCategoryItem(); diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.h b/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.h index 95e9f1a..5661c1a 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.h +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.h @@ -56,6 +56,7 @@ class GUI_API_EXPORT ConfigDialog : public QDialog void initDataEditors(); void initShortcuts(); void initShortcuts(CfgCategory* cfgCategory); + void initLangs(); void applyStyle(QWidget* widget, QStyle* style); QTreeWidgetItem* getPluginsCategoryItem() const; QTreeWidgetItem* getPluginsCategoryItem(PluginType* type) const; diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.ui index 040600e..966ebca 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/configdialog.ui @@ -104,7 +104,7 @@ General - generalPage + generalPage @@ -116,7 +116,7 @@ Keyboard shortcuts - shortcutsPage + shortcutsPage @@ -128,7 +128,7 @@ Look & feel - lookAndFeelPage + lookAndFeelPage @@ -139,7 +139,7 @@ Style - stylePage + stylePage @@ -151,7 +151,7 @@ Fonts - fontsPage + fontsPage @@ -163,7 +163,7 @@ Colors - colorsPage + colorsPage @@ -176,7 +176,7 @@ Plugins - pluginsPage + pluginsPage @@ -187,7 +187,7 @@ Code formatters - formatterPluginsPage + formatterPluginsPage @@ -196,7 +196,7 @@ Data browsing - dataBrowsingPage + dataBrowsingPage @@ -207,7 +207,7 @@ Data editors - dataEditorsPage + dataEditorsPage @@ -227,7 +227,7 @@ - 2 + 6 @@ -259,7 +259,7 @@ 99999 - General.NumberOfRowsPerPage + General.NumberOfRowsPerPage @@ -288,7 +288,7 @@ 600 - General.MaxInitialColumnWith + General.MaxInitialColumnWith @@ -334,7 +334,7 @@ - General.DataEditorsOrder + General.DataEditorsOrder @@ -433,7 +433,7 @@ 9999999 - General.DdlHistorySize + General.DdlHistorySize @@ -450,7 +450,7 @@ Don't show DDL preview dialog when commiting schema changes - General.DontShowDdlPreview + General.DontShowDdlPreview @@ -478,7 +478,7 @@ 999999 - General.SqlHistorySize + General.SqlHistorySize @@ -501,7 +501,7 @@ Execute only the query under the cursor - General.ExecuteCurrentQueryOnly + General.ExecuteCurrentQueryOnly @@ -520,7 +520,7 @@ Automatically check for updates at startup - General.CheckUpdatesOnStartup + General.CheckUpdatesOnStartup @@ -539,7 +539,7 @@ Restore last session (active MDI windows) after startup - General.RestoreSession + General.RestoreSession @@ -650,13 +650,36 @@ 0 + + + + Language + + + + + + Changing language requires application restart to take effect. + + + + + + + General.Language + + + + + + Database list - + If switched off, then columns will be sorted in the order they are typed in CREATE TABLE statement. @@ -665,21 +688,21 @@ Sort table columns alphabetically - General.SortColumns + General.SortColumns - + Expand tables node when connected to a database - General.ExpandTables + General.ExpandTables - + <p>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.<p> @@ -694,7 +717,7 @@ false - General.ShowDbTreeLabels + General.ShowDbTreeLabels @@ -706,7 +729,7 @@ Display labels for regular tables - General.ShowRegularTableLabels + General.ShowRegularTableLabels @@ -719,24 +742,24 @@ Display labels for virtual tables - General.ShowVirtualTableLabels + General.ShowVirtualTableLabels - + Expand views node when connected to a database - General.ExpandViews + General.ExpandViews - + 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) @@ -745,17 +768,17 @@ Sort objects (tables, indexes, triggers and views) alphabetically - General.SortObjects + General.SortObjects - + Display system tables and indexes on the list - General.ShowSystemObjects + General.ShowSystemObjects @@ -777,7 +800,7 @@ Open Table Windows with the data tab for start - General.OpenTablesOnData + General.OpenTablesOnData @@ -799,7 +822,7 @@ Open View Windows with the data tab for start - General.OpenViewsOnData + General.OpenViewsOnData @@ -943,7 +966,7 @@ - General.Style + General.Style @@ -991,7 +1014,7 @@ - CheckBox + CheckBox @@ -1015,7 +1038,7 @@ - PushButton + PushButton @@ -1039,46 +1062,46 @@ - Column + Column - 123 + 123 - 11111 + 11111 - 22222 + 22222 - 33333 + 33333 - 456 + 456 - 44444 + 44444 - 55555 + 55555 - 66666 + 66666 @@ -1087,7 +1110,7 @@ - ... + ... @@ -1097,20 +1120,23 @@ - RadioButton + RadioButton + + ABC + - ABC + ABC - XYZ + XYZ @@ -1118,7 +1144,7 @@ - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <!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:10pt; font-weight:400; font-style:normal;"> @@ -1226,7 +1252,7 @@ p, li { white-space: pre-wrap; } - Fonts.SqlEditor + Fonts.SqlEditor @@ -1242,7 +1268,7 @@ p, li { white-space: pre-wrap; } - Fonts.DbTree + Fonts.DbTree @@ -1258,7 +1284,7 @@ p, li { white-space: pre-wrap; } - Fonts.DbTreeLabel + Fonts.DbTreeLabel @@ -1274,7 +1300,7 @@ p, li { white-space: pre-wrap; } - Fonts.DataView + Fonts.DataView @@ -1290,7 +1316,7 @@ p, li { white-space: pre-wrap; } - Fonts.StatusField + Fonts.StatusField @@ -1374,7 +1400,7 @@ p, li { white-space: pre-wrap; } - Colors.SqlEditorKeywordFg + Colors.SqlEditorKeywordFg @@ -1390,7 +1416,7 @@ p, li { white-space: pre-wrap; } - Colors.SqlEditorStringFg + Colors.SqlEditorStringFg @@ -1406,7 +1432,7 @@ p, li { white-space: pre-wrap; } - Colors.SqlEditorCommentFg + Colors.SqlEditorCommentFg @@ -1422,7 +1448,7 @@ p, li { white-space: pre-wrap; } - Colors.SqlEditorForeground + Colors.SqlEditorForeground @@ -1438,7 +1464,7 @@ p, li { white-space: pre-wrap; } - Colors.SqlEditorCurrentLineBg + Colors.SqlEditorCurrentLineBg @@ -1454,7 +1480,7 @@ p, li { white-space: pre-wrap; } - Colors.SqlEditorLineNumAreaBg + Colors.SqlEditorLineNumAreaBg @@ -1480,7 +1506,7 @@ p, li { white-space: pre-wrap; } - Colors.SqlEditorParenthesisBg + Colors.SqlEditorParenthesisBg @@ -1527,7 +1553,7 @@ p, li { white-space: pre-wrap; } - Colors.SqlEditorBlobFg + Colors.SqlEditorBlobFg @@ -1564,7 +1590,7 @@ p, li { white-space: pre-wrap; } - Colors.SqlEditorNumberFg + Colors.SqlEditorNumberFg @@ -1580,7 +1606,7 @@ p, li { white-space: pre-wrap; } - Colors.SqlEditorBindParamFg + Colors.SqlEditorBindParamFg @@ -1606,7 +1632,7 @@ p, li { white-space: pre-wrap; } - Colors.SqlEditorValidObject + Colors.SqlEditorValidObject @@ -1641,7 +1667,7 @@ p, li { white-space: pre-wrap; } - Colors.DataUncommited + Colors.DataUncommited @@ -1667,7 +1693,7 @@ p, li { white-space: pre-wrap; } - Colors.DataUncommitedError + Colors.DataUncommitedError @@ -1690,7 +1716,7 @@ p, li { white-space: pre-wrap; } - Colors.DataNullFg + Colors.DataNullFg @@ -1713,7 +1739,7 @@ p, li { white-space: pre-wrap; } - Colors.DataDeletedBg + Colors.DataDeletedBg @@ -1748,7 +1774,7 @@ p, li { white-space: pre-wrap; } - Colors.DbTreeLabelsFg + Colors.DbTreeLabelsFg @@ -1780,7 +1806,7 @@ p, li { white-space: pre-wrap; } - Colors.StatusFieldInfoFg + Colors.StatusFieldInfoFg @@ -1803,7 +1829,7 @@ p, li { white-space: pre-wrap; } - Colors.StatusFieldWarnFg + Colors.StatusFieldWarnFg @@ -1826,7 +1852,7 @@ p, li { white-space: pre-wrap; } - Colors.StatusFieldErrorFg + Colors.StatusFieldErrorFg diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/constraintdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/constraintdialog.ui index 7df34d8..addfb9f 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/constraintdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/constraintdialog.ui @@ -17,7 +17,7 @@ - Dialog + Dialog diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/dbconverterdialog.cpp b/SQLiteStudio3/guiSQLiteStudio/dialogs/dbconverterdialog.cpp index c94546e..8af131e 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/dbconverterdialog.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/dbconverterdialog.cpp @@ -45,7 +45,6 @@ void DbConverterDialog::init() { ui->setupUi(this); limitDialogWidth(this); - setWindowTitle(tr("Convert database")); widgetCover = new WidgetCover(this); widgetCover->setVisible(false); diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/dbconverterdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/dbconverterdialog.ui index d328e99..f6bf009 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/dbconverterdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/dbconverterdialog.ui @@ -11,7 +11,7 @@ - Dialog + Convert database diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/errorsconfirmdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/errorsconfirmdialog.ui index 81cdb17..615a6fd 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/errorsconfirmdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/errorsconfirmdialog.ui @@ -11,7 +11,7 @@ - Dialog + Errors diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/exportdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/exportdialog.ui index 9f84232..333d887 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/exportdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/exportdialog.ui @@ -11,7 +11,7 @@ - Export dialog + Export QWizard::CancelButtonOnLeft|QWizard::NoDefaultButton @@ -111,7 +111,7 @@ - . + . @@ -289,8 +289,8 @@ 0 0 - 298 - 288 + 483 + 318 @@ -347,7 +347,7 @@ - ... + ... @@ -421,17 +421,17 @@ + + SqlEditor + QPlainTextEdit +
sqleditor.h
+
VerifiableWizardPage QWizardPage
common/verifiablewizardpage.h
1
- - SqlEditor - QPlainTextEdit -
sqleditor.h
-
diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.ui index b853ab8..c8756f7 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.ui @@ -47,7 +47,7 @@ - . + . @@ -103,8 +103,8 @@ 0 0 - 269 - 280 + 479 + 310
@@ -169,7 +169,7 @@ - ... + ... diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/indexdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/indexdialog.ui index e231550..4e2cbac 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/indexdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/indexdialog.ui @@ -17,7 +17,7 @@ - Index dialog + Index diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/languagedialog.cpp b/SQLiteStudio3/guiSQLiteStudio/dialogs/languagedialog.cpp new file mode 100644 index 0000000..38f6fe0 --- /dev/null +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/languagedialog.cpp @@ -0,0 +1,34 @@ +#include "languagedialog.h" +#include "ui_languagedialog.h" + +LanguageDialog::LanguageDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::LanguageDialog) +{ + ui->setupUi(this); +} + +LanguageDialog::~LanguageDialog() +{ + delete ui; +} + +void LanguageDialog::setLanguages(const QMap& langs) +{ + for (const QString& langName : langs.keys()) + ui->comboBox->addItem(langName, langs[langName]); +} + +QString LanguageDialog::getSelectedLang() const +{ + return ui->comboBox->currentData().toString(); +} + +void LanguageDialog::setSelectedLang(const QString& lang) +{ + int idx = ui->comboBox->findData(lang); + if (idx < 0) + idx = 0; + + ui->comboBox->setCurrentIndex(idx); +} diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/languagedialog.h b/SQLiteStudio3/guiSQLiteStudio/dialogs/languagedialog.h new file mode 100644 index 0000000..7fc0607 --- /dev/null +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/languagedialog.h @@ -0,0 +1,27 @@ +#ifndef LANGUAGEDIALOG_H +#define LANGUAGEDIALOG_H + +#include +#include + +namespace Ui { + class LanguageDialog; +} + +class LanguageDialog : public QDialog +{ + Q_OBJECT + + public: + explicit LanguageDialog(QWidget *parent = 0); + ~LanguageDialog(); + + void setLanguages(const QMap& langs); + QString getSelectedLang() const; + void setSelectedLang(const QString& lang); + + private: + Ui::LanguageDialog *ui; +}; + +#endif // LANGUAGEDIALOG_H diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/languagedialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/languagedialog.ui new file mode 100644 index 0000000..afd118e --- /dev/null +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/languagedialog.ui @@ -0,0 +1,77 @@ + + + LanguageDialog + + + + 0 + 0 + 374 + 81 + + + + Language + + + + + + Please choose language: + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + + + + buttonBox + accepted() + LanguageDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + LanguageDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/messagelistdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/messagelistdialog.ui index 10ee6b8..010c866 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/messagelistdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/messagelistdialog.ui @@ -11,7 +11,7 @@ - Dialog + Dialog diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/searchtextdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/searchtextdialog.ui index ce9e12e..30113af 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/searchtextdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/searchtextdialog.ui @@ -7,11 +7,11 @@ 0 0 403 - 184 + 195 - Dialog + Find or replace diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/triggercolumnsdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/triggercolumnsdialog.ui index 4326fca..861e17b 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/triggercolumnsdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/triggercolumnsdialog.ui @@ -11,10 +11,19 @@ - Dialog + Trigger columns - + + 0 + + + 0 + + + 0 + + 0 @@ -52,12 +61,21 @@ 0 0 - 320 - 239 + 316 + 237 - + + 0 + + + 0 + + + 0 + + 0 diff --git a/SQLiteStudio3/guiSQLiteStudio/dialogs/triggerdialog.ui b/SQLiteStudio3/guiSQLiteStudio/dialogs/triggerdialog.ui index bf3da0a..723f903 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dialogs/triggerdialog.ui +++ b/SQLiteStudio3/guiSQLiteStudio/dialogs/triggerdialog.ui @@ -11,7 +11,7 @@ - Trigger dialog + Trigger @@ -87,7 +87,7 @@ List of columns for UPDATE OF action. - ... + ... -- cgit v1.2.3