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 --- SQLiteStudio3/guiSQLiteStudio/common/fontedit.ui | 8 +- .../guiSQLiteStudio/common/numericspinbox.cpp | 2 +- .../completer/completeritemdelegate.cpp | 4 +- .../constraints/columncollatepanel.ui | 24 +- .../constraints/columndefaultpanel.cpp | 245 +- .../constraints/columndefaultpanel.h | 16 +- .../constraints/columndefaultpanel.ui | 2 +- .../constraints/columnforeignkeypanel.cpp | 2 +- .../constraints/columnforeignkeypanel.ui | 8 +- .../constraints/columnprimarykeypanel.ui | 35 +- .../constraints/columnuniqueandnotnullpanel.ui | 24 +- .../constraints/constraintcheckpanel.ui | 6 +- .../constraints/tableforeignkeypanel.cpp | 3 +- .../constraints/tableforeignkeypanel.ui | 8 +- .../constraints/tablepkanduniquepanel.ui | 2 +- .../guiSQLiteStudio/datagrid/sqlqueryitem.cpp | 14 +- .../datagrid/sqlqueryitemdelegate.cpp | 12 +- .../datagrid/sqlqueryitemdelegate.h | 1 + .../guiSQLiteStudio/datagrid/sqlquerymodel.cpp | 32 +- .../guiSQLiteStudio/datagrid/sqlquerymodel.h | 2 + .../datagrid/sqlquerymodelcolumn.cpp | 9 +- .../guiSQLiteStudio/datagrid/sqlqueryview.cpp | 152 +- .../guiSQLiteStudio/datagrid/sqlqueryview.h | 6 +- .../guiSQLiteStudio/datagrid/sqltablemodel.cpp | 16 +- SQLiteStudio3/guiSQLiteStudio/dblistmodel.cpp | 5 + SQLiteStudio3/guiSQLiteStudio/dblistmodel.h | 1 + SQLiteStudio3/guiSQLiteStudio/dbobjectdialogs.h | 2 + SQLiteStudio3/guiSQLiteStudio/dbtree/dbtree.cpp | 49 +- SQLiteStudio3/guiSQLiteStudio/dbtree/dbtree.h | 8 +- .../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 +- SQLiteStudio3/guiSQLiteStudio/formmanager.cpp | 20 +- SQLiteStudio3/guiSQLiteStudio/formmanager.h | 2 + .../guiSQLiteStudio/forms/sqlformatterplugin.ui | 2 +- SQLiteStudio3/guiSQLiteStudio/guiSQLiteStudio.pro | 14 +- SQLiteStudio3/guiSQLiteStudio/guiSQLiteStudio.qrc | 5 + SQLiteStudio3/guiSQLiteStudio/iconmanager.cpp | 5 + SQLiteStudio3/guiSQLiteStudio/iconmanager.h | 2 + SQLiteStudio3/guiSQLiteStudio/icons.qrc | 1 + .../guiSQLiteStudio/img/reset_autoincrement.png | Bin 0 -> 708 bytes SQLiteStudio3/guiSQLiteStudio/mainwindow.cpp | 7 + SQLiteStudio3/guiSQLiteStudio/mainwindow.h | 1 + SQLiteStudio3/guiSQLiteStudio/mainwindow.ui | 7 +- .../guiSQLiteStudio/multieditor/multieditordate.h | 2 + .../multieditor/multieditornumeric.cpp | 3 +- .../multieditor/multieditornumeric.h | 2 + .../guiSQLiteStudio/multieditor/multieditortime.h | 2 + SQLiteStudio3/guiSQLiteStudio/sqlcompareview.cpp | 3 - SQLiteStudio3/guiSQLiteStudio/sqleditor.cpp | 88 +- SQLiteStudio3/guiSQLiteStudio/sqleditor.h | 3 + SQLiteStudio3/guiSQLiteStudio/taskbar.cpp | 2 +- SQLiteStudio3/guiSQLiteStudio/taskbar.h | 1 - .../translations/guiSQLiteStudio_pl.qm | Bin 0 -> 137929 bytes .../translations/guiSQLiteStudio_pl.ts | 5980 ++++++++++++++++++++ SQLiteStudio3/guiSQLiteStudio/uiconfig.h | 1 + .../windows/bugreporthistorywindow.ui | 2 +- .../guiSQLiteStudio/windows/collationseditor.ui | 2 +- .../guiSQLiteStudio/windows/ddlhistorywindow.ui | 2 +- .../guiSQLiteStudio/windows/editorwindow.cpp | 19 +- .../guiSQLiteStudio/windows/editorwindow.h | 2 +- .../guiSQLiteStudio/windows/editorwindow.ui | 45 +- .../guiSQLiteStudio/windows/functionseditor.ui | 2 +- .../guiSQLiteStudio/windows/tablewindow.cpp | 35 +- .../guiSQLiteStudio/windows/tablewindow.h | 2 + .../guiSQLiteStudio/windows/tablewindow.ui | 4 +- .../guiSQLiteStudio/windows/viewwindow.cpp | 6 +- .../guiSQLiteStudio/windows/viewwindow.ui | 34 +- 89 files changed, 7135 insertions(+), 450 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 create mode 100644 SQLiteStudio3/guiSQLiteStudio/guiSQLiteStudio.qrc create mode 100644 SQLiteStudio3/guiSQLiteStudio/img/reset_autoincrement.png create mode 100644 SQLiteStudio3/guiSQLiteStudio/translations/guiSQLiteStudio_pl.qm create mode 100644 SQLiteStudio3/guiSQLiteStudio/translations/guiSQLiteStudio_pl.ts (limited to 'SQLiteStudio3/guiSQLiteStudio') diff --git a/SQLiteStudio3/guiSQLiteStudio/common/fontedit.ui b/SQLiteStudio3/guiSQLiteStudio/common/fontedit.ui index d8daa9f..575208f 100644 --- a/SQLiteStudio3/guiSQLiteStudio/common/fontedit.ui +++ b/SQLiteStudio3/guiSQLiteStudio/common/fontedit.ui @@ -7,24 +7,24 @@ 0 0 451 - 35 + 37 - Form + Form - TextLabel + TextLabel - ... + ... diff --git a/SQLiteStudio3/guiSQLiteStudio/common/numericspinbox.cpp b/SQLiteStudio3/guiSQLiteStudio/common/numericspinbox.cpp index 5a48033..e1b6620 100644 --- a/SQLiteStudio3/guiSQLiteStudio/common/numericspinbox.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/common/numericspinbox.cpp @@ -34,7 +34,6 @@ QValidator::State NumericSpinBox::validate(QString& input, int& pos) const { UNUSED(input); UNUSED(pos); - emit modified(); if (strict) return validateStrict(input, pos); @@ -103,6 +102,7 @@ void NumericSpinBox::setStrict(bool value, bool allowEmpty) void NumericSpinBox::valueEdited(const QString& value) { setValueInternal(value); + emit modified(); } QAbstractSpinBox::StepEnabled NumericSpinBox::stepEnabled() const diff --git a/SQLiteStudio3/guiSQLiteStudio/completer/completeritemdelegate.cpp b/SQLiteStudio3/guiSQLiteStudio/completer/completeritemdelegate.cpp index bda3040..a0da399 100644 --- a/SQLiteStudio3/guiSQLiteStudio/completer/completeritemdelegate.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/completer/completeritemdelegate.cpp @@ -51,7 +51,7 @@ void CompleterItemDelegate::paintIcon(QPainter* painter, const QStyleOptionViewI iconRect.setSize(iconSize + QSize(spacer*2, spacer*2)); iconRect.setTopLeft(iconRect.topLeft() + QPoint(spacer, spacer)); - QIcon::State state = option.state & QStyle::State_Open ? QIcon::On : QIcon::Off; + QIcon::State state = (option.state & QStyle::State_Open) ? QIcon::On : QIcon::Off; icon.paint(painter, iconRect, option.decorationAlignment, mode, state); } @@ -60,7 +60,7 @@ void CompleterItemDelegate::paintText(QPainter* painter, const QStyleOptionViewI painter->save(); // Colors - QPalette::ColorGroup cg = option.state & QStyle::State_Enabled ? QPalette::Normal : QPalette::Disabled; + QPalette::ColorGroup cg = (option.state & QStyle::State_Enabled) ? QPalette::Normal : QPalette::Disabled; if (cg == QPalette::Normal && !(option.state & QStyle::State_Active)) cg = QPalette::Inactive; diff --git a/SQLiteStudio3/guiSQLiteStudio/constraints/columncollatepanel.ui b/SQLiteStudio3/guiSQLiteStudio/constraints/columncollatepanel.ui index a481875..0c3478e 100644 --- a/SQLiteStudio3/guiSQLiteStudio/constraints/columncollatepanel.ui +++ b/SQLiteStudio3/guiSQLiteStudio/constraints/columncollatepanel.ui @@ -11,7 +11,7 @@ - Form + Form @@ -23,7 +23,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -46,7 +55,16 @@ - + + 0 + + + 0 + + + 0 + + 0 diff --git a/SQLiteStudio3/guiSQLiteStudio/constraints/columndefaultpanel.cpp b/SQLiteStudio3/guiSQLiteStudio/constraints/columndefaultpanel.cpp index 3d7090a..4f402b2 100644 --- a/SQLiteStudio3/guiSQLiteStudio/constraints/columndefaultpanel.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/constraints/columndefaultpanel.cpp @@ -1,9 +1,9 @@ #include "columndefaultpanel.h" #include "ui_columndefaultpanel.h" -#include "parser/ast/sqlitecreatetable.h" #include "parser/parser.h" #include "parser/keywords.h" #include "uiutils.h" +#include "schemaresolver.h" #include ColumnDefaultPanel::ColumnDefaultPanel(QWidget *parent) : @@ -34,6 +34,22 @@ void ColumnDefaultPanel::changeEvent(QEvent *e) bool ColumnDefaultPanel::validate() { + if (!ui->exprEdit->isSyntaxChecked()) + { + setValidState(ui->exprEdit, false, tr("Enter a default value expression.")); + currentMode = Mode::ERROR; + return false; + } + + // First check if we already validated this text. + // This method is called twice, by both errors checking and syntax highlighting, + // because signal for textChange() is connected with call to updateValidation(). + QString text = ui->exprEdit->toPlainText(); + if (!lastValidatedText.isNull() && lastValidatedText == text) + return lastValidationResult; + + lastValidatedText = text; + bool nameOk = true; if (ui->namedCheck->isChecked() && ui->namedEdit->text().isEmpty()) nameOk = false; @@ -41,12 +57,40 @@ bool ColumnDefaultPanel::validate() bool exprOk = !ui->exprEdit->toPlainText().trimmed().isEmpty() && !ui->exprEdit->haveErrors(); - bool exprCheckedOk = exprOk && ui->exprEdit->isSyntaxChecked(); + QString exprError; + if (exprOk) + { + // Everything looks fine, so lets do the final check - if the value is considered constant by SQLite. + static QString tempDdlLiteralTpl = QStringLiteral("CREATE TABLE temp.%1 (col DEFAULT %2);"); + static QString tempDdlExprTpl = QStringLiteral("CREATE TABLE temp.%1 (col DEFAULT (%2));"); + static QString dropTempDdl = QStringLiteral("DROP TABLE IF EXISTS temp.%1;"); + + QString tableName = getTempTable(); + QString tempDdl = tempDdlExprTpl.arg(tableName, ui->exprEdit->toPlainText()); + SqlQueryPtr res = db->exec(tempDdl); + if (res->isError()) + { + tempDdl = tempDdlLiteralTpl.arg(tableName, ui->exprEdit->toPlainText()); + res = db->exec(tempDdl); + if (res->isError()) + { + exprOk = false; + exprError = tr("Invalid default value expression: %1").arg(res->getErrorText()); + } + else + currentMode = Mode::LITERAL; + } + else + currentMode = Mode::EXPR; + + db->exec(dropTempDdl.arg(tableName)); + } - setValidState(ui->exprEdit, exprOk, tr("Enter a default value expression.")); + setValidState(ui->exprEdit, exprOk, exprError); setValidState(ui->namedEdit, nameOk, tr("Enter a name of the constraint.")); - return exprCheckedOk && nameOk; + lastValidationResult = (exprOk && nameOk); + return lastValidationResult; } bool ColumnDefaultPanel::validateOnly() @@ -69,18 +113,99 @@ void ColumnDefaultPanel::storeConfiguration() if (constraint.isNull()) return; + if (currentMode == Mode::ERROR) + { + qCritical() << "Call to ColumnDefaultPanel::storeConfiguration() while its mode is in ERROR state."; + return; + } + SqliteCreateTable::Column::Constraint* constr = dynamic_cast(constraint.data()); constr->type = SqliteCreateTable::Column::Constraint::DEFAULT; - SqliteExprPtr expr = parseExpression(ui->exprEdit->toPlainText()); - SqliteExpr* newExpr = new SqliteExpr(*expr.data()); - newExpr->setParent(constraint.data()); - constr->expr = newExpr; + switch (currentMode) + { + case Mode::EXPR: + storeExpr(constr); + break; + case Mode::LITERAL: + storeLiteral(constr); + break; + case Mode::ERROR: + return; + } if (ui->namedCheck->isChecked()) constr->name = ui->namedEdit->text(); } +void ColumnDefaultPanel::storeExpr(SqliteCreateTable::Column::Constraint* constr) +{ + QString text = ui->exprEdit->toPlainText(); + clearDefault(constr); + if (text.toUpper() == "NULL") + { + // We will just use literal null, no need to create expression with null. + constr->literalNull = true; + return; + } + + Parser parser(db->getDialect()); + SqliteExpr* newExpr = parser.parseExpr(text); + newExpr->setParent(constraint.data()); + constr->expr = newExpr; +} + +void ColumnDefaultPanel::storeLiteral(SqliteCreateTable::Column::Constraint* constr) +{ + QString text = ui->exprEdit->toPlainText(); + + Parser parser(db->getDialect()); + SqliteCreateTablePtr createTable = parser.parse("CREATE TABLE tab (col DEFAULT "+text+");"); + if (!createTable || createTable->columns.size() == 0 || createTable->columns.first()->constraints.size() == 0) + { + qCritical() << "ColumnDefaultPanel::storeLiteral(): create table not parsed! Cannot store literal. Expression was:" << text; + return; + } + + SqliteCreateTable::Column::Constraint* parsedConstr = createTable->columns.first()->constraints.first(); + if (parsedConstr->type != SqliteCreateTable::Column::Constraint::Type::DEFAULT) + { + qCritical() << "ColumnDefaultPanel::storeLiteral(): parsed constraint not a DEFAULT! Cannot store literal. Expression was:" << text; + return; + } + + clearDefault(constr); + if (!parsedConstr->id.isNull()) + constr->id = parsedConstr->id; + else if (!parsedConstr->ctime.isNull()) + constr->ctime = parsedConstr->ctime.toUpper(); + else if (parsedConstr->expr) + { + qWarning() << "ColumnDefaultPanel::storeLiteral(): parsed constraint turned out to be an expression. This should be handled by ColumnDefaultPanel::storeExpr." + << "Expression was:" << text; + constr->expr = parsedConstr->expr; + parsedConstr->expr = nullptr; + constr->expr->setParent(constr); + } + else if (parsedConstr->literalNull) + constr->literalNull = true; + else + constr->literalValue = parsedConstr->literalValue; +} + +void ColumnDefaultPanel::clearDefault(SqliteCreateTable::Column::Constraint* constr) +{ + if (constr->expr) + { + delete constr->expr; + constr->expr = nullptr; + } + constr->literalNull = false; + constr->literalValue = QVariant(); + constr->id = QString(); + constr->ctime = QString(); +} + void ColumnDefaultPanel::init() { setFocusProxy(ui->exprEdit); @@ -101,101 +226,49 @@ void ColumnDefaultPanel::readConstraint() SqliteCreateTable::Column::Constraint* constr = dynamic_cast(constraint.data()); if (constr->expr) + { ui->exprEdit->setPlainText(constr->expr->detokenize()); + currentMode = Mode::EXPR; + } else if (!constr->literalValue.isNull()) - ui->exprEdit->setPlainText(constr->literalValue.toString()); - - if (!constr->name.isNull()) { - ui->namedCheck->setChecked(true); - ui->namedEdit->setText(constr->name); + ui->exprEdit->setPlainText(constr->literalValue.toString()); + currentMode = Mode::LITERAL; } -} - -void ColumnDefaultPanel::updateVirtualSql() -{ - ui->exprEdit->setDb(db); - - SqliteCreateTable::Column* column = dynamic_cast(constraint->parentStatement()); - SqliteCreateTable* createTable = dynamic_cast(column->parentStatement()); - - createTable->rebuildTokens(); - TokenList tokens = createTable->tokens; - TokenList colTokens = column->tokens; - if (createTable->columns.indexOf(column) == -1) + else if (!constr->id.isNull()) { - if (createTable->columns.size() == 0) - { - // No columns. Cannot get any context info. - return; - } - - colTokens = createTable->columns.last()->tokens; + ui->exprEdit->setPlainText(constr->id); + currentMode = Mode::LITERAL; } - - if (colTokens.size() == 0) + else if (!constr->ctime.isNull()) { - qWarning() << "CREATE TABLE tokens are invalid (0) while call to ColumnDefaultPanel::updateVirtualSql()."; - return; + ui->exprEdit->setPlainText(constr->ctime); + currentMode = Mode::LITERAL; } - - int idx = tokens.lastIndexOf(colTokens.last()); - if (idx == -1) + else if (constr->literalNull) { - qWarning() << "CREATE TABLE tokens are invalid while call to ColumnDefaultPanel::updateVirtualSql()."; - return; + ui->exprEdit->setPlainText("NULL"); + currentMode = Mode::LITERAL; } - idx++; - - TokenList newTokens; - newTokens << TokenPtr::create(Token::SPACE, " ") - << TokenPtr::create(Token::KEYWORD, "DEFAULT") - << TokenPtr::create(Token::SPACE, " "); - if (constraint->dialect == Dialect::Sqlite3) - { - newTokens << TokenPtr::create(Token::PAR_LEFT, "(") - << TokenPtr::create(Token::OTHER, "%1") - << TokenPtr::create(Token::PAR_RIGHT, ")"); - } - else + if (!constr->name.isNull()) { - newTokens << TokenPtr::create(Token::OTHER, "%1"); + ui->namedCheck->setChecked(true); + ui->namedEdit->setText(constr->name); } - - tokens.insert(idx, newTokens); - QString sql = tokens.detokenize(); - - ui->exprEdit->setVirtualSqlExpression(sql); } -SqliteExprPtr ColumnDefaultPanel::parseExpression(const QString& sql) +void ColumnDefaultPanel::updateVirtualSql() { - Parser parser(db->getDialect()); - if (!parser.parse("SELECT "+sql)) - return SqliteExprPtr(); - - QList queries = parser.getQueries(); - if (queries.size() == 0) - return SqliteExprPtr(); - - SqliteQueryPtr first = queries.first(); - if (first->queryType != SqliteQueryType::Select) - return SqliteExprPtr(); - - SqliteSelectPtr select = first.dynamicCast(); - if (select->coreSelects.size() < 1) - return SqliteExprPtr(); - - SqliteSelect::Core* core = select->coreSelects.first(); - if (core->resultColumns.size() < 1) - return SqliteExprPtr(); - - SqliteSelect::Core::ResultColumn* resCol = core->resultColumns.first(); - if (!resCol->expr) - return SqliteExprPtr(); + static QString sql = QStringLiteral("CREATE TABLE tab (col DEFAULT %1)"); + ui->exprEdit->setDb(db); + ui->exprEdit->setVirtualSqlExpression(sql.arg(db->getDialect() == Dialect::Sqlite3 ? "(%1)" : "%1")); +} - return resCol->expr->detach().dynamicCast(); +QString ColumnDefaultPanel::getTempTable() +{ + SchemaResolver resolver(db); + return resolver.getUniqueName("temp", "sqlitestudio_temp_table"); } void ColumnDefaultPanel::updateState() diff --git a/SQLiteStudio3/guiSQLiteStudio/constraints/columndefaultpanel.h b/SQLiteStudio3/guiSQLiteStudio/constraints/columndefaultpanel.h index 933c2dd..3cdd962 100644 --- a/SQLiteStudio3/guiSQLiteStudio/constraints/columndefaultpanel.h +++ b/SQLiteStudio3/guiSQLiteStudio/constraints/columndefaultpanel.h @@ -4,6 +4,7 @@ #include "constraintpanel.h" #include "parser/ast/sqliteconflictalgo.h" #include "guiSQLiteStudio_global.h" +#include "parser/ast/sqlitecreatetable.h" #include namespace Ui { @@ -27,12 +28,25 @@ class GUI_API_EXPORT ColumnDefaultPanel : public ConstraintPanel void storeConfiguration(); private: + enum class Mode + { + EXPR, + LITERAL, + ERROR + }; + void init(); void readConstraint(); void updateVirtualSql(); - SqliteExprPtr parseExpression(const QString& sql); + QString getTempTable(); + void storeExpr(SqliteCreateTable::Column::Constraint* constr); + void storeLiteral(SqliteCreateTable::Column::Constraint* constr); + void clearDefault(SqliteCreateTable::Column::Constraint* constr); Ui::ColumnDefaultPanel *ui = nullptr; + QString lastValidatedText; + bool lastValidationResult = false; + Mode currentMode = Mode::ERROR; private slots: void updateState(); diff --git a/SQLiteStudio3/guiSQLiteStudio/constraints/columndefaultpanel.ui b/SQLiteStudio3/guiSQLiteStudio/constraints/columndefaultpanel.ui index fdf55b0..0026fdb 100644 --- a/SQLiteStudio3/guiSQLiteStudio/constraints/columndefaultpanel.ui +++ b/SQLiteStudio3/guiSQLiteStudio/constraints/columndefaultpanel.ui @@ -11,7 +11,7 @@ - Form + Form diff --git a/SQLiteStudio3/guiSQLiteStudio/constraints/columnforeignkeypanel.cpp b/SQLiteStudio3/guiSQLiteStudio/constraints/columnforeignkeypanel.cpp index cf234f7..f4eb3eb 100644 --- a/SQLiteStudio3/guiSQLiteStudio/constraints/columnforeignkeypanel.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/constraints/columnforeignkeypanel.cpp @@ -217,7 +217,7 @@ void ColumnForeignKeyPanel::storeConfiguration() storeCondition(SqliteForeignKey::Condition::DELETE, ui->onDeleteCombo->currentText()); if (ui->onUpdateCheckBox->isChecked()) - storeCondition(SqliteForeignKey::Condition::UPDATE, ui->onDeleteCombo->currentText()); + storeCondition(SqliteForeignKey::Condition::UPDATE, ui->onUpdateCombo->currentText()); if (ui->matchCheckBox->isChecked()) storeMatchCondition(ui->matchCombo->currentText()); diff --git a/SQLiteStudio3/guiSQLiteStudio/constraints/columnforeignkeypanel.ui b/SQLiteStudio3/guiSQLiteStudio/constraints/columnforeignkeypanel.ui index c442967..23e2300 100644 --- a/SQLiteStudio3/guiSQLiteStudio/constraints/columnforeignkeypanel.ui +++ b/SQLiteStudio3/guiSQLiteStudio/constraints/columnforeignkeypanel.ui @@ -17,7 +17,7 @@ - Form + Form @@ -61,7 +61,7 @@ - ON UPDATE + ON UPDATE @@ -71,14 +71,14 @@ - ON DELETE + ON DELETE - MATCH + MATCH diff --git a/SQLiteStudio3/guiSQLiteStudio/constraints/columnprimarykeypanel.ui b/SQLiteStudio3/guiSQLiteStudio/constraints/columnprimarykeypanel.ui index bedabca..d6c15d4 100644 --- a/SQLiteStudio3/guiSQLiteStudio/constraints/columnprimarykeypanel.ui +++ b/SQLiteStudio3/guiSQLiteStudio/constraints/columnprimarykeypanel.ui @@ -17,7 +17,7 @@ - Form + Form @@ -30,7 +30,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -56,7 +65,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -75,7 +93,16 @@ - + + 0 + + + 0 + + + 0 + + 0 diff --git a/SQLiteStudio3/guiSQLiteStudio/constraints/columnuniqueandnotnullpanel.ui b/SQLiteStudio3/guiSQLiteStudio/constraints/columnuniqueandnotnullpanel.ui index 16efc89..7a60f40 100644 --- a/SQLiteStudio3/guiSQLiteStudio/constraints/columnuniqueandnotnullpanel.ui +++ b/SQLiteStudio3/guiSQLiteStudio/constraints/columnuniqueandnotnullpanel.ui @@ -17,13 +17,22 @@ - Form + Form - + + 0 + + + 0 + + + 0 + + 0 @@ -42,7 +51,16 @@ - + + 0 + + + 0 + + + 0 + + 0 diff --git a/SQLiteStudio3/guiSQLiteStudio/constraints/constraintcheckpanel.ui b/SQLiteStudio3/guiSQLiteStudio/constraints/constraintcheckpanel.ui index 58f58e6..e7021b4 100644 --- a/SQLiteStudio3/guiSQLiteStudio/constraints/constraintcheckpanel.ui +++ b/SQLiteStudio3/guiSQLiteStudio/constraints/constraintcheckpanel.ui @@ -7,17 +7,17 @@ 0 0 400 - 197 + 211 - Form + Form - The expression + The condition diff --git a/SQLiteStudio3/guiSQLiteStudio/constraints/tableforeignkeypanel.cpp b/SQLiteStudio3/guiSQLiteStudio/constraints/tableforeignkeypanel.cpp index 60da220..7354997 100644 --- a/SQLiteStudio3/guiSQLiteStudio/constraints/tableforeignkeypanel.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/constraints/tableforeignkeypanel.cpp @@ -327,7 +327,6 @@ void TableForeignKeyPanel::storeConfiguration() QCheckBox* check = nullptr; QComboBox* combo = nullptr; SqliteIndexedColumn* idxCol = nullptr; - QString name; for (int i = 0; i < totalColumns; i++) { // Local column @@ -352,7 +351,7 @@ void TableForeignKeyPanel::storeConfiguration() storeCondition(SqliteForeignKey::Condition::DELETE, ui->onDeleteCombo->currentText()); if (ui->onUpdateCheckBox->isChecked()) - storeCondition(SqliteForeignKey::Condition::UPDATE, ui->onDeleteCombo->currentText()); + storeCondition(SqliteForeignKey::Condition::UPDATE, ui->onUpdateCombo->currentText()); if (ui->matchCheckBox->isChecked()) storeMatchCondition(ui->matchCombo->currentText()); diff --git a/SQLiteStudio3/guiSQLiteStudio/constraints/tableforeignkeypanel.ui b/SQLiteStudio3/guiSQLiteStudio/constraints/tableforeignkeypanel.ui index 8917381..7ecbe06 100644 --- a/SQLiteStudio3/guiSQLiteStudio/constraints/tableforeignkeypanel.ui +++ b/SQLiteStudio3/guiSQLiteStudio/constraints/tableforeignkeypanel.ui @@ -17,7 +17,7 @@ - Form + Form @@ -129,7 +129,7 @@ but it's okay to use them anyway. - ON UPDATE + ON UPDATE @@ -139,14 +139,14 @@ but it's okay to use them anyway. - ON DELETE + ON DELETE - MATCH + MATCH diff --git a/SQLiteStudio3/guiSQLiteStudio/constraints/tablepkanduniquepanel.ui b/SQLiteStudio3/guiSQLiteStudio/constraints/tablepkanduniquepanel.ui index 9453d3c..52c5af1 100644 --- a/SQLiteStudio3/guiSQLiteStudio/constraints/tablepkanduniquepanel.ui +++ b/SQLiteStudio3/guiSQLiteStudio/constraints/tablepkanduniquepanel.ui @@ -11,7 +11,7 @@ - PrimaryKeyOrUniquePanel + PrimaryKeyOrUniquePanel diff --git a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryitem.cpp b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryitem.cpp index c732b6d..d631899 100644 --- a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryitem.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryitem.cpp @@ -406,12 +406,14 @@ QString SqlQueryItem::loadFullData() return tr("This cell is not editable, because: %1").arg(SqlQueryModelColumn::resolveMessage(col->editionForbiddenReason.values().first())); } - if (isJustInsertedWithOutRowId()) - { - QString msg = tr("When inserted new row to the WITHOUT ROWID table, using DEFAULT value for PRIMARY KEY, " - "the table has to be reloaded in order to edit the new row."); - return tr("This cell is not editable, because: %1").arg(msg); - } + // This should not happen anymore (since WITHOUT ROWID tables should be handled properly now, + // but we will keep this here for a while, just in case. +// if (isJustInsertedWithOutRowId()) +// { +// QString msg = tr("When inserted new row to the WITHOUT ROWID table, using DEFAULT value for PRIMARY KEY, " +// "the table has to be reloaded in order to edit the new row."); +// return tr("This cell is not editable, because: %1").arg(msg); +// } SqlQueryModel *model = getModel(); Db* db = model->getDb(); diff --git a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryitemdelegate.cpp b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryitemdelegate.cpp index ab8f7f2..6741d08 100644 --- a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryitemdelegate.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryitemdelegate.cpp @@ -7,6 +7,7 @@ #include #include #include +#include SqlQueryItemDelegate::SqlQueryItemDelegate(QObject *parent) : QStyledItemDelegate(parent) @@ -16,7 +17,6 @@ SqlQueryItemDelegate::SqlQueryItemDelegate(QObject *parent) : void SqlQueryItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const { QStyledItemDelegate::paint(painter, option, index); - SqlQueryItem* item = getItem(index); if (item->isUncommited()) @@ -54,6 +54,16 @@ QWidget* SqlQueryItemDelegate::createEditor(QWidget* parent, const QStyleOptionV return getEditor(item->getValue().userType(), parent); } +QString SqlQueryItemDelegate::displayText(const QVariant& value, const QLocale& locale) const +{ + UNUSED(locale); + + if (value.type() == QVariant::Double) + return value.toString(); + + return QStyledItemDelegate::displayText(value, locale); +} + SqlQueryItem* SqlQueryItemDelegate::getItem(const QModelIndex &index) const { const SqlQueryModel* queryModel = dynamic_cast(index.model()); diff --git a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryitemdelegate.h b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryitemdelegate.h index a190202..8b894ed 100644 --- a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryitemdelegate.h +++ b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryitemdelegate.h @@ -14,6 +14,7 @@ class GUI_API_EXPORT SqlQueryItemDelegate : public QStyledItemDelegate void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const; QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const; + QString displayText(const QVariant & value, const QLocale & locale) const; private: SqlQueryItem* getItem(const QModelIndex &index) const; diff --git a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlquerymodel.cpp b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlquerymodel.cpp index caeab3b..cb0f27a 100644 --- a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlquerymodel.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlquerymodel.cpp @@ -975,7 +975,7 @@ void SqlQueryModel::handleExecFinished(SqlQueryPtr results) { if (results->isError()) { - emit executionFailed(tr("Error while executing SQL query: %1").arg(results->getErrorText())); + emit executionFailed(tr("Error while executing SQL query on database '%1': %2").arg(db->getName(), results->getErrorText())); return; } @@ -992,11 +992,18 @@ void SqlQueryModel::handleExecFinished(SqlQueryPtr results) reloading = false; - if (queryExecutor->isRowCountingRequired() || rowCount() < CFG_UI.General.NumberOfRowsPerPage.get()) - emit totalRowsAndPagesAvailable(); // rows were counted manually + bool rowsCountedManually = queryExecutor->isRowCountingRequired() || rowCount() < CFG_UI.General.NumberOfRowsPerPage.get(); + bool countRes = false; + if (rowsCountedManually) + emit totalRowsAndPagesAvailable(); else - queryExecutor->countResults(); + countRes = queryExecutor->countResults(); + if (!countRes || !queryExecutor->getAsyncMode()) + { + results.clear(); + detachDatabases(); + } } void SqlQueryModel::handleExecFailed(int code, QString errorMessage) @@ -1019,7 +1026,7 @@ void SqlQueryModel::handleExecFailed(int code, QString errorMessage) emit executionFailed(tr("Error while loading query results: %1").arg(errorMessage)); } else - emit executionFailed(tr("Error while executing SQL query: %1").arg(errorMessage)); + emit executionFailed(tr("Error while executing SQL query on database '%1': %2").arg(db->getName(), errorMessage)); restoreNumbersToQueryExecutor(); resultsCountingFinished(0, 0, 0); @@ -1032,6 +1039,7 @@ void SqlQueryModel::resultsCountingFinished(quint64 rowsAffected, quint64 rowsRe this->rowsAffected = rowsAffected; this->totalRowsReturned = rowsReturned; this->totalPages = totalPages; + detachDatabases(); emit totalRowsAndPagesAvailable(); } @@ -1150,10 +1158,10 @@ void SqlQueryModel::storeStep1NumbersFromExecution() lastExecutionTime = queryExecutor->getLastExecutionTime(); page = queryExecutor->getPage(); sortOrder = queryExecutor->getSortOrder(); + rowsAffected = queryExecutor->getRowsAffected(); if (!queryExecutor->getSkipRowCounting()) { - rowsAffected = queryExecutor->getRowsAffected(); totalPages = queryExecutor->getTotalPages(); if (!queryExecutor->isRowCountingRequired()) totalRowsReturned = queryExecutor->getTotalRowsReturned(); @@ -1214,6 +1222,11 @@ bool SqlQueryModel::wasSchemaModified() const return queryExecutor->wasSchemaModified(); } +bool SqlQueryModel::wasDataModifyingQuery() const +{ + return queryExecutor->wasDataModifyingQuery(); +} + void SqlQueryModel::updateSelectiveCommitRollbackActions(const QItemSelection& selected, const QItemSelection& deselected) { UNUSED(selected); @@ -1310,6 +1323,11 @@ Icon& SqlQueryModel::getIconForIdx(int idx) const return ICONS.SORT_COUNT_20_PLUS; } +void SqlQueryModel::detachDatabases() +{ + queryExecutor->releaseResultsAndCleanup(); +} + void SqlQueryModel::addNewRow() { int row = rowCount(); @@ -1483,7 +1501,7 @@ void SqlQueryModel::CommitUpdateQueryBuilder::setTable(const QString& table) void SqlQueryModel::CommitUpdateQueryBuilder::setColumn(const QString& column) { - this->columns = {column}; + this->columns = QStringList({column}); } void SqlQueryModel::CommitUpdateQueryBuilder::addColumn(const QString& column) diff --git a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlquerymodel.h b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlquerymodel.h index cb626ae..cbdd606 100644 --- a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlquerymodel.h +++ b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlquerymodel.h @@ -113,6 +113,7 @@ class GUI_API_EXPORT SqlQueryModel : public QStandardItemModel * @return true if schema was modified, or false if not. */ bool wasSchemaModified() const; + bool wasDataModifyingQuery() const; SqlQueryView* getView() const; void setView(SqlQueryView* value); @@ -254,6 +255,7 @@ class GUI_API_EXPORT SqlQueryModel : public QStandardItemModel void reloadInternal(); void addNewRowInternal(int rowIdx); Icon& getIconForIdx(int idx) const; + void detachDatabases(); QString query; bool explain = false; diff --git a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlquerymodelcolumn.cpp b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlquerymodelcolumn.cpp index 62d0b45..0966ede 100644 --- a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlquerymodelcolumn.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlquerymodelcolumn.cpp @@ -63,7 +63,8 @@ QString SqlQueryModelColumn::resolveMessage(SqlQueryModelColumn::EditionForbidde switch (reason) { case EditionForbiddenReason::COMPOUND_SELECT: - return QObject::tr("Cannot edit columns that are result of compound SELECT statements (one that includes UNION, INTERSECT or EXCEPT keywords)."); + return QObject::tr("Cannot edit columns that are result of compound %1 statements (one that includes %2, %3 or %4 keywords).") + .arg("SELECT", "UNION", "INTERSECT", "EXCEPT"); case EditionForbiddenReason::SMART_EXECUTION_FAILED: return QObject::tr("The query execution mechanism had problems with extracting ROWID's properly. This might be a bug in the application. You may want to report this."); case EditionForbiddenReason::EXPRESSION: @@ -71,11 +72,11 @@ QString SqlQueryModelColumn::resolveMessage(SqlQueryModelColumn::EditionForbidde case EditionForbiddenReason::SYSTEM_TABLE: return QObject::tr("Requested column belongs to restricted SQLite table. Those tables cannot be edited directly."); case EditionForbiddenReason::NOT_A_SELECT: - return QObject::tr("Cannot edit results of query other than SELECT."); + return QObject::tr("Cannot edit results of query other than %1.").arg("SELECT"); case EditionForbiddenReason::GROUPED_RESULTS: - return QObject::tr("Cannot edit columns that are result of aggregated SELECT statements."); + return QObject::tr("Cannot edit columns that are result of aggregated %1 statements.").arg("SELECT"); case EditionForbiddenReason::DISTINCT_RESULTS: - return QObject::tr("Cannot edit columns that are result of SELECT DISTINCT statement."); + return QObject::tr("Cannot edit columns that are result of %1 statement.").arg("SELECT DISTINCT"); case EditionForbiddenReason::COMMON_TABLE_EXPRESSION: return QObject::tr("Cannot edit columns that are result of common table expression statement (%1).").arg("WITH ... SELECT ..."); } diff --git a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryview.cpp b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryview.cpp index e4a0656..1f08b30 100644 --- a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryview.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryview.cpp @@ -35,88 +35,19 @@ SqlQueryView::~SqlQueryView() delete itemDelegate; } -QList SqlQueryView::getSelectedItems() -{ - QList items; - QModelIndexList idxList = selectionModel()->selectedIndexes(); - QModelIndex currIdx = getCurrentIndex(); - if (!idxList.contains(currIdx) && currIdx.isValid()) - idxList << currIdx; - - if (idxList.size() == 0) - return items; - - qSort(idxList); - const SqlQueryModel* model = dynamic_cast(idxList.first().model()); - foreach (const QModelIndex& idx, idxList) - items << model->itemFromIndex(idx); - - return items; -} - -SqlQueryItem* SqlQueryView::getCurrentItem() -{ - QModelIndex idx = getCurrentIndex(); - if (!idx.isValid()) - return nullptr; - - return getModel()->itemFromIndex(idx); -} - -SqlQueryModel* SqlQueryView::getModel() -{ - return dynamic_cast(model()); -} - -void SqlQueryView::setModel(QAbstractItemModel* model) -{ - QTableView::setModel(model); - connect(widgetCover, SIGNAL(cancelClicked()), getModel(), SLOT(interrupt())); - connect(getModel(), &SqlQueryModel::commitStatusChanged, this, &SqlQueryView::updateCommitRollbackActions); - connect(getModel(), &SqlQueryModel::sortingUpdated, this, &SqlQueryView::sortingUpdated); -} - -SqlQueryItem* SqlQueryView::itemAt(const QPoint& pos) -{ - return dynamic_cast(getModel()->itemFromIndex(indexAt(pos))); -} - -QToolBar* SqlQueryView::getToolBar(int toolbar) const -{ - UNUSED(toolbar); - return nullptr; -} - -void SqlQueryView::addAdditionalAction(QAction* action) -{ - additionalActions << action; -} - -QModelIndex SqlQueryView::getCurrentIndex() const -{ - return currentIndex(); -} - -void SqlQueryView::mouseDoubleClickEvent(QMouseEvent* event) -{ - SqlQueryItem* item = itemAt(event->pos()); - if (item && !handleDoubleClick(item)) - return; - - QTableView::mouseDoubleClickEvent(event); -} - void SqlQueryView::init() { itemDelegate = new SqlQueryItemDelegate(); setItemDelegate(itemDelegate); setMouseTracking(true); + setEditTriggers(QAbstractItemView::AnyKeyPressed); setContextMenuPolicy(Qt::CustomContextMenu); contextMenu = new QMenu(this); connect(this, &QWidget::customContextMenuRequested, this, &SqlQueryView::customContextMenuRequested); connect(CFG_UI.Fonts.DataView, SIGNAL(changed(QVariant)), this, SLOT(updateFont())); + connect(this, SIGNAL(activated(QModelIndex)), this, SLOT(itemActivated(QModelIndex))); horizontalHeader()->setSortIndicatorShown(false); horizontalHeader()->setSectionsClickable(true); @@ -227,7 +158,84 @@ void SqlQueryView::setupHeaderMenu() headerContextMenu->addAction(actionMap[RESET_SORTING]); } -bool SqlQueryView::handleDoubleClick(SqlQueryItem* item) +QList SqlQueryView::getSelectedItems() +{ + QList items; + QModelIndexList idxList = selectionModel()->selectedIndexes(); + QModelIndex currIdx = getCurrentIndex(); + if (!idxList.contains(currIdx) && currIdx.isValid()) + idxList << currIdx; + + if (idxList.size() == 0) + return items; + + qSort(idxList); + const SqlQueryModel* model = dynamic_cast(idxList.first().model()); + foreach (const QModelIndex& idx, idxList) + items << model->itemFromIndex(idx); + + return items; +} + +SqlQueryItem* SqlQueryView::getCurrentItem() +{ + QModelIndex idx = getCurrentIndex(); + if (!idx.isValid()) + return nullptr; + + return getModel()->itemFromIndex(idx); +} + +SqlQueryModel* SqlQueryView::getModel() +{ + return dynamic_cast(model()); +} + +void SqlQueryView::setModel(QAbstractItemModel* model) +{ + QTableView::setModel(model); + connect(widgetCover, SIGNAL(cancelClicked()), getModel(), SLOT(interrupt())); + connect(getModel(), &SqlQueryModel::commitStatusChanged, this, &SqlQueryView::updateCommitRollbackActions); + connect(getModel(), &SqlQueryModel::sortingUpdated, this, &SqlQueryView::sortingUpdated); +} + +SqlQueryItem* SqlQueryView::itemAt(const QPoint& pos) +{ + return dynamic_cast(getModel()->itemFromIndex(indexAt(pos))); +} + +QToolBar* SqlQueryView::getToolBar(int toolbar) const +{ + UNUSED(toolbar); + return nullptr; +} + +void SqlQueryView::addAdditionalAction(QAction* action) +{ + additionalActions << action; +} + +QModelIndex SqlQueryView::getCurrentIndex() const +{ + return currentIndex(); +} + +void SqlQueryView::itemActivated(const QModelIndex& index) +{ + if (!index.isValid()) + return; + + SqlQueryItem* item = getModel()->itemFromIndex(index); + if (!item) + return; + + if (!editInEditorIfNecessary(item)) + return; + + edit(getCurrentIndex()); +} + +bool SqlQueryView::editInEditorIfNecessary(SqlQueryItem* item) { if (item->getColumn()->dataType.getType() == DataType::BLOB) { diff --git a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryview.h b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryview.h index 65486fe..a523200 100644 --- a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryview.h +++ b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqlqueryview.h @@ -71,9 +71,6 @@ class GUI_API_EXPORT SqlQueryView : public QTableView, public ExtActionContainer void addAdditionalAction(QAction* action); QModelIndex getCurrentIndex() const; - protected: - void mouseDoubleClickEvent(QMouseEvent* event); - private: void init(); void setupWidgetCover(); @@ -82,7 +79,7 @@ class GUI_API_EXPORT SqlQueryView : public QTableView, public ExtActionContainer void refreshShortcuts(); void setupActionsForMenu(SqlQueryItem* currentItem, const QList& selectedItems); void setupHeaderMenu(); - bool handleDoubleClick(SqlQueryItem* item); + bool editInEditorIfNecessary(SqlQueryItem* item); SqlQueryItemDelegate* itemDelegate = nullptr; QMenu* contextMenu = nullptr; @@ -100,6 +97,7 @@ class GUI_API_EXPORT SqlQueryView : public QTableView, public ExtActionContainer void resetSorting(); void sortingUpdated(const QueryExecutor::SortList& sortOrder); void updateFont(); + void itemActivated(const QModelIndex& index); public slots: void executionStarted(); diff --git a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqltablemodel.cpp b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqltablemodel.cpp index d097d55..b0da325 100644 --- a/SQLiteStudio3/guiSQLiteStudio/datagrid/sqltablemodel.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/datagrid/sqltablemodel.cpp @@ -103,13 +103,15 @@ bool SqlTableModel::commitDeletedRow(const QList& itemsInRow) return false; } - if (itemsInRow[0]->isJustInsertedWithOutRowId()) - { - QString msg = tr("When inserted new row to the WITHOUT ROWID table, using DEFAULT value for PRIMARY KEY, " - "the table has to be reloaded in order to delete the new row."); - notifyError(tr("Error while deleting row from table %1: %2").arg(table).arg(msg)); - return false; - } + // This should not happen anymore (since WITHOUT ROWID tables should be handled properly now, + // but we will keep this here for a while, just in case. +// if (itemsInRow[0]->isJustInsertedWithOutRowId()) +// { +// QString msg = tr("When inserted new row to the WITHOUT ROWID table, using DEFAULT value for PRIMARY KEY, " +// "the table has to be reloaded in order to delete the new row."); +// notifyError(tr("Error while deleting row from table %1: %2").arg(table).arg(msg)); +// return false; +// } RowId rowId = itemsInRow[0]->getRowId(); if (rowId.isEmpty()) diff --git a/SQLiteStudio3/guiSQLiteStudio/dblistmodel.cpp b/SQLiteStudio3/guiSQLiteStudio/dblistmodel.cpp index baa0f76..af9da8f 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dblistmodel.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/dblistmodel.cpp @@ -55,6 +55,11 @@ Db* DbListModel::getDb(int index) return dbList[index]; } +int DbListModel::getIndexForDb(Db* db) +{ + return dbList.indexOf(db); +} + void DbListModel::setSortMode(DbListModel::SortMode sortMode) { this->sortMode = sortMode; diff --git a/SQLiteStudio3/guiSQLiteStudio/dblistmodel.h b/SQLiteStudio3/guiSQLiteStudio/dblistmodel.h index 121db4d..57928df 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dblistmodel.h +++ b/SQLiteStudio3/guiSQLiteStudio/dblistmodel.h @@ -26,6 +26,7 @@ class GUI_API_EXPORT DbListModel : public QAbstractListModel QModelIndex sibling(int row, int column, const QModelIndex & idx) const; Db* getDb(int index); + int getIndexForDb(Db* db); void setSortMode(SortMode sortMode); SortMode getSortMode() const; void setSortMode(const QString& sortMode); diff --git a/SQLiteStudio3/guiSQLiteStudio/dbobjectdialogs.h b/SQLiteStudio3/guiSQLiteStudio/dbobjectdialogs.h index bedbab8..f9a36ee 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dbobjectdialogs.h +++ b/SQLiteStudio3/guiSQLiteStudio/dbobjectdialogs.h @@ -14,6 +14,8 @@ class ViewWindow; class GUI_API_EXPORT DbObjectDialogs : public QObject { + Q_OBJECT + public: explicit DbObjectDialogs(Db* db); DbObjectDialogs(Db* db, QWidget* parentWidget); diff --git a/SQLiteStudio3/guiSQLiteStudio/dbtree/dbtree.cpp b/SQLiteStudio3/guiSQLiteStudio/dbtree/dbtree.cpp index 8e137a4..509594d 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dbtree/dbtree.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/dbtree/dbtree.cpp @@ -114,20 +114,21 @@ void DbTree::createActions() createAction(INTEGRITY_CHECK, ICONS.INTEGRITY_CHECK, tr("Integrity check"), this, SLOT(integrityCheck()), this); createAction(ADD_TABLE, ICONS.TABLE_ADD, tr("Create a table"), this, SLOT(addTable()), this); createAction(EDIT_TABLE, ICONS.TABLE_EDIT, tr("Edit the table"), this, SLOT(editTable()), this); - createAction(DEL_TABLE, ICONS.TABLE_DEL, tr("Drop the table"), this, SLOT(delTable()), this); + createAction(DEL_TABLE, ICONS.TABLE_DEL, tr("Delete the table"), this, SLOT(delTable()), this); createAction(EXPORT_TABLE, ICONS.TABLE_EXPORT, tr("Export the table"), this, SLOT(exportTable()), this); createAction(IMPORT_TABLE, ICONS.TABLE_IMPORT, tr("Import into the table"), this, SLOT(importTable()), this); createAction(POPULATE_TABLE, ICONS.TABLE_POPULATE, tr("Populate table"), this, SLOT(populateTable()), this); createAction(CREATE_SIMILAR_TABLE, ICONS.TABLE_CREATE_SIMILAR, tr("Create similar table"), this, SLOT(createSimilarTable()), this); + createAction(RESET_AUTOINCREMENT, ICONS.RESET_AUTOINCREMENT, tr("Reset autoincrement sequence"), this, SLOT(resetAutoincrement()), this); createAction(ADD_INDEX, ICONS.INDEX_ADD, tr("Create an index"), this, SLOT(addIndex()), this); createAction(EDIT_INDEX, ICONS.INDEX_EDIT, tr("Edit the index"), this, SLOT(editIndex()), this); - createAction(DEL_INDEX, ICONS.INDEX_DEL, tr("Drop the index"), this, SLOT(delIndex()), this); + createAction(DEL_INDEX, ICONS.INDEX_DEL, tr("Delete the index"), this, SLOT(delIndex()), this); createAction(ADD_TRIGGER, ICONS.TRIGGER_ADD, tr("Create a trigger"), this, SLOT(addTrigger()), this); createAction(EDIT_TRIGGER, ICONS.TRIGGER_EDIT, tr("Edit the trigger"), this, SLOT(editTrigger()), this); - createAction(DEL_TRIGGER, ICONS.TRIGGER_DEL, tr("Drop the trigger"), this, SLOT(delTrigger()), this); + createAction(DEL_TRIGGER, ICONS.TRIGGER_DEL, tr("Delete the trigger"), this, SLOT(delTrigger()), this); createAction(ADD_VIEW, ICONS.VIEW_ADD, tr("Create a view"), this, SLOT(addView()), this); createAction(EDIT_VIEW, ICONS.VIEW_EDIT, tr("Edit the view"), this, SLOT(editView()), this); - createAction(DEL_VIEW, ICONS.VIEW_DEL, tr("Drop the view"), this, SLOT(delView()), this); + createAction(DEL_VIEW, ICONS.VIEW_DEL, tr("Delete the view"), this, SLOT(delView()), this); createAction(ADD_COLUMN, ICONS.TABLE_COLUMN_ADD, tr("Add a column"), this, SLOT(addColumn()), this); createAction(EDIT_COLUMN, ICONS.TABLE_COLUMN_EDIT, tr("Edit the column"), this, SLOT(editColumn()), this); createAction(DEL_COLUMN, ICONS.TABLE_COLUMN_DELETE, tr("Delete the column"), this, SLOT(delColumn()), this); @@ -188,7 +189,7 @@ void DbTree::updateActionStates(const QStandardItem *item) break; case DbTreeItem::Type::TABLE: enabled << EDIT_TABLE << DEL_TABLE << EXPORT_TABLE << IMPORT_TABLE << POPULATE_TABLE << ADD_COLUMN << CREATE_SIMILAR_TABLE; - enabled << ADD_INDEX << ADD_TRIGGER; + enabled << RESET_AUTOINCREMENT << ADD_INDEX << ADD_TRIGGER; break; case DbTreeItem::Type::VIRTUAL_TABLE: // TODO change below when virtual tables can be edited @@ -304,12 +305,12 @@ void DbTree::setupActionsForMenu(DbTreeItem* currItem, QMenu* contextMenu) { QList actions; - ActionEntry dbEntry(ICONS.DATABASE, tr("Datatabase")); + ActionEntry dbEntry(ICONS.DATABASE, tr("Database")); dbEntry += ADD_DB; dbEntry += EDIT_DB; dbEntry += DELETE_DB; - ActionEntry dbEntryExt(ICONS.DATABASE, tr("Datatabase")); + ActionEntry dbEntryExt(ICONS.DATABASE, tr("Database")); dbEntryExt += CONNECT_TO_DB; dbEntryExt += DISCONNECT_FROM_DB; dbEntryExt += _separator; @@ -391,6 +392,7 @@ void DbTree::setupActionsForMenu(DbTreeItem* currItem, QMenu* contextMenu) actions += ActionEntry(EXPORT_TABLE); actions += ActionEntry(POPULATE_TABLE); actions += ActionEntry(CREATE_SIMILAR_TABLE); + actions += ActionEntry(RESET_AUTOINCREMENT); actions += ActionEntry(_separator); actions += dbEntryExt; break; @@ -875,6 +877,7 @@ void DbTree::refreshSchema(Db* db) return; treeModel->refreshSchema(db); + updateActionsForCurrent(); } void DbTree::copy() @@ -929,7 +932,7 @@ void DbTree::createGroup() while (existingItems.contains(name = QInputDialog::getText(this, tr("Create group"), tr("Group name"))) || (name.isEmpty() && !name.isNull())) { - QMessageBox::information(this, tr("Create directory"), tr("Entry with name %1 already exists in directory %2.") + QMessageBox::information(this, tr("Create group"), tr("Entry with name %1 already exists in group %2.") .arg(name).arg(currItem->text()), QMessageBox::Ok); } @@ -1370,6 +1373,32 @@ void DbTree::createSimilarTable() dialog.addTableSimilarTo(QString(), table); } +void DbTree::resetAutoincrement() +{ + Db* db = getSelectedDb(); + if (!db || !db->isValid()) + return; + + DbTreeItem* item = ui->treeView->currentItem(); + QString table = item->getTable(); + if (table.isNull()) + { + qWarning() << "Tried to reset autoincrement, while table wasn't selected in DbTree."; + return; + } + + QMessageBox::StandardButton btn = QMessageBox::question(this, tr("Reset autoincrement"), tr("Are you sure you want to reset autoincrement value for table '%1'?") + .arg(table)); + if (btn != QMessageBox::Yes) + return; + + SqlQueryPtr res = db->exec("DELETE FROM sqlite_sequence WHERE name = ?;", {table}); + if (res->isError()) + notifyError(tr("An error occurred while trying to reset autoincrement value for table '%1': %2").arg(table, res->getErrorText())); + else + notifyInfo(tr("Autoincrement value for table '%1' has been reset successfly.").arg(table)); +} + void DbTree::addColumn(DbTreeItem* item) { Db* db = getSelectedOpenDb(); @@ -1500,7 +1529,7 @@ void DbTree::deleteItems(const QList& itemsToDelete) if (deletedDatabases.contains(dbToRefresh)) continue; - DBTREE->refreshSchema(dbToRefresh); + refreshSchema(dbToRefresh); } } @@ -1508,6 +1537,8 @@ void DbTree::refreshSchemas() { foreach (Db* db, DBLIST->getDbList()) treeModel->refreshSchema(db); + + updateActionsForCurrent(); } void DbTree::interrupt() diff --git a/SQLiteStudio3/guiSQLiteStudio/dbtree/dbtree.h b/SQLiteStudio3/guiSQLiteStudio/dbtree/dbtree.h index b368c08..60b8dd5 100644 --- a/SQLiteStudio3/guiSQLiteStudio/dbtree/dbtree.h +++ b/SQLiteStudio3/guiSQLiteStudio/dbtree/dbtree.h @@ -83,6 +83,7 @@ class GUI_API_EXPORT DbTree : public QDockWidget, public ExtActionContainer REFRESH_SCHEMAS, REFRESH_SCHEMA, CREATE_SIMILAR_TABLE, + RESET_AUTOINCREMENT, _separator // Never use it directly, it's just for menu setup }; @@ -107,6 +108,8 @@ class GUI_API_EXPORT DbTree : public QDockWidget, public ExtActionContainer void setSelectedItem(DbTreeItem* item); bool isMimeDataValidForItem(const QMimeData* mimeData, const DbTreeItem* item); QToolBar* getToolBar(int toolbar) const; + Db* getSelectedDb(); + Db* getSelectedOpenDb(); static bool isItemDraggable(const DbTreeItem* item); @@ -116,8 +119,6 @@ class GUI_API_EXPORT DbTree : public QDockWidget, public ExtActionContainer private: void setActionEnabled(int action, bool enabled); - Db* getSelectedDb(); - Db* getSelectedOpenDb(); TableWindow* openTable(DbTreeItem* item); TableWindow* openTable(Db* db, const QString& database, const QString& table); TableWindow* newTable(DbTreeItem* item); @@ -147,6 +148,7 @@ class GUI_API_EXPORT DbTree : public QDockWidget, public ExtActionContainer void refreshSchema(Db* db); void refreshSchemas(); void interrupt(); + void updateActionsForCurrent(); private slots: void copy(); @@ -184,6 +186,7 @@ class GUI_API_EXPORT DbTree : public QDockWidget, public ExtActionContainer void vacuumDb(); void integrityCheck(); void createSimilarTable(); + void resetAutoincrement(); void addColumn(DbTreeItem* item); void editColumn(DbTreeItem* item); void delColumn(DbTreeItem* item); @@ -191,7 +194,6 @@ class GUI_API_EXPORT DbTree : public QDockWidget, public ExtActionContainer void deleteSelected(); void deleteItems(const QList& itemsToDelete); void refreshSchema(); - void updateActionsForCurrent(); void dbConnected(Db* db); void dbDisconnected(Db* db); void updateDbIcon(Db* db); 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. - ... + ... diff --git a/SQLiteStudio3/guiSQLiteStudio/formmanager.cpp b/SQLiteStudio3/guiSQLiteStudio/formmanager.cpp index 9df36d0..0ee7d43 100644 --- a/SQLiteStudio3/guiSQLiteStudio/formmanager.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/formmanager.cpp @@ -46,6 +46,11 @@ QStringList FormManager::getAvailableForms() const return widgetNameToFullPath.keys(); } +QStringList FormManager::getFormDirs() const +{ + return formDirs; +} + QWidget* FormManager::createWidgetByFullPath(const QString& path) { QWidget* widget = uiLoader->load(path); @@ -104,22 +109,21 @@ void FormManager::init() void FormManager::load() { - QStringList dirs; - dirs += qApp->applicationDirPath() + "/forms"; - dirs += ":/forms"; - dirs += QDir(CFG->getConfigDir()).absoluteFilePath("forms"); + formDirs += qApp->applicationDirPath() + "/forms"; + formDirs += ":/forms"; + formDirs += QDir(CFG->getConfigDir()).absoluteFilePath("forms"); QString envDirs = SQLITESTUDIO->getEnv("SQLITESTUDIO_FORMS"); if (!envDirs.isNull()) - dirs += envDirs.split(PATH_LIST_SEPARATOR); + formDirs += envDirs.split(PATH_LIST_SEPARATOR); - dirs += PLUGINS->getPluginDirs(); + formDirs += PLUGINS->getPluginDirs(); #ifdef FORMS_DIR - dirs += STRINGIFY(FORMS_DIR); + formDirs += STRINGIFY(FORMS_DIR); #endif - foreach (QString dirPath, dirs) + foreach (QString dirPath, formDirs) loadRecurently(dirPath, ""); } diff --git a/SQLiteStudio3/guiSQLiteStudio/formmanager.h b/SQLiteStudio3/guiSQLiteStudio/formmanager.h index 41f98ce..fbffd7e 100644 --- a/SQLiteStudio3/guiSQLiteStudio/formmanager.h +++ b/SQLiteStudio3/guiSQLiteStudio/formmanager.h @@ -19,6 +19,7 @@ class GUI_API_EXPORT FormManager : public QObject QWidget* createWidget(const QString& name); bool hasWidget(const QString& name); QStringList getAvailableForms() const; + QStringList getFormDirs() const; private: void init(); @@ -30,6 +31,7 @@ class GUI_API_EXPORT FormManager : public QObject UiLoader* uiLoader = nullptr; QHash widgetNameToFullPath; QStringList resourceForms; + QStringList formDirs; private slots: void rescanResources(Plugin* plugin, PluginType* pluginType); diff --git a/SQLiteStudio3/guiSQLiteStudio/forms/sqlformatterplugin.ui b/SQLiteStudio3/guiSQLiteStudio/forms/sqlformatterplugin.ui index 67f1bd6..87e13fd 100644 --- a/SQLiteStudio3/guiSQLiteStudio/forms/sqlformatterplugin.ui +++ b/SQLiteStudio3/guiSQLiteStudio/forms/sqlformatterplugin.ui @@ -11,7 +11,7 @@ - Form + Form diff --git a/SQLiteStudio3/guiSQLiteStudio/guiSQLiteStudio.pro b/SQLiteStudio3/guiSQLiteStudio/guiSQLiteStudio.pro index 2195415..93796ea 100644 --- a/SQLiteStudio3/guiSQLiteStudio/guiSQLiteStudio.pro +++ b/SQLiteStudio3/guiSQLiteStudio/guiSQLiteStudio.pro @@ -27,6 +27,8 @@ QMAKE_CXXFLAGS += -pedantic DEFINES += GUISQLITESTUDIO_LIBRARY +TRANSLATIONS += translations/guiSQLiteStudio_pl.ts + SOURCES +=\ mainwindow.cpp \ iconmanager.cpp \ @@ -164,7 +166,8 @@ SOURCES +=\ windows/bugreporthistorywindow.cpp \ dialogs/newversiondialog.cpp \ dialogs/quitconfirmdialog.cpp \ - common/datawidgetmapper.cpp + common/datawidgetmapper.cpp \ + dialogs/languagedialog.cpp HEADERS += mainwindow.h \ iconmanager.h \ @@ -307,7 +310,8 @@ HEADERS += mainwindow.h \ dialogs/newversiondialog.h \ guiSQLiteStudio_global.h \ dialogs/quitconfirmdialog.h \ - common/datawidgetmapper.h + common/datawidgetmapper.h \ + dialogs/languagedialog.h FORMS += mainwindow.ui \ dbtree/dbtree.ui \ @@ -354,10 +358,12 @@ FORMS += mainwindow.ui \ dialogs/bugreportlogindialog.ui \ windows/bugreporthistorywindow.ui \ dialogs/newversiondialog.ui \ - dialogs/quitconfirmdialog.ui + dialogs/quitconfirmdialog.ui \ + dialogs/languagedialog.ui RESOURCES += \ - icons.qrc + icons.qrc \ + guiSQLiteStudio.qrc OTHER_FILES += diff --git a/SQLiteStudio3/guiSQLiteStudio/guiSQLiteStudio.qrc b/SQLiteStudio3/guiSQLiteStudio/guiSQLiteStudio.qrc new file mode 100644 index 0000000..31e0f16 --- /dev/null +++ b/SQLiteStudio3/guiSQLiteStudio/guiSQLiteStudio.qrc @@ -0,0 +1,5 @@ + + + translations/guiSQLiteStudio_pl.qm + + diff --git a/SQLiteStudio3/guiSQLiteStudio/iconmanager.cpp b/SQLiteStudio3/guiSQLiteStudio/iconmanager.cpp index efe22a1..63dde26 100644 --- a/SQLiteStudio3/guiSQLiteStudio/iconmanager.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/iconmanager.cpp @@ -62,6 +62,11 @@ void IconManager::init() connect(PLUGINS, SIGNAL(pluginsInitiallyLoaded()), this, SLOT(pluginsInitiallyLoaded())); } +QStringList IconManager::getIconDirs() const +{ + return iconDirs; +} + void IconManager::rescanResources(const QString& pluginName) { if (!pluginName.isNull() && PLUGINS->isBuiltIn(pluginName)) diff --git a/SQLiteStudio3/guiSQLiteStudio/iconmanager.h b/SQLiteStudio3/guiSQLiteStudio/iconmanager.h index 8cb7dbe..8a30d99 100644 --- a/SQLiteStudio3/guiSQLiteStudio/iconmanager.h +++ b/SQLiteStudio3/guiSQLiteStudio/iconmanager.h @@ -153,6 +153,7 @@ class GUI_API_EXPORT IconManager : public QObject DEF_ICON(RELOAD, "reload") DEF_ICON(RENAME_FN_ARG, "rename_fn_arg") DEF_ICO3(RENAME_DATATYPE, RENAME_FN_ARG) + DEF_ICON(RESET_AUTOINCREMENT, "reset_autoincrement") DEF_ICON(RESULTS_BELOW, "results_below") DEF_ICON(RESULTS_IN_TAB, "results_in_tab") DEF_ICON(ROLLBACK, "rollback") @@ -244,6 +245,7 @@ class GUI_API_EXPORT IconManager : public QObject QMovie* getMovie(const QString& name); QIcon* getIcon(const QString& name); void init(); + QStringList getIconDirs() const; private: IconManager(); diff --git a/SQLiteStudio3/guiSQLiteStudio/icons.qrc b/SQLiteStudio3/guiSQLiteStudio/icons.qrc index f923fe9..d89afa9 100644 --- a/SQLiteStudio3/guiSQLiteStudio/icons.qrc +++ b/SQLiteStudio3/guiSQLiteStudio/icons.qrc @@ -190,5 +190,6 @@ img/abort24.png img/close.png img/go_back.png + img/reset_autoincrement.png diff --git a/SQLiteStudio3/guiSQLiteStudio/img/reset_autoincrement.png b/SQLiteStudio3/guiSQLiteStudio/img/reset_autoincrement.png new file mode 100644 index 0000000..d39f06d Binary files /dev/null and b/SQLiteStudio3/guiSQLiteStudio/img/reset_autoincrement.png differ diff --git a/SQLiteStudio3/guiSQLiteStudio/mainwindow.cpp b/SQLiteStudio3/guiSQLiteStudio/mainwindow.cpp index 7dbde8c..bc492df 100644 --- a/SQLiteStudio3/guiSQLiteStudio/mainwindow.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/mainwindow.cpp @@ -147,6 +147,8 @@ void MainWindow::init() widgetCover->getContainerLayout()->addWidget(updatingSubBar, 2, 0); connect(UPDATES, SIGNAL(updatingProgress(QString,int,int)), this, SLOT(handleUpdatingProgress(QString,int,int))); connect(UPDATES, SIGNAL(updatingError(QString)), this, SLOT(handleUpdatingError())); + + connect(CFG_CORE.General.Language, SIGNAL(changed(QVariant)), this, SLOT(notifyAboutLanguageChange())); } void MainWindow::cleanUp() @@ -195,6 +197,11 @@ void MainWindow::updateWindowActions() actionMap[RESTORE_WINDOW]->setEnabled(hasClosedWindowToRestore()); } +void MainWindow::notifyAboutLanguageChange() +{ + notifyInfo(tr("You need to restart application to make the language change take effect.")); +} + MdiArea *MainWindow::getMdiArea() const { return dynamic_cast(ui->mdiArea); diff --git a/SQLiteStudio3/guiSQLiteStudio/mainwindow.h b/SQLiteStudio3/guiSQLiteStudio/mainwindow.h index df12621..4e9f5c0 100644 --- a/SQLiteStudio3/guiSQLiteStudio/mainwindow.h +++ b/SQLiteStudio3/guiSQLiteStudio/mainwindow.h @@ -170,6 +170,7 @@ class GUI_API_EXPORT MainWindow : public QMainWindow, public ExtActionContainer void updateWindowActions(); private slots: + void notifyAboutLanguageChange(); void cleanUp(); void openSqlEditorSlot(); void refreshMdiWindows(); diff --git a/SQLiteStudio3/guiSQLiteStudio/mainwindow.ui b/SQLiteStudio3/guiSQLiteStudio/mainwindow.ui index 0ae72c8..1dbf462 100644 --- a/SQLiteStudio3/guiSQLiteStudio/mainwindow.ui +++ b/SQLiteStudio3/guiSQLiteStudio/mainwindow.ui @@ -11,7 +11,7 @@ - SQLiteStudio (?.?.?) + SQLiteStudio (?.?.?) @@ -57,7 +57,7 @@ 0 0 964 - 22 + 19 @@ -95,6 +95,9 @@ + + true + Qt::CustomContextMenu diff --git a/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditordate.h b/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditordate.h index b6f6d7c..d51150b 100644 --- a/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditordate.h +++ b/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditordate.h @@ -5,6 +5,8 @@ class GUI_API_EXPORT MultiEditorDate : public MultiEditorDateTime { + Q_OBJECT + public: explicit MultiEditorDate(QWidget *parent = 0); diff --git a/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditornumeric.cpp b/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditornumeric.cpp index 198f71b..526f5c4 100644 --- a/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditornumeric.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditornumeric.cpp @@ -2,6 +2,7 @@ #include "common/numericspinbox.h" #include #include +#include MultiEditorNumeric::MultiEditorNumeric(QWidget* parent) : MultiEditorWidget(parent) @@ -32,7 +33,7 @@ void MultiEditorNumeric::setReadOnly(bool value) QString MultiEditorNumeric::getTabLabel() { - return tr("Number"); + return tr("Number", "numeric multi editor tab name"); } void MultiEditorNumeric::focusThisWidget() diff --git a/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditornumeric.h b/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditornumeric.h index 65d0409..c74d27a 100644 --- a/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditornumeric.h +++ b/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditornumeric.h @@ -9,6 +9,8 @@ class NumericSpinBox; class GUI_API_EXPORT MultiEditorNumeric : public MultiEditorWidget { + Q_OBJECT + public: explicit MultiEditorNumeric(QWidget *parent = 0); diff --git a/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditortime.h b/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditortime.h index 56bf60e..1fb05f3 100644 --- a/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditortime.h +++ b/SQLiteStudio3/guiSQLiteStudio/multieditor/multieditortime.h @@ -6,6 +6,8 @@ class GUI_API_EXPORT MultiEditorTime : public MultiEditorDateTime { + Q_OBJECT + public: explicit MultiEditorTime(QWidget *parent = 0); diff --git a/SQLiteStudio3/guiSQLiteStudio/sqlcompareview.cpp b/SQLiteStudio3/guiSQLiteStudio/sqlcompareview.cpp index 0b5b91d..057ed1f 100644 --- a/SQLiteStudio3/guiSQLiteStudio/sqlcompareview.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/sqlcompareview.cpp @@ -107,7 +107,6 @@ void SqlCompareView::setupHighlighting(const QString& left, const QString& right { QList diffs = diff->diff_main(left, right); int leftPos = 0; - int rightPos = 0; int lgt = 0; for (const Diff& d : diffs) { @@ -120,11 +119,9 @@ void SqlCompareView::setupHighlighting(const QString& left, const QString& right break; case EQUAL: leftPos += lgt; - rightPos += lgt; break; case INSERT: rightView->setTextBackgroundColor(leftPos, leftPos + lgt - 1, Qt::green); - rightPos += lgt; break; } } diff --git a/SQLiteStudio3/guiSQLiteStudio/sqleditor.cpp b/SQLiteStudio3/guiSQLiteStudio/sqleditor.cpp index 52e1676..edafce5 100644 --- a/SQLiteStudio3/guiSQLiteStudio/sqleditor.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/sqleditor.cpp @@ -28,6 +28,7 @@ #include #include #include +#include CFG_KEYS_DEFINE(SqlEditor) @@ -184,6 +185,7 @@ Db* SqlEditor::getDb() const void SqlEditor::setDb(Db* value) { db = value; + refreshValidObjects(); scheduleQueryParser(true); } @@ -194,34 +196,41 @@ void SqlEditor::setAutoCompletion(bool enabled) void SqlEditor::customContextMenuRequested(const QPoint &pos) { - if (objectLinksEnabled) - { - const DbObject* obj = getValidObjectForPosition(pos); - QString objName = toPlainText().mid(obj->from, (obj->to - obj->from + 1)); + if (objectLinksEnabled && handleValidObjectContextMenu(pos)) + return; - validObjContextMenu->clear(); + contextMenu->popup(mapToGlobal(pos)); +} - DbTreeItem* item = nullptr; - for (DbTreeItem::Type type : {DbTreeItem::Type::TABLE, DbTreeItem::Type::INDEX, DbTreeItem::Type::TRIGGER, DbTreeItem::Type::VIEW}) - { - item = DBTREE->getModel()->findItem(type, objName); - if (item) - break; - } +bool SqlEditor::handleValidObjectContextMenu(const QPoint& pos) +{ + const DbObject* obj = getValidObjectForPosition(pos); + if (!obj) + return false; - if (item) - { - DBTREE->setSelectedItem(item); - DBTREE->setupActionsForMenu(item, validObjContextMenu); - if (validObjContextMenu->actions().size() == 0) - return; + QString objName = toPlainText().mid(obj->from, (obj->to - obj->from + 1)); - DBTREE->updateActionStates(item); - validObjContextMenu->popup(mapToGlobal(pos)); - } - return; + validObjContextMenu->clear(); + + DbTreeItem* item = nullptr; + for (DbTreeItem::Type type : {DbTreeItem::Type::TABLE, DbTreeItem::Type::INDEX, DbTreeItem::Type::TRIGGER, DbTreeItem::Type::VIEW}) + { + item = DBTREE->getModel()->findItem(type, objName); + if (item) + break; } - contextMenu->popup(mapToGlobal(pos)); + + if (!item) + return false; + + DBTREE->setSelectedItem(item); + DBTREE->setupActionsForMenu(item, validObjContextMenu); + if (validObjContextMenu->actions().size() == 0) + return false; + + DBTREE->updateActionStates(item); + validObjContextMenu->popup(mapToGlobal(pos)); + return true; } void SqlEditor::updateUndoAction(bool enabled) @@ -487,17 +496,21 @@ void SqlEditor::refreshValidObjects() if (!db || !db->isValid()) return; - objectsInNamedDb.clear(); - - SchemaResolver resolver(db); - QSet databases = resolver.getDatabases(); - databases << "main"; - QStringList objects; - foreach (const QString& dbName, databases) + QtConcurrent::run([this]() { - objects = resolver.getAllObjects(); - objectsInNamedDb[dbName] << objects; - } + QMutexLocker lock(&objectsInNamedDbMutex); + objectsInNamedDb.clear(); + + SchemaResolver resolver(db); + QSet databases = resolver.getDatabases(); + databases << "main"; + QStringList objects; + foreach (const QString& dbName, databases) + { + objects = resolver.getAllObjects(); + objectsInNamedDb[dbName] << objects; + } + }); } Dialect SqlEditor::getDialect() @@ -707,10 +720,7 @@ void SqlEditor::indentNewLine() void SqlEditor::showSearchDialog() { if (!searchDialog) - { searchDialog = new SearchTextDialog(textLocator, this); - searchDialog->setWindowTitle(tr("Find or replace", "sql editor find/replace dialog")); - } if (searchDialog->isVisible()) searchDialog->hide(); @@ -855,6 +865,7 @@ void SqlEditor::checkForValidObjects() if (!db || !db->isValid()) return; + QMutexLocker lock(&objectsInNamedDbMutex); Dialect dialect = db->getDialect(); QList fullObjects; QString dbName; @@ -1022,7 +1033,7 @@ void SqlEditor::saveToFile() QFile file(fName); if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { - notifyError(tr("Could not open file '%1'' for writing: %2").arg(fName).arg(file.errorString())); + notifyError(tr("Could not open file '%1' for writing: %2").arg(fName).arg(file.errorString())); return; } @@ -1046,7 +1057,7 @@ void SqlEditor::loadFromFile() QFile file(fName); if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { - notifyError(tr("Could not open file '%1'' for reading: %2").arg(fName).arg(file.errorString())); + notifyError(tr("Could not open file '%1' for reading: %2").arg(fName).arg(file.errorString())); return; } @@ -1393,6 +1404,7 @@ void SqlEditor::handleValidObjectCursor(const QPoint& point) } viewport()->setCursor(isValid ? Qt::PointingHandCursor : Qt::IBeamCursor); } + bool SqlEditor::getVirtualSqlCompleteSemicolon() const { return virtualSqlCompleteSemicolon; diff --git a/SQLiteStudio3/guiSQLiteStudio/sqleditor.h b/SQLiteStudio3/guiSQLiteStudio/sqleditor.h index d525e20..43be251 100644 --- a/SQLiteStudio3/guiSQLiteStudio/sqleditor.h +++ b/SQLiteStudio3/guiSQLiteStudio/sqleditor.h @@ -9,6 +9,7 @@ #include #include #include +#include class CompleterWindow; class QTimer; @@ -185,6 +186,7 @@ class GUI_API_EXPORT SqlEditor : public QPlainTextEdit, public ExtActionContaine const DbObject* getValidObjectForPosition(int position, bool movedLeft); const DbObject* getValidObjectForPosition(const QPoint& point); void handleValidObjectCursor(const QPoint& point); + bool handleValidObjectContextMenu(const QPoint& pos); SqliteSyntaxHighlighter* highlighter = nullptr; QMenu* contextMenu = nullptr; @@ -197,6 +199,7 @@ class GUI_API_EXPORT SqlEditor : public QPlainTextEdit, public ExtActionContaine QTimer* queryParserTimer = nullptr; Parser* queryParser = nullptr; QHash objectsInNamedDb; + QMutex objectsInNamedDbMutex; bool objectLinksEnabled = false; QList validDbObjects; QWidget* lineNumberArea = nullptr; diff --git a/SQLiteStudio3/guiSQLiteStudio/taskbar.cpp b/SQLiteStudio3/guiSQLiteStudio/taskbar.cpp index ba797f6..359dc29 100644 --- a/SQLiteStudio3/guiSQLiteStudio/taskbar.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/taskbar.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include TaskBar::TaskBar(const QString& title, QWidget *parent) : @@ -179,6 +178,7 @@ bool TaskBar::handleMouseMoveEvent(QMouseEvent* event) drag->setMimeData(generateMimeData()); dragStartIndex = tasks.indexOf(dragStartTask); + drag->start(Qt::MoveAction); return true; } diff --git a/SQLiteStudio3/guiSQLiteStudio/taskbar.h b/SQLiteStudio3/guiSQLiteStudio/taskbar.h index 2cf6d56..652b3f6 100644 --- a/SQLiteStudio3/guiSQLiteStudio/taskbar.h +++ b/SQLiteStudio3/guiSQLiteStudio/taskbar.h @@ -39,7 +39,6 @@ class GUI_API_EXPORT TaskBar : public QToolBar QAction* getNextClosestAction(const QPoint& position); void dragTaskTo(QAction* task, const QPoint& position); void dragTaskTo(QAction* task, int positionIndex); - QAction* getDragTask(const QMimeData* data); QMimeData* generateMimeData(); int getActiveTaskIdx(); diff --git a/SQLiteStudio3/guiSQLiteStudio/translations/guiSQLiteStudio_pl.qm b/SQLiteStudio3/guiSQLiteStudio/translations/guiSQLiteStudio_pl.qm new file mode 100644 index 0000000..61124ad Binary files /dev/null and b/SQLiteStudio3/guiSQLiteStudio/translations/guiSQLiteStudio_pl.qm differ diff --git a/SQLiteStudio3/guiSQLiteStudio/translations/guiSQLiteStudio_pl.ts b/SQLiteStudio3/guiSQLiteStudio/translations/guiSQLiteStudio_pl.ts new file mode 100644 index 0000000..ca582d3 --- /dev/null +++ b/SQLiteStudio3/guiSQLiteStudio/translations/guiSQLiteStudio_pl.ts @@ -0,0 +1,5980 @@ + + + + + AboutDialog + + + About SQLiteStudio and licenses + O SQLiteStudio i licencje + + + + About + O programie + + + + <html><head/><body><p align="center"><span style=" font-size:11pt; font-weight:600;">SQLiteStudio v%1</span></p><p align="center">Free, open-source, cross-platform SQLite database manager.<br/><a href="http://sqlitestudio.pl"><span style=" text-decoration: underline; color:#0000ff;">http://sqlitestudio.pl</span></a><br/></p><p align="center">%2<br/></p><p align="center">Author and active maintainer:<br/>SalSoft (<a href="http://salsoft.com.pl"><span style=" text-decoration: underline; color:#0000ff;">http://salsoft.com.pl</span></a>)<br/></p></body></html> + <html><head/><body><p align="center"><span style=" font-size:11pt; font-weight:600;">SQLiteStudio v%1</span></p><p align="center">Darmowy, otwartoźródłowy, wieloplatformowy menadżer baz danych SQLite.<br/><a href="http://sqlitestudio.pl"><span style=" text-decoration: underline; color:#0000ff;">http://sqlitestudio.pl</span></a><br/></p><p align="center">%2<br/></p><p align="center">Autor i aktywny opiekun:<br/>SalSoft (<a href="http://salsoft.com.pl"><span style=" text-decoration: underline; color:#0000ff;">http://salsoft.com.pl</span></a>)<br/></p></body></html> + + + + Licenses + Licencje + + + + Environment + Środowisko + + + + Icon directories + Katalogi ikon + + + + Form directories + Katalogi formularzy + + + + Plugin directories + Katalogi wtyczek + + + + Application directory + Katalog aplikacji + + + + Configuration directory + Katalog konfiguracji + + + + Qt version: + Wersja Qt: + + + + Portable distribution. + Dystrybucja przenośna. + + + + MacOS X application boundle distribution. + Dytrybucja aplikacji MacOS X. + + + + Operating system managed distribution. + Dystrybucja zarządzana przez system operacyjny. + + + + Copy + Kopiuj + + + + <h3>Table of contents:</h3><ol>%2</ol> + <h3>Zawartość:</h3><ol>%2</ol> + + + + BugDialog + + + Bugs and ideas + Błędy i pomysły + + + + Reporter + Zgłaszający + + + + E-mail address + Adres e-mail + + + + + Log in + Zaloguj + + + + Short description + Krótki opis + + + + Detailed description + Opis szczegółowy + + + + Show more details + Pokaż więcej szczegółów + + + + SQLiteStudio version + Wersja SQLiteStudio + + + + Operating system + System operacyjny + + + + Loaded plugins + Załadowane wtyczki + + + + Send + Wyślij + + + + You can see all your reported bugs and ideas by selecting menu '%1' and then '%2'. + Możesz zobaczyć wszystkie błędy i pomysły zgłoszone przez ciebie wybierając menu '%1' i dalej '%2'. + + + + A bug report sent successfully. + Błąd został zgłoszony pomyślnie. + + + + An error occurred while sending a bug report: %1 +%2 + Wystąpił błąd podczas zgłaszania błędu: %1 +%2 + + + + + You can retry sending. The contents will be restored when you open a report dialog after an error like this. + Możesz spróbować powtórzyć wysyłkę. Zawartość będzie przywrócona, kiedy otworzysz okno zgłaszania po błędzie takim jak ten. + + + + An idea proposal sent successfully. + Pomysł został zgłoszony pomyślnie. + + + + An error occurred while sending an idea proposal: %1 +%2 + Wystąpił błąd podczas zgłaszania pomysłu: %1 +%2 + + + + A bug report + Zgłoś błąd + + + + Describe problem in few words + Opisz problem w kilku słowach + + + + Describe problem and how to reproduce it + Opisz problem, oraz jak go powtórzyć + + + + A new feature idea + Zgłoś pomysł + + + + A title for your idea + Tytuł twojego pomysłu + + + + Describe your idea in more details + Opisz twój pomysł szerzej + + + + Reporting as an unregistered user, using e-mail address. + Zgłaszanie jako niezarejestrowany użytkownik, używając adresu e-mail. + + + + Reporting as a registered user. + Zgłaszanie jako zarejestrowany użytkownik. + + + + Log out + Wyloguj + + + + Providing true email address will make it possible to contact you regarding your report. To learn more, press 'help' button on the right side. + Podanie prawdziwego adresu e-mail pozwoli na skontaktowanie się z tobą w związku z twoim zgłoszeniem. Aby dowiedzieć się więcej, kliknij przycisk 'pomoc' po prawej stronie. + + + + Enter vaild e-mail address, or log in. + Wpisz poprawny adres e-mail, lub zaloguj się. + + + + Short description requires at least 10 characters, but not more than 100. Longer description can be entered in the field below. + Krótki opis wymaga przynajmniej 10 znaków, ale nie więcej niż 100. Dłuższy opis może być wpisany w polu poniżej. + + + + Long description requires at least 30 characters. + Długi opis wymaga przynajmniej 30 znaków. + + + + BugReportHistoryWindow + + + + Title + Tytuł + + + + + Reported at + Zgłoszony dnia + + + + + URL + URL + + + + Reports history + Historia zgłoszeń + + + + Clear reports history + Wyczyść historię zgłoszeń + + + + Delete selected entry + Usuń wybraną pozycję + + + + Invalid response from server. + Niepoprawna odpowiedź z serwera. + + + + BugReportLoginDialog + + + Log in + Zaloguj + + + + Credentials + Dane do logowania + + + + Login: + Login: + + + + Password: + Hasło: + + + + Validation + Walidacja + + + + Validate + Sprawdź + + + + Validation result message + Treść wyniku walidacji + + + + Abort + Przerwij + + + + A login must be at least 2 characters long. + Login musi mieć przynajmniej 2 znaki. + + + + A password must be at least 5 characters long. + Hasło musi mieć przynajmniej 5 znaków. + + + + Valid + Poprawne + + + + CollationsEditor + + + Filter collations + Filtruj zestawienia + + + + Collation name: + Nazwa zestawienia: + + + + Implementation language: + Język implementacji: + + + + Databases + Bazy danych + + + + Register in all databases + Zarejestruj we wszystkich bazach danych + + + + Register in following databases: + Zarejestruj w następujących bazach danych: + + + + Implementation code: + Kod implementacji: + + + + Collations editor + Edytor zestawień + + + + Commit all collation changes + Zatwierdź wszystkie zmiany w zestawieniach + + + + Rollback all collation changes + Wycofaj wszystkie zmiany w zestawieniach + + + + Create new collation + Utwórz nowe zestawienie + + + + Delete selected collation + Usuń wybrane zestawienie + + + + Editing collations manual + Podręcznik edycji zestawień + + + + Enter a non-empty, unique name of the collation. + Podaj niepustą, unikalną nazwę zestawienia. + + + + Pick the implementation language. + Wybierz język implementacji. + + + + Enter a non-empty implementation code. + Wprowadź niepusty kod implementacji. + + + + Collations editor window has uncommited modifications. + Okno edytora zestawień ma niezatwierdzone zmiany. + + + + ColorButton + + + Pick a color + Wybierz kolor + + + + ColumnCollatePanel + + + Collation name: + Nazwa zestawienia: + + + + Named constraint: + Ograniczenie nazwane: + + + + Enter a name of the constraint. + Wprowadź nazwę ograniczenia. + + + + Enter a collation name. + Wprowadź nazwę zestawienia. + + + + ColumnDefaultPanel + + + Default value: + Domyślna wartość: + + + + Named constraint: + Ograniczenie nazwane: + + + + Enter a default value expression. + Wprowadź wyrażenie wartości domyślnej. + + + + Invalid default value expression: %1 + Niepoprawna wartość wyrażenia domyślnego: %1 + + + + Enter a name of the constraint. + Wprowadź nazwę ograniczenia. + + + + ColumnDialog + + + Column + Kolumna + + + + Name and type + Nazwa i typ + + + + Data type: + Typ danych: + + + + Column name: + Nazwa kolumny: + + + + Size: + Rozmiar: + + + + Constraints + Ograniczenia + + + + Unique + Wartości unikalne + + + + + + + + + + Configure + Konfiguruj + + + + Foreign Key + Klucz obcy + + + + Collate + Zestawienie + + + + Not NULL + Niepuste + + + + Check condition + Sprawdzaj warunek + + + + Primary Key + Klucz główny + + + + Default + Wartość domyślna + + + + Advanced mode + Tryb zaawandowany + + + + Add constraint + column dialog + Dodaj ograniczenie + + + + Edit constraint + column dialog + Edytuj ograniczenie + + + + + Delete constraint + column dialog + Usuń ograniczenie + + + + Move constraint up + column dialog + Przenieś ograniczenie w górę + + + + Move constraint down + column dialog + Przenieś ograniczenie w dół + + + + Add a primary key + column dialog + Dodaj klucz główny + + + + Add a foreign key + column dialog + Dodaj klucz obcy + + + + Add an unique constraint + column dialog + Dodaj ograniczenie wartości unikalnych + + + + Add a check constraint + column dialog + Dodaj ograniczenie sprawdzania wartości + + + + Add a not null constraint + column dialog + Dodaj ograniczenie niepustych wartości + + + + Add a collate constraint + column dialog + Dodaj ograniczenie zestawienia + + + + Add a default constraint + column dialog + Dodaj ograniczenie wartości domyślnej + + + + Are you sure you want to delete constraint '%1'? + column dialog + Czy na pewno chcesz usunąć ograniczenie '%1'? + + + + Correct the constraint's configuration. + Popraw konfigurację ograniczenia. + + + + This constraint is not officially supported by SQLite 2, +but it's okay to use it. + To ograniczenie nie jest oficjalnie wspireane przez SQLite 2, +ale można go używać. + + + + ColumnDialogConstraintsModel + + + Type + column dialog constraints + Typ + + + + Name + column dialog constraints + Nazwa + + + + Details + column dialog constraints + Szczegóły + + + + ColumnForeignKeyPanel + + + Foreign table: + Tabela obca: + + + + Foreign column: + Kolumn obca: + + + + Reactions + Reakcje + + + + Deferred foreign key + Klucz obcy odroczony + + + + Named constraint + Nazwane ograniczenie + + + + Constraint name + Nazwa ograniczenia + + + + Pick the foreign table. + Wybierz tabelę obcą + + + + Pick the foreign column. + Wybierz kolumnę obcą + + + + Enter a name of the constraint. + Wprowadź nazwę ograniczenia. + + + + ColumnPrimaryKeyPanel + + + Autoincrement + Autoinkrementacja + + + + Sort order: + Kierunek sortowania: + + + + Named constraint: + Ograniczenie nazwane: + + + + On conflict: + W razie konfliktu: + + + + Enter a name of the constraint. + Wprowadź nazwę ograniczenia. + + + + Autoincrement (only for %1 type columns) + column primary key + Autoinkrementacja (tylko dla kolumn o typie %1) + + + + ColumnUniqueAndNotNullPanel + + + Named constraint: + Ograniczenie nazwane: + + + + On conflict: + W razie konfliktu: + + + + Enter a name of the constraint. + Wprowadź nazwę ograniczenia. + + + + CompleterWindow + + + Column: %1 + completer statusbar + Kolumna: %1 + + + + Table: %1 + completer statusbar + Tabela: %1 + + + + Index: %1 + completer statusbar + Indeks: %1 + + + + Trigger: %1 + completer statusbar + Wyzwalacz: %1 + + + + View: %1 + completer statusbar + Widok: %1 + + + + Database: %1 + completer statusbar + Baza danych: %1 + + + + Keyword: %1 + completer statusbar + Słowo kluczowe: %1 + + + + Function: %1 + completer statusbar + Funkcja: %1 + + + + Operator: %1 + completer statusbar + Operator: %1 + + + + String + completer statusbar + Tekst + + + + Number + completer statusbar + Liczba + + + + Binary data + completer statusbar + Dane binarne + + + + Collation: %1 + completer statusbar + Zestawienie: %1 + + + + Pragma function: %1 + completer statusbar + Funkcja pragma: %1 + + + + ConfigDialog + + + + Configuration + Konfiguracja + + + + Search + Szukaj + + + + General + Ogólne + + + + Keyboard shortcuts + Skróty klawiszowe + + + + Look & feel + Wygląd i zachowanie + + + + Style + Style + + + + Fonts + Czcionki + + + + Colors + Kolory + + + + Plugins + Wtyczki + + + + Code formatters + Formatery kodu + + + + Data browsing + Przeglądanie danych + + + + Data editors + Edytory danych + + + + Data browsing and editing + Przeglądanie i edycja danych + + + + Number of data rows per page: + Liczba wierszy danych na stronie: + + + + + <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> + <p>Kiedy dane są wczytane do widoku siatki, szerokość kolumn jest automatycznie dostosowywana. Ta wartość ogranicza początkową szerokość tego dostosowywania, ale użytkownik nadal może rozszerzać kolumnę ręcznie poza ten limit.</p> + + + + Limit initial data column width to (in pixels): + Ogranicz początkową szerokość kolumn danych (w pikselach): + + + + Data types + Type danych + + + + Available editors: + Dostępne edytory: + + + + Editors selected for this data type: + Edytory wybrane dla tego typu danych: + + + + Schema editing + Edycja schematu + + + + Number of DDL changes kept in history. + Liczba zmian DDL trzymanych w historii. + + + + DDL history size: + Rozmiar historii DDL: + + + + Don't show DDL preview dialog when commiting schema changes + Nie pokazuj okna podglądu DDL podczas zatwierdzania zmian schematu + + + + SQL queries + Zapytania SQL + + + + + Number of queries kept in the history. + Liczba zapytań trzymana w historii. + + + + History size: + Rozmiar historii: + + + + <p>If there is more than one query in the SQL editor window, then (if this option is enabled) only a single query will be executed - the one under the keyboard insertion cursor. Otherwise all queries will be executed. You can always limit queries to be executed by selecting those queries before calling to execute.</p> + <p>Jeśli w oknie edytora SQL jest więcej niż jedno zapytanie, to (jeśli ta opcja jest włączona) tylko jedno zapytanie będzie wykonana - to, które znajduje się pod kursorem pisania. W przeciwnym wypadku wszystkie zapytania będą wykonywane. Zawsze możesz ograniczyć zapytania do wywołania przez zaznaczenie tych zapytań, które chcesz wywołać.</p> + + + + Execute only the query under the cursor + Wykonuj tylko zapytania będące pod kursorem + + + + Updates + Aktualizacje + + + + Automatically check for updates at startup + Sprawdzaj aktualizacje automatycznie przy starcie + + + + Session + Sesje + + + + Restore last session (active MDI windows) after startup + Przywróć ostatnią sesję (aktywne okna MDI) po starcie + + + + Filter shortcuts by name or key combination + Filtruj skróty po nazwie, lub kombinacji klawiszy + + + + Action + Akcja + + + + Key combination + Kombinacja klawiszy + + + + Changing language requires application restart to take effect. + Zmiana języka wymaga restartu aplikacji, aby zadziałać. + + + + Database list + Lista baz + + + + If switched off, then columns will be sorted in the order they are typed in CREATE TABLE statement. + Gdy wyłączone, to kolumny będą ułożone w takiej kolejności, w jakiej wystąpiły w zapytaniu CREATE TABLE. + + + + Sort table columns alphabetically + Sortuj kolumny tabel alfabetycznie. + + + + Expand tables node when connected to a database + Rozwiń listę tabel po połączeniu z bazą danych + + + + <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> + <p>Dodatkowe etykiety, to te wyświetlane obok nazw na liście baz danych (są niebieskie, chyba że skonfigurowano je inaczej). Włączenie tej opcji spowoduje wyświetlenie etykiet dla baz danych, niepoprawnych baz danych, oraz dla węzłów agregujących (grupa kolumn, grupa indeksów, grupa wyzwalaczy). Więcej etykiet jest dostępne niżej.</p> + + + + Display additional labels on the list + Wyświetlaj dodatkowe etykiety na liście + + + + For regular tables labels will show number of columns, indexes and triggers for each of tables. + Dla zwykłych tabel etykiety będą pokazywać liczbę kolumn, inseksów, oraz wyzwalaczy dla tych tabel. + + + + Display labels for regular tables + Wyświetlaj etykiety dla zwykłych tabel + + + + Virtual tables will be marked with a 'virtual' label. + Tabele wirtualne będą oznaczone etykietą 'wirtualna'. + + + + Display labels for virtual tables + Wyświetlaj etykiety dla tabel wirtualnych + + + + Expand views node when connected to a database + Rozwiń listę widoków po połączeniu z bazą. + + + + 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) + Gdy ta opcja jest wyłączona, to wszystkie obiekty będą ułożone w takiej kolejności, w jakiej występują w tabeli sqlite_master (czyli w takiej, w jakiej zostały stworzone) + + + + Sort objects (tables, indexes, triggers and views) alphabetically + Sortuj obiekty (tabele, indeksy, wyzwalacze i widoki) alfabetycznie + + + + Display system tables and indexes on the list + Wyświetlaj tabele i indeksy systemowe na liście + + + + Table windows + Okna tabel + + + + When enabled, Table Windows will show up with the data tab, instead of the structure tab. + Gdy włączone, Okna Tabel będą się pokazywać z zakładką danych, zamiast z zakładką struktury. + + + + Open Table Windows with the data tab for start + Otwieraj Okna Tabeli z zakładką danych na początek + + + + View windows + Okna Widoków + + + + When enabled, View Windows will show up with the data tab, instead of the structure tab. + Gdy włączone, Okna Widoków będą się pokazywać z zakładką danych, zamiast z zakładką struktury. + + + + Open View Windows with the data tab for start + Otwieraj Okna Widoku z zakładką danych na początek + + + + Hide built-in plugins + Ukryj wtyczki wbudowane + + + + Current style: + Aktualny styl: + + + + Preview + Podgląd + + + + Enabled + Włączone + + + Column + Kolumna + + + + Disabled + Wyłączone + + + + + Language + Język + + + + Active formatter plugin + Aktywna wtyczka formatera + + + + SQL editor font + Czcionka edytora SQL + + + + Database list font + Czcionka listy baz danych + + + + Database list additional label font + Czcionka dodatkowych etykiety listy baz danych + + + + Data view font + Czcionka widoku danych + + + + Status field font + Czcionka pola statusu + + + + SQL editor colors + Kolory edytora SQL + + + + Current line background + Tło bieżącej linii + + + + <p>SQL strings are enclosed with single quote characters.</p> + <p>Łańcuchy znaków SQL są zamknięte pomiędzy znakami apostrofu.</p> + + + + String foreground + Czcionka łańcucha znaków + + + + <p>Bind parameters are placeholders for values yet to be provided by the user. They have one of the forms:</p><ul><li>:param_name</li><li>$param_name</li><li>@param_name</li><li>?</li></ul> + <b>Parametry wiążące to wyrażenia zastępcze dla wartości, które mają być dopiero dostarczone przez użytkownika. Mają one jedną z form: </p><ul><li>:nazwa_parametru</li><li>$nazwa_parametru</li><li>@nazwa_parametru</li><li>?</li></ul> + + + + Bind parameter foreground + Czcionka parametru wiążącego + + + + Highlighted parenthesis background + Tło podświetlonych nawiasów + + + + <p>BLOB values are binary values represented as hexadecimal numbers, like:</p><ul><li>X'12B4'</li><li>x'46A2F4'</li></ul> + <p>Wartości BLOB są wartościami binarnymi, reprezentowanymi jako liczby heksadecymalne, jak np:</p><ul><li>X'12B4'</li><li>x'46A2F4'</li></ul> + + + + BLOB value foreground + + + + + Regular foreground + Standardowa czcionka + + + + Line numbers area background + Tło obszaru numerów linii + + + + Keyword foreground + Czcionka słowa kluczowego + + + + Number foreground + Czcionka liczby + + + + Comment foreground + Czcionka komentarza + + + + <p>Valid objects are name of tables, indexes, triggers, or views that exist in the SQLite database.</p> + <p>Poprawne obiekty to nazwy tabel, indekstów, wyzwalaczy i widoków, które istnieją w basie SQLite.</p> + + + + Valid objects foreground + Czcionka poprawnych obiektów + + + + Data view colors + Kolory widoku danych + + + + <p>Any data changes will be outlined with this color, until they're commited to the database.</p> + <p>Jakakolwiek zmiana danych będzie obrysowana tym kolorem, dopóki nie zostanie zatwierdzona do bazy danych.</p> + + + + Uncommited data outline color + Kolor obrysu niezatwierdzonych danych + + + + <p>In case of error while commiting data changes, the problematic cell will be outlined with this color.</p> + <p>W przypadku błędu podczas zatwierdzania zmian danych, komórka będąca przyczyną problemu zostanie obrysowana tym kolorem.</p> + + + + Commit error outline color + Kolor obrysu błędu zatwierdzania + + + + NULL value foreground + Kolor czcionki wartości NULL + + + + Deleted row background + Tło wiersza usuniętego + + + + Database list colors + Kolory listy baz danych + + + + <p>Additional labels are those which tell you SQLite version, number of objects deeper in the tree, etc.</p> + <p>Dodatkowe etykiety to te, które mówią o wersji SQLite, liczbie obiektów w głębszych częściach drzewa, itp.</p> + + + + Additional labels foreground + Czcionka dodatkowych etykiet + + + + Status field colors + Kolory pola statusu + + + + Information message foreground + Czcionka wiadomości informującej + + + + Warning message foreground + Czcionka wiadomości ostrzegającej + + + + Error message foreground + Czcionka wiadomości błędu + + + + Description: + plugin details + Opis: + + + + Category: + plugin details + Kategoria: + + + + Version: + plugin details + Wersja: + + + + Author: + plugin details + Autor: + + + + Internal name: + plugin details + Nazwa wewnętrzna: + + + + Dependencies: + plugin details + Zależności: + + + + Conflicts: + plugin details + Konflikty: + + + + Plugin details + Szczegóły wtyczki + + + + Plugins are loaded/unloaded immediately when checked/unchecked, but modified list of plugins to load at startup is not saved until you commit the whole configuration dialog. + Wtyczki są ładowane/wyładowywane natychmiast po zaznaczeniu/odznaczeniu, ale zmodyfikowana lista wtyczek, które należy załadować przy starcie nie jest zapisana, dopóki nie zatwierdzisz całego okna configuracji. + + + + %1 (built-in) + plugins manager in configuration dialog + %1 (wbudowany) + + + + Details + Szczegóły + + + + No plugins in this category. + Brak wtyczek w tej kategorii. + + + + Add new data type + Dodaj nowy typ danych + + + + Rename selected data type + Zmień nazwę wybranego typu danych + + + + Delete selected data type + Usuń wybrany typ danych + + + + Help for configuring data type editors + Pomoc w konfiguracji edytorów typów danych + + + + ConstraintCheckPanel + + + The condition + Warunek + + + + Named constraint: + Ograniczenie nazwane: + + + + On conflict + W razie konfliktu + + + + Enter a valid condition. + Wprowadź poprawny warunek. + + + + Enter a name of the constraint. + Wprowadź nazwę ograniczenia. + + + + ConstraintDialog + + + New constraint + constraint dialog + Nowe ograniczenie + + + + Create + constraint dialog + Utwórz + + + + Edit constraint + dialog window + Edytuj ograniczenie + + + + Apply + constraint dialog + Zastosuj + + + + Primary key + table constraints + Klucz główny + + + + Foreign key + table constraints + Klucz obcy + + + + Unique + table constraints + Wartości unikalne + + + + Not NULL + table constraints + Niepuste + + + + Check + table constraints + Warunek + + + + Collate + table constraints + Zestawienie + + + + Default + table constraints + Wartość domyślna + + + + ConstraintTabModel + + + Table + table constraints + Tabela + + + + Column (%1) + table constraints + Kolumna (%1) + + + + Scope + table constraints + Zakres + + + + Type + table constraints + Typ + + + + Details + table constraints + Szczegóły + + + + Name + table constraints + Nazwa + + + + DataView + + + Filter data + data view + Filtruj dane + + + + Grid view + Widok siatki + + + + Form view + Widok formularza + + + + Refresh table data + data view + Odśwież dane tabeli + + + + First page + data view + Pierwsza strona + + + + Previous page + data view + Poprzednia strona + + + + Next page + data view + Następna strona + + + + Last page + data view + Ostatnia strona + + + + Apply filter + data view + Zastosuj filtr + + + + Commit changes for selected cells + data view + Zatwierdź zmiany dla wybranych komórek + + + + Rollback changes for selected cells + data view + Wycofaj zmiany dla wybranych komórek + + + + Show grid view of results + sql editor + Pokaż widok siatki dla wyników + + + + Show form view of results + sql editor + Pokaż widok formularza dla wyników + + + + Filter by text + data view + Filtruj po tekście + + + + Filter by the Regular Expression + data view + Filtruj używając Wyrażeń Regularnych + + + + Filter by SQL expression + data view + Filtruj używając wyrażenia SQL + + + + Tabs on top + data view + Karty na górze + + + + Tabs at bottom + data view + Karty na dole + + + + Total number of rows is being counted. +Browsing other pages will be possible after the row counting is done. + Całkowita liczba wierszy jest liczona. +Przeglądanie pozostałych stron będzie możliwe kiedy liczenie wierszy zostanie zakończone. + + + + Row: %1 + Wiersz: %1 + + + + DbConverterDialog + + + Source database + Źródłowa baza danych + + + + Source database version: + Wersja źródłowej bazy: + + + + Target database + Docelowa baza danych + + + + Target version: + Wersja docelowej bazy: + + + + This is the file that will be created as a result of the conversion. + To jest plik, który będzie stworzony jako wynik konwersji. + + + + Target file: + Docelowy plik: + + + + Name of the new database: + Nazwa nowej bazy: + + + + This is the name that the converted database will be added to SQLiteStudio with. + To jest nazwa z jaką skonwertowana baza będzie dodana do SQLiteStudio. + + + + Convert database + Konwertuj bazę danych + + + + Select source database + Wybierz źródłową bazę danych + + + + Enter valid and writable file path. + Wprowadź poprawną ścieżkę do pliku, do której masz prawo zapisywać. + + + + Entered file exists and will be overwritten. + Podany plik istnieje i zostanie nadpisany. + + + + Enter a not empty, unique name (as in the list of databases on the left). + Wprowadź niepustą, unikalną nazwę (w kontekście listy baz danych po lewej). + + + + No valid target dialect available. Conversion not possible. + Nie ma dostępnego poprawnego docelowego dialektu. Konwersja nie jest możliwa. + + + + Select valid target dialect. + Wybierz poprawny docelowy dialekt. + + + + Database %1 has been successfully converted and now is available under new name: %2 + Baza danych %1 została przekonwertowana pomyślnie i jest teraz dostępna pod nazwą: %2 + + + + SQL statements conversion + Konwersja zapytań SQL + + + + Following error occurred while converting SQL statements to the target SQLite version: + Następujące błędy wystąpiły podczas konwersji zapytań SQL do docelowej wersji SQLite: + + + + Would you like to ignore those errors and proceed? + Czy chcesz zignorować te błędy i kontynuować? + + + + DbDialog + + + Database + Baza danych + + + + Database driver + Sterownik bazy danych + + + + Name + Nazwa + + + + Type + Typ + + + + Browse for database file on local computer + Przeglądaj w poszukiwaniu pliku bazy danych na lokalnym komputerze + + + + File + Plik + + + + Generate name basing on file path + Generuj nazwę bazując na ścieżce do pliku + + + + Permanent + Trwała + + + + <p>Enable this if you want the database to be stored in configuration file and restored every time SQLiteStudio is started.</p> + aasfd + <p>Włącz to, jeśli chcesz aby baza danych była przechowywana w pliku konfiguracji i przywracana za każdym razem, gdy startuje SQLiteStudio.</p> + + + + Test database connection + Testuj połączenie z bazą + + + + Browse + Przeglądaj + + + + The name will be auto-generated + Nazwa będzie generowana automatycznie + + + + Type the name + Wprowadź nazwę + + + + DbObjectDialogs + + + Delete table + Usuń tabelę + + + + Are you sure you want to delete table %1? + Czy na pewno chcesz usunąć tabelę %1? + + + + Delete index + Usuń indeks + + + + Are you sure you want to delete index %1? + Czy na pewno chcesz usunąć indeks %1? + + + + Delete trigger + Usuń wyzwalacz + + + + Are you sure you want to delete trigger %1? + Czy na pewno chcesz usunąć wyzwalacz %1? + + + + Delete view + Usuń widok + + + + Are you sure you want to delete view %1? + Czy na pewno chcesz usunąć widok %1? + + + + Error while dropping %1: %2 + Błąd podczas porzucania %1: %2 + + + + DbTree + + + Databases + Bazy danych + + + + Filter by name + Filtruj po nazwie + + + + Copy + Kopiuj + + + + Paste + Wklej + + + + Select all + Zaznacz wszystko + + + + Create a group + Utwórz grupę + + + + Delete the group + Usuń grupę + + + + Rename the group + Zmień nazwę grupy + + + + Add a database + Dodaj bazę danych + + + + Edit the database + Edytuj bazę danych + + + + Remove the database + Usuń bazę danych + + + + Connect to the database + Połącz z bazą danych + + + + Disconnect from the database + Rozłącz się z bazą danych + + + + Import + Importuj + + + + Export the database + Eksportuj bazę danych + + + + Convert database type + Konwertuj typ bazy danych + + + + Vacuum + Odkurz + + + + Integrity check + Sprawdź spójność + + + + Create a table + Utwórz tabelę + + + + Edit the table + Edytuj tabelę + + + + Entry with name %1 already exists in group %2. + Pozycja o nazwie %1 istnieje już w grupie %2. + + + Drop the table + Porzuć tabelę + + + + Export the table + Eksportuj tabelę + + + + Import into the table + Importuj do tabeli + + + + Populate table + Zaludnij tabelę + + + + Create similar table + Utwórz podobną tabelę + + + + Create an index + Utwórz indeks + + + + Edit the index + Edytuj indeks + + + Drop the index + Porzuć indeks + + + + Create a trigger + Utwórz wyzwalacz + + + + Edit the trigger + Edytuj wyzwalacz + + + Drop the trigger + Porzuć wyzwalacz + + + + Create a view + Utwórz widok + + + + Edit the view + Edytuj widok + + + Drop the view + Porzuć widok + + + + Add a column + Dodaj kolumnę + + + + Edit the column + Edytuj kolumnę + + + + Delete the column + Usuń kolumnę + + + + Delete selected items + Usuń wybrane elementy + + + + Clear filter + Wyczyść filtr + + + + Refresh all database schemas + Odśwież schematy wszystkich baz danych + + + + Refresh selected database schema + Odśwież schemat wybranej bazy danych + + + + Delete the table + Usuń tabelę + + + + Reset autoincrement sequence + Wyzeruj sekwencję autoinkrementacji + + + + Delete the index + Usuń indeks + + + + Delete the trigger + Usuń wyzwalacz + + + + Delete the view + Usuń widok + + + + + Database + Baza danych + + + + Grouping + Grupowanie + + + + + Create group + Utwórz grupę + + + + Group name + Nazwa grupy + + + + Delete group + Usuń grupę + + + + Are you sure you want to delete group %1? +All objects from this group will be moved to parent group. + Czy na pewno chcesz usunąć grupę %1? +Wszystkie obiekty z tej grupy zostaną przeniesione do nadrzędnej grupy. + + + + Delete database + Usuń bazę danych + + + + Are you sure you want to delete database '%1'? + Czy na pewno chcesz usunąć bazę danych '%1'? + + + + + Cannot import, because no import plugin is loaded. + Nie można zaimportować, ponieważ żadna wtyczka importu nie została załadowana. + + + + + Cannot export, because no export plugin is loaded. + Nie można wyeksportować, ponieważ żadna wtyczka eksportu nie została załadowana. + + + + Error while executing VACUUM on the database %1: %2 + Błąd podczas wykonywania VACUUM na bazie danych %1: %2 + + + + VACUUM execution finished successfully. + Wykonanie VACUUM przebiegło pomyślnie. + + + + Integrity check (%1) + Sprawdzanie spójności (%1) + + + + Reset autoincrement + Wyzeruj autoinkrementację + + + + Are you sure you want to reset autoincrement value for table '%1'? + Czy na pewno chcesz wyzerować wartość autoinkrementacji dla tabeli '%1'? + + + + An error occurred while trying to reset autoincrement value for table '%1': %2 + Wystąpił błąd podczas próby wyzerowania wartości autoinkrementacji dla tabeli '%1': %2 + + + + Autoincrement value for table '%1' has been reset successfly. + Wartość autoinkrementacji dla tabeli '%1' została pomyślnie wyzerowana. + + + + Following objects will be deleted: %1. + Następujące obiekty zostaną usunięte: %1 + + + + Following databases will be removed from list: %1. + Następujące bazy danych zostaną usunięte z listy: %1 + + + + Remainig objects from deleted group will be moved in place where the group used to be. + Pozostałe obiekty z usuniętej grupy będą przeniesione w miejsce, gdzie dotychczas była ta grupa. + + + + %1<br><br>Are you sure you want to continue? + %1<br><br>Czy na pewno chcesz kontynuować? + + + + Delete objects + Usuń obiekty + + + + DbTreeItemDelegate + + + error + dbtree labels + błąd + + + + (system table) + database tree label + (tabela systemowa) + + + + (virtual) + virtual table label + (wirtualna) + + + + (system index) + database tree label + (indeks systemowy) + + + + DbTreeModel + + + Database: %1 + dbtree tooltip + Baza danych: %1 + + + + Version: + dbtree tooltip + Wersja: + + + + File size: + dbtree tooltip + Rozmiar pliku: + + + + Encoding: + dbtree tooltip + Kodowanie: + + + + Error details: + dbtree tooltip + Szczegóły błędu: + + + + Table : %1 + dbtree tooltip + Tablela: : %1 + + + + Columns (%1): + dbtree tooltip + Kolumny (%1): + + + + Indexes (%1): + dbtree tooltip + Indeksy (%1): + + + + Triggers (%1): + dbtree tooltip + Wyzwalacze (%1): + + + + Copy + Kopiuj + + + + Move + Przenieś + + + + Include data + Również dane + + + + Include indexes + Również indeksy + + + + Include triggers + Również wyzwalacze + + + + Abort + Przerwij + + + + Referenced tables + Tabele powiązane + + + + Do you want to include following referenced tables as well: +%1 + Czy chcesz zawrzeć również powiązane tabele: +%1 + + + + Name conflict + Konflikt nazwy + + + + Following object already exists in the target database. +Please enter new, unique name, or press '%1' to abort the operation: + Następująy obiekt istnieje już w docelowej bazie danych. +Proszę podać nową, unikalną nazwę, lub nacisnąć '%1', aby przerwać operację. + + + + SQL statements conversion + Konwersja zapytań SQL + + + + Following error occurred while converting SQL statements to the target SQLite version: + Następujące błędy wystąpiły podczas konwersji zapytań SQL do docelowej wersji SQLite: + + + + Would you like to ignore those errors and proceed? + Czy chcesz zignorować te błędy i kontynuować? + + + + DdlHistoryWindow + + + Filter by database: + Filtruj po bazie danych: + + + + -- Queries executed on database %1 (%2) +-- Date and time of execution: %3 +%4 + -- Zapytania wykonane na bazie %1 (%2) +-- Data i godzina wykonania: %3 +%4 + + + + DDL history + Historia DDL + + + + DdlPreviewDialog + + + Queries to be executed + Zapytania do wykonania + + + + Don't show again + Nie pokazuj więcej + + + + DebugConsole + + + SQLiteStudio Debug Console + Konsola Debugowania SQLiteStudio + + + + EditorWindow + + + Query + Zapytanie + + + + History + Historia + + + + Results in the separate tab + Wyniki w osobnej karcie + + + + Results below the query + Wyniki pod zapytaniem + + + + + SQL editor %1 + Edytor SQL %1 + + + + Results + Wyniki + + + + Execute query + Wykonaj zapytanie + + + + Explain query + Wytłumacz zapytanie + + + + Clear execution history + sql editor + Wymaż historię zapytań + + + + Export results + sql editor + Wyeksportuj wyniki + + + + Create view from query + sql editor + Utwórz widok z zapytania + + + + Previous database + Poprzednia baza danych + + + + Next database + Następna baza danych + + + + Show next tab + sql editor + Pokaż następną kartę + + + + Show previous tab + sql editor + Pokaż poprzednią kartę + + + + Focus results below + sql editor + Aktywuj wyniki poniżej + + + + Focus SQL editor above + sql editor + Aktywuj edytor SQL powyżej + + + + Active database (%1/%2) + Aktywna baza danych (%1/%2) + + + + Query finished in %1 second(s). Rows affected: %2 + Zapytanie ukończone w %1 sekund(y). Liczba przetworzonych wierszy: %2 + + + + Query finished in %1 second(s). + Zapytanie ukończone w %1 sekund(y). + + + Query finished in %2 second(s). + Zapytanie ukończone w %2 sekund(y). + + + + Clear execution history + Wymaż historię zapytań + + + + Are you sure you want to erase the entire SQL execution history? This cannot be undone. + Czy na pewno chcesz wymazać całą historię zapytań SQL? Tego nie można odwrócić. + + + + Cannot export, because no export plugin is loaded. + Nie można wyeksportować, ponieważ żadna wtyczka eksportu nie została załadowana. + + + + No database selected in the SQL editor. Cannot create a view for unknown database. + Nie wybrano bazdy danych w edytorze SQL. Nie można utworzyć widoku dla nieznanej bazy. + + + + Editor window "%1" has uncommited data. + Okno edytora "%1" ma niezatwierdzone dane. + + + + ErrorsConfirmDialog + + + Errors + Błędy + + + + Following errors occured: + Wystąpiły następujące błędy: + + + + Would you like to proceed? + Czy chcesz kontynuować? + + + + ExportDialog + + + Export + Eksportuj + + + + What do you want to export? + Co chcesz eksportować? + + + + A database + Bazę danych + + + + A single table + Pojedynczą tabelę + + + + Query results + Wyniki zapytania + + + + Table to export + Tabela do wyeksportowania + + + + Database + Baza danych + + + + Table + Tabela + + + + Options + Opcje + + + + When this option is unchecked, then only table DDL (CREATE TABLE statement) is exported. + Gdy ta opcja jest odznaczona, to tylko DDL tabeli (zapytanie CREATE TABLE) jest eksportowane. + + + + Export table data + Eksportuj dane tabeli + + + + Export table indexes + Eksportuj indeksy tabeli + + + + Export table triggers + Eksportuj wyzwalacze tabeli + + + + Note, that exporting table indexes and triggers may be unsupported by some output formats. + Zwróć uwagę, że eksportowanie indeksów i wyzwalaczy tabeli może nie być obsługiwane przez niektóre formaty wyjściowe. + + + + Select database objects to export + Wybierz obiekty bazy danych do eksportu + + + + Export data from tables + Eksportuj dane z tabel + + + + Select all + Zaznacz wszystko + + + + Deselect all + Odznacz wszystko + + + + + Database: + Baza danych: + + + + Query to export results for + Zapytanie dla wyników do eksportu + + + + Query to be executed for results: + Zapytanie, które należy wykonać dla wyników: + + + + Export format and options + Format eksportu i opcje + + + + Export format + Format eksportu + + + + Output + Wyjście + + + + Exported file path + Ścieżka do wyeksportowanego pliku + + + + Clipboard + Schowek + + + + File + Plik + + + + Exported text encoding: + Kodowanie wyeksportowanego tekstu: + + + + Export format options + Opcje formatu eksportowania + + + + Cancel + Anuluj + + + + + + Select database to export. + Wybierz bazę do eksportu. + + + + Select table to export. + Wybierz tabelę do eksportu. + + + + Enter valid query to export. + Wprowadź poprawne zapytanie do eksportu. + + + + Select at least one object to export. + Wybierz przynajmniej jeden obiekt do eksportu. + + + + You must provide a file name to export to. + Musisz podać nazwę pliku do którego należy wyeksportować. + + + + Path you provided is an existing directory. You cannot overwrite it. + Ścieżka którą podałeś jest istniejącym katalogiem. Nie można go nadpisać. + + + + The directory '%1' does not exist. + Katalog '%1' nie istnieje. + + + + The file '%1' exists and will be overwritten. + Plik '%1' istnieje i zostanie nadpisany. + + + + All files (*) + Wszystkie pliki (*) + + + + Pick file to export to + Wybierz plik do eksportu + + + + Internal error during export. This is a bug. Please report it. + Wystąpił wewnętrzny błąd podczas eksportu. To jest błąd programu. Proszę to zgłosić. + + + + FontEdit + + + Choose font + font configuration + Wybierz czcionkę + + + + Form + + + Active SQL formatter plugin + Aktywna wtyczka formatera SQL + + + + FormView + + + Commit row + form view + Zatwierdź wiersz + + + + Rollback row + form view + Wycofaj wiersz + + + + First row + form view + Pierwszy wiersz + + + + Previous row + form view + Poprzedni wiersz + + + + Next row + form view + Następny wiersz + + + + Last row + form view + Ostatni wiersz + + + + Insert new row + form view + Wstaw nowy wiersz + + + + Delete current row + form view + Usuń bieżący wiersz + + + + FunctionsEditor + + + Filter funtions + Filtruj funkcje + + + + Function name: + Nazwa funkcji: + + + + Implementation language: + Język implementacji: + + + + Type: + Typ: + + + + Input arguments + Argumenty wejściowe + + + + Undefined + Niezdefiniowane + + + + Databases + Bazy danych + + + + Register in all databases + Zarejestruj we wszystkich bazach danych + + + + Register in following databases: + Zarejestruj w następujących bazach danych: + + + + Initialization code: + Kod inicjalizacji: + + + + + Function implementation code: + Kod implementacji funkcji: + + + + Final step implementation code: + Kod implementacji ostatniego kroku: + + + + SQL function editor + Edytor funkcji SQL + + + + Commit all function changes + Zatwierdź zmiany we wszystkich funkcjach + + + + Rollback all function changes + Wycofaj zmiany we wszystkich funkcjach + + + + Create new function + Utwórz nową funkcję + + + + Delete selected function + Usuń wybraną funkcję + + + + Custom SQL functions manual + Podręcznik własnych funkcji SQL + + + + Add function argument + Dodaj argument funkcji + + + + Rename function argument + Zmień nazwę argumentu funkcji + + + + Delete function argument + Usuń argument funkcji + + + + Move function argument up + Przesuń argument funkcji w górę + + + + Move function argument down + Przesuń argument funkcji w dół + + + + Scalar + Skalarna + + + + Aggregate + Agregacyjna + + + + Enter a non-empty, unique name of the function. + Wprowadź niepustą, unikalną nazwę funkcji + + + + Pick the implementation language. + Wybierz język implementacji. + + + + Per step code: + Kod pojedynczego kroku: + + + + Enter a non-empty implementation code. + Wprowadź niepusty kod implementacji. + + + + argument + new function argument name in function editor window + argument + + + + Functions editor window has uncommited modifications. + Okno edytora funkcji ma niezatwierdzone zmiany. + + + + ImportDialog + + + Import data + Importuj dane + + + + Table to import to + Tabela do której należy importować + + + + Table + Tabela + + + + Database + Baza danych + + + + Data source to import from + Źródło danych z którego należy importować + + + + Data source type + Typ źródła danych + + + + Options + OOpcje + + + + Input file: + Plik wejściowy: + + + + Text encoding: + Kodowanie tekstu: + + + + Data source options + Opcje źródła danych + + + + Cancel + Anuluj + + + + If you type table name that doesn't exist, it will be created. + Jeśli wpiszesz nazwę tabeli, która nie istnieje, to zostanie ona stworzona. + + + + Enter the table name + Wprowadź nazwę tabeli + + + + Select import plugin. + Wybierz wtyczkę importu + + + + You must provide a file to import from. + Musisz podać plik z którego należy zaimportować. + + + + The file '%1' does not exist. + Plik '%1' nie istnieje. + + + + Path you provided is a directory. A regular file is required. + Ścieżka którą podałeś jest katalogiem. Wymagany jest zwykły plik. + + + + Pick file to import from + Wybierz plik do importu + + + + IndexDialog + + + + Index + Indeks + + + + On table: + Na tabeli: + + + + Index name: + Nazwa indeksu: + + + + Partial index condition + Warunek indeksu częściowego: + + + + Unique index + Indeks unikalny + + + + Column + Kolumna + + + + Collation + Zestawienie + + + + Sort + Sortowanie + + + + DDL + DDL + + + + Tried to open index dialog for closed or inexisting database. + Próbowano otworzyć okno indeksu dla zamkniętej lub nieistniejącej bazy. + + + + Could not process index %1 correctly. Unable to open an index dialog. + Nie udało się przetworzyć poprawnie indeksu %1. Nie można otworzyć okna indeksu. + + + + Pick the table for the index. + Wybierz tabelę dla indeksu. + + + + Select at least one column. + Zaznacz przynajmniej jedną kolumnę. + + + + Enter a valid condition. + Wprowadź poprawny warunek. + + + + default + index dialog + domyślne + + + + Sort order + table constraints + Kierunek sortowania + + + + + Error + index dialog + Błąd + + + + Cannot create unique index, because values in selected columns are not unique. Would you like to execute SELECT query to see problematic values? + Nie można utworzyć indeksu, ponieważ wartości w wybranych kolumnach nie są unikalne. Czy chcesz wykonać zapytanie SELECT, aby zobaczyć wartości stwarzające problem? + + + + An error occurred while executing SQL statements: +%1 + Wystąpił błąd podczas wykonywania zapytań SQL: +%1 + + + + LanguageDialog + + + Language + Język + + + + Please choose language: + Proszę wybrać język: + + + + MainWindow + + + Database toolbar + Pasek narzędzi baz danych + + + + Structure toolbar + Pasek narzędzi struktury + + + + Tools + Narzędzia + + + + Window list + Lista okien + + + + View toolbar + Pasek narzędzi widoku + + + + Configuration widgets + Kontrolki konfiguracji + + + + Syntax highlighting engines + Silniki podświetlania składni + + + + Data editors + Edytory danych + + + + Running in debug mode. Press %1 or use 'Help / Open debug console' menu entry to open the debug console. + Uruchomiono tryb debugowania. Wciśnij %1 lub wybierz menu 'Pomoc / Otwórz konsolę debugowania' aby otworzyć konsolę debugowania. + + + + Running in debug mode. Debug messages are printed to the standard output. + Uruchomiono tryb debugowania. Wiadomości debugujące są wyświetlane na standardowym wyjściu. + + + + You need to restart application to make the language change take effect. + Należy zrestartować aplikację, aby nastąpiła zmiana języka. + + + + Open SQL editor + Otwórz edytor SQL + + + + Open DDL history + Otwórz historię DDL + + + + Open SQL functions editor + Otwórz edytor funkcji SQL + + + + Open collations editor + Otwórz edytor zestawień + + + + Import + Importuj + + + + Export + Eksportuj + + + + Open configuration dialog + Otwórz okno konfiguracji + + + + Tile windows + Ustaw okna w płytki + + + + Tile windows horizontally + Ustaw okno poziomo + + + + Tile windows vertically + Ustaw okna pionowo + + + + Cascade windows + Ustaw okna caskadowo + + + + Next window + Następne okno + + + + Previous window + Poprzednie okno + + + + Hide status field + Ukryj pole statusu + + + + Close selected window + Zamknij wybrane okno + + + + Close all windows but selected + Zamknij wszystkie okna, oprócz wybranego + + + + Close all windows + Zamknij wszystkie okna + + + + Restore recently closed window + Przywróć ostatnio zamknięte okno + + + + Rename selected window + Zmień nazwę wybranego okna + + + + Open Debug Console + Otwórz Konsolę Debugowania + + + + Report a bug + Zgłoś błąd + + + + Propose a new feature + Zgłoś pomysł + + + + About + O programie + + + + Licenses + Licencje + + + + Open home page + Otwórz stronę domową + + + + Open forum page + Otwórz stronę forum + + + + User Manual + Podręcznik Użytkownika + + + + SQLite documentation + Dokumentacja SQLite + + + + Report history + Historia zgłoszeń + + + + Check for updates + Sprawdź aktualizacje + + + + Database + menubar + Baza danych + + + + Structure + menubar + Struktura + + + + View + menubar + Widok + + + + Window list + menubar view menu + Lista okien + + + + Tools + menubar + Narzędzia + + + + Help + Pomoc + + + + Could not set style: %1 + main window + Nie udało się ustawić stylu: %1 + + + + Cannot export, because no export plugin is loaded. + Nie można wyeksportować, ponieważ żadna wtyczka eksportu nie została załadowana. + + + + Cannot import, because no import plugin is loaded. + Nie można zaimportować, ponieważ żadna wtyczka importu nie została załadowana. + + + + Rename window + Zmień nazwę okna + + + + Enter new name for the window: + Wprowadź nową nazwę dla okna: + + + + New updates are available. <a href="%1">Click here for details</a>. + Nowe aktualizacje są dostępne: <a href="%1">Kliknij aby poznać szczegóły</a>. + + + + You're running the most recent version. No updates are available. + Uruchomiona jest najnowsza wersja. Nie ma dostępnych aktualizacji. + + + + Database passed in command line parameters (%1) has been temporarily added to the list under name: %2 + Baza danych podana w linii poleceń (%1) jest tymczasowo dodana do listy pod nazwą: %2 + + + + Could not add database %1 to list. + Nie udało się dodać bazy danych %1 do listy. + + + + MdiWindow + + + Uncommited changes + Niezatwierdzone dane + + + + Close anyway + Zamknij mimo to + + + + Don't close + Nie zamykaj + + + + MultiEditor + + + Null value + multieditor + Wartość null + + + + Configure editors for this data type + Skonfiguruj edytory dla tego typu danych + + + + Data editor plugin '%1' not loaded, while it is defined for editing '%1' data type. + Wtyczka edytora danych '%1' nie jest załadowana, podczas gdy jest ona zdefiniowana do edycji typu danych '%1'. + + + + Deleted + multieditor + Usunięto + + + + Read only + multieditor + Tylko do odczytu + + + + MultiEditorBool + + + Boolean + Logiczna + + + + MultiEditorDate + + + Date + Data + + + + MultiEditorDateTime + + + Date & time + Data i czas + + + + MultiEditorHex + + + Hex + Heks + + + + MultiEditorNumeric + + Number + Liczba + + + + Number + numeric multi editor tab name + Liczba + + + + MultiEditorText + + + Text + Tekst + + + + Tab changes focus + Tabulator zmienia aktywność + + + + Cut + Wytnij + + + + Copy + Kopiuj + + + + Paste + Wklej + + + + Delete + Usuń + + + + Undo + Cofnij + + + + Redo + Przywróć + + + + MultiEditorTime + + + Time + Czas + + + + NewConstraintDialog + + + New constraint + Nowe ograniczenie + + + + + Primary Key + new constraint dialog + Klucz główny + + + + + Foreign Key + new constraint dialog + Klucz obcy + + + + + Unique + new constraint dialog + Wartości unikalne + + + + + Check + new constraint dialog + Warunek + + + + Not NULL + new constraint dialog + Niepuste + + + + Collate + new constraint dialog + Zestawienie + + + + Default + new constraint dialog + Wartość domyślna + + + + NewVersionDialog + + + SQLiteStudio updates + Aktualizacje SQLiteStudio + + + + New updates are available! + Dostępne są nowe aktualizacje! + + + + Component + Komponent + + + + Current version + Obecna wersja + + + + Update version + Wersja aktualizacji + + + + Check for updates on startup + Sprawdzaj aktualizacje na starcie + + + + Update to new version! + Aktualizuj do nowej wersji! + + + + The update will be automatically downloaded and installed. This will also restart application at the end. + Aktualizacja będzie pobrana i zainstalowana automatycznie. Spowoduje to również na końcu restart aplikacji. + + + + Not now. + Nie teraz. + + + + Don't install the update and close this window. + Nie instaluj aktualizacji i zamknij to okno. + + + + PopulateConfigDialog + + + Populating configuration + Konfiguracja zaludniania + + + + Configuring <b>%1</b> for column <b>%2</b> + Konfigurowanie <b>%1</b> dla kolumny <b>%2</b> + + + + PopulateDialog + + + Populate table + Zaludnij tabelę + + + + Database + Baza danych + + + + Table + Tabela + + + + Columns + Kolumny + + + + Number of rows to populate: + Liczba wierszy do zaludnienia: + + + + Populate + populate dialog button + Zaludnij + + + + Configure + Konfiguruj + + + + Populating configuration for this column is invalid or incomplete. + Konfiguracja zaludniania dla tej kolumny jest niepoprawna lub niekompletna. + + + + Select database with table to populate + Wybierz bazę danych z tabelą do zaludnienia + + + + Select table to populate + Wybierz tabelę do zaludnienia + + + + You have to select at least one column. + Musisz zaznaczyć przynajmniej jedną kolumnę. + + + + QObject + + + The query execution mechanism had problems with extracting ROWID's properly. This might be a bug in the application. You may want to report this. + Mechanizm wykonywania zapytań miał problemy z wyciągnięciem własności ROWID. To może być błąd aplikacji. Możesz to zgłosić. + + + + Requested column is a result of SQL expression, instead of a simple column selection. Such columns cannot be edited. + Ta kolumna jest wynikiem wyrażenia SQL, a nie zwykłej selekcji kolumny. Takie kolumny nie mogą być edytowane. + + + + Requested column belongs to restricted SQLite table. Those tables cannot be edited directly. + Ta kolumna należy do systemowej tabeli SQLite. Te tabele nie mogą być edytowane bezpośrednio. + + + + Cannot edit columns that are result of compound %1 statements (one that includes %2, %3 or %4 keywords). + Nie można edytować kolumn, które są wynikiem złożonego zapytania %1 (tego, które zawiera słowo kluczowe %2, %3, lub %4). + + + + Cannot edit results of query other than %1. + Nie można edytować wyników zapytania innego niż %1. + + + + Cannot edit columns that are result of aggregated %1 statements. + Nie można edytować kolumn, które są wynikiem zapytania agregacyjnego %1. + + + + Cannot edit columns that are result of %1 statement. + Nie można edytować kolumn, które są wynikiem zapytania %1. + + + + Cannot edit columns that are result of common table expression statement (%1). + Nie można edytować kolumn, które są wynikiem zapytania ze wspólnym wyrażeniem tabeli (%1). + + + + + + + on conflict: %1 + data view tooltip + w razie konfliktu: %1 + + + + references table %1, column %2 + data view tooltip + odwołuje się do tabeli %1, kolumny %2 + + + + condition: %1 + data view tooltip + warunek: %1 + + + + collation name: %1 + data view tooltip + nazwa zestawienia: %1 + + + + Data grid view + Widok siatki danych + + + + Copy cell(s) contents to clipboard + Skopiuj zawartość komórek do schowka. + + + + Paste cell(s) contents from clipboard + Wklej zawartość komórkek ze schowka. + + + + Set empty value to selected cell(s) + Ustaw pustą wartość dla wybranych komórek + + + + Set NULL value to selected cell(s) + Ustaw wartość NULL dla wybranych komórek + + + + Commit changes to cell(s) contents + Zatwierdź zmiany dla zawartości komórek + + + + Rollback changes to cell(s) contents + Wycofaj zmiany dla zawartości komórek + + + + Delete selected data row + Usuń wybrane wiersze danych + + + + Insert new data row + Wstaw nowy wiersz danych + + + + Open contents of selected cell in a separate editor + Otwórz zawartość wybranej komórki w osobnym edytorze + + + + Total pages available: %1 + Liczba dostępnych stron: %1 + + + + Total rows loaded: %1 + Liczba załadowanych wierszy: %1 + + + + Data view (both grid and form) + Widok danych (zarówno siatki i formularza) + + + + Refresh data + Odśwież dane + + + + Switch to grid view of the data + Przełącz do widoku siatki danych + + + + Switch to form view of the data + Przełącz do widoku formularza danych + + + + Database list + Lista baz + + + + Delete selected item + Usuń zaznaczony element + + + + Clear filter contents + Wyczyść zawartość filtra + + + + Refresh schema + Odśwież schemat + + + + Refresh all schemas + Odśwież wszystkie schematy + + + + Add database + Dodaj bazę danych + + + + Select all items + Zaznacz wszystkie elementy + + + + Copy selected item(s) + Kopiuj zaznaczone elementy + + + + + + Paste from clipboard + Wklej ze schowka + + + + Tables + Tabele + + + + Indexes + Indeksy + + + + Triggers + Wyzwalacze + + + + Views + Widoki + + + + Columns + Kolumny + + + + Data form view + Widok formularza danych + + + + Commit changes for current row + Zatawierdź zmiany dla bieżącego wiersza + + + + Rollback changes for current row + Wycofaj zmiany dla bieżącego wiersza + + + + Go to first row on current page + Przejdź do pierwszego wiersza na bieżącej stronie + + + + Go to next row + Przejdź do następnego wiersza + + + + Go to previous row + Przejdź do poprzedniego wiersza + + + + Go to last row on current page + Przejdź do ostatniego wiersza na bieżącej stronie + + + + Insert new row + Wstaw nowy wiersz + + + + Delete current row + Usuń bieżący wiersz + + + + Main window + Okno główne + + + + Open SQL editor + Otwórz edytor SQL + + + + Previous window + Poprzednie okno + + + + Next window + Następne okno + + + + Hide status area + Ukryj pole statusu + + + + Open configuration dialog + Otwórz okno konfiguracji + + + + Open Debug Console + Otwórz Konsolę Debugowania + + + + Cell text value editor + Edytor tekstowy wartości komórki + + + + + Cut selected text + Wytnij wybrany tekst + + + + + Copy selected text + Skopiuj wybrany tekst + + + + + Delete selected text + Usuń wybrany tekst + + + + + Undo + Cofnij + + + + + Redo + Przywróć + + + + SQL editor input field + Pole wprowadzania edytora SQL + + + + Select whole editor contents + Zaznacz całą zawartość edytora + + + + Save contents into a file + Zapisz zawartość do pliku + + + + Load contents from a file + Wczytaj zawartość z pliku + + + + Find in text + Znajdź w tekście + + + + Find next + Znajdź następny + + + + Find previous + Znajdź poprzedni + + + + Replace in text + Zmień w tekście + + + + Delete current line + Usuń bieżącą linię + + + + Request code assistant + Wywołaj asystenta kodu + + + + Format contents + Formatuj zawartość + + + + Move selected block of text one line down + Przenieś wybrany blok tekstu o jedną linię w dół + + + + Move selected block of text one line up + Przenieś wybrany blok tekstu o jedną linię w górę + + + + Copy selected block of text and paste it a line below + Skopiuj wybrany blok tekstu i wklej go poniżej + + + + Copy selected block of text and paste it a line above + Skopiuj wybrany blok tekstu i wklej go powyżej + + + + All SQLite databases + Wszystkie bazy danych SQLite + + + + All files + Wszystkie pliki + + + + Database file + Plik bazy danych + + + + Reports history window + Okno history zgłoszeń + + + + Delete selected entry + Usuń wybraną pozycję + + + + SQL editor window + Okno edytora SQL + + + + Execute query + Wykonaj zapytanie + + + + Execute "%1" query + Wykonaj zapytanie "%1" + + + + Switch current working database to previous on the list + Zmień roboczą bazę danych na poprzednią z listy + + + + Switch current working database to next on the list + Zmień roboczą bazę danych na następną z listy + + + + Go to next editor tab + Przejdź do następnej karty edytora + + + + Go to previous editor tab + Przejdź do poprzedniej karty edytora + + + + Move keyboard input focus to the results view below + Przenieś aktywność klawiatury do widoku wyników poniżej + + + + Move keyboard input focus to the SQL editor above + Przenieś aktywność klawiatury do edytora SQL powyżej + + + + Table window + Okno tabeli + + + + Refresh table structure + Odśwież strukturę tabeli + + + + Add new column + Dodaj nową kolumnę + + + + Edit selected column + Edytuj wybraną kolumnę + + + + Delete selected column + Usuń wybraną kolumnę + + + + Export table data + Eksportuj dane tabeli + + + + Import data to the table + Importuj dane do tabeli + + + + Add new table constraint + Dodaj nowe ograniczenie tabeli + + + + Edit selected table constraint + Edytuj wybrane ograniczenie tabeli + + + + Delete selected table constraint + Usuń wybrane ograniczenie tabeli + + + + Refresh table index list + Odśwież listę indeksów tabeli + + + + Add new index + Dodaj nowy indeks + + + + Edit selected index + Edytuj wybrany indeks + + + + Delete selected index + Usuń wybrany indeks + + + + Refresh table trigger list + Odśwież listę wyzwalaczy tabeli + + + + + Add new trigger + Dodaj nowy wyzwalacz + + + + + Edit selected trigger + Edytuj wybrany wyzwalacz + + + + + Delete selected trigger + Usuń wybrany wyzwalacz + + + + + Go to next tab + Przejdź do następnej karty + + + + + Go to previous tab + Przejdź do poprzedniej karty + + + + A view window + Okno widoku + + + + Refresh view trigger list + Odśwież listę wizwalaczy widoku + + + + QuitConfirmDialog + + + Uncommited changes + Niezatwierdzone dane + + + + Are you sure you want to quit the application? + +Following items are pending: + Czy na pewno chcesz zamknąć aplikację? + +Następujące elementy są w toku: + + + + SearchTextDialog + + + Find or replace + Znajdź lub zastąp + + + + Find: + Znajdź: + + + + Case sensitive + Uwzględniaj wielkość liter + + + + Search backwards + Szukaj wstecz + + + + Regular expression matching + Dopasowywanie wyrażeniem regularnym + + + + Replace && +find next + Zastąp i +znajdź następny + + + + Replace with: + Zastąp: + + + + Replace all + Zastąp wszystkie + + + + Find + Znajdź + + + + SortDialog + + + Sort by columns + Sortuj wg. kolumn + + + + + Column + Kolumna + + + + + Order + Kierunek + + + + Sort by: %1 + Sortuj po: %1 + + + + Move column up + Przesuń kolumnę w górę + + + + Move column down + Przesuń kolumnę w dół + + + + SqlEditor + + + Cut + sql editor + Wytnij + + + + Copy + sql editor + Kopiuj + + + + Paste + sql editor + Wklej + + + + Delete + sql editor + Usuń + + + + Select all + sql editor + Zaznacz wszystko + + + + Undo + sql editor + Cofnij + + + + Redo + sql editor + Przywróć + + + + Complete + sql editor + Dopełnij + + + + Format SQL + sql editor + Formatuj SQL + + + + Save SQL to file + sql editor + Zapisz SQL do pliku + + + + Load SQL from file + sql editor + Wczytaj SQL z pliku + + + + Delete line + sql editor + Usuń linię + + + + Move block down + sql editor + Przesuń blok w dół + + + + Move block up + sql editor + Przesuń blok w górę + + + + Copy block down + sql editor + Skopiuj blok w dół + + + + Copy up down + sql editor + Skopiuj blok w górę + + + + Find + sql editor + Znajdź + + + + Find next + sql editor + Znajdź następny + + + + Find previous + sql editor + Znajdź poprzedni + + + + Replace + sql editor + Zastąp + + + + Syntax completion can be used only when a valid database is set for the SQL editor. + Dopełnianie składni może być użyte tylko wtedy, gdy poprawna baza danych jest ustawiona w edytorze SQL. + + + + Contents of the SQL editor are huge, so errors detecting and existing objects highlighting are temporarily disabled. + Zawartość edytora SQL jest ogromna, więc sprawdzanie błędów i podświetlanie istniejących obiektów zostało tymczasowo wyłączone. + + + + Save to file + Zapisz do pliku + + + + Could not open file '%1' for writing: %2 + Nie udało się otworzyć pliku '%1' do zapisu: %2 + + + + SQL scripts (*.sql);;All files (*) + Skrypty SQL (*.sql);;Wszystkie pliki (*) + + + + Open file + Otwórz plik + + + + Could not open file '%1' for reading: %2 + Nie udało się otworzyć pliku '%1' do odczytu: %2 + + + + Reached the end of document. Hit the find again to restart the search. + Osiągnięto koniec dokumentu. Wciśnij szukanie ponownie, aby zrestartować szukanie. + + + + SqlQueryItem + + + Column: + data view tooltip + Kolumna: + + + + Data type: + data view + Typ danych: + + + + Table: + data view tooltip + Tabela: + + + + Constraints: + data view tooltip + Ograniczenie: + + + + This cell is not editable, because: %1 + Tej komórki nie można edytować, ponieważ: %1 + + + + Cannot load the data for a cell that refers to the already closed database. + Nie można załadować danych dla komórki, która odwołuje się do zamkniętej już bazy danych. + + + + SqlQueryItemDelegate + + + + Cannot edit this cell. Details: %2 + Nie można edytować tej komórki. Szczegóły: %2 + + + + The row is marked for deletion. + Wiersz jest zaznaczony do usunięcia. + + + + SqlQueryModel + + + + Only one query can be executed simultaneously. + Tylko jedno zapytanie może być wykonywane w danym momencie. + + + + Uncommited data + Niezatwierdzone dane + + + + There are uncommited data changes. Do you want to proceed anyway? All uncommited changes will be lost. + Niektóre zmiany w danych nie zostały zatwierdzone. Czy na pewno chcesz kontynuować? Wszystkie niezatwierdzone zmiany zostaną utracone. + + + + Cannot commit the data for a cell that refers to the already closed database. + Nie można zatwierdzić danych dla komórki, która odnosi się do zamkniętej już bazy danych. + + + + Could not begin transaction on the database. Details: %1 + Nie udało się rozpocząć transakcji na bazie danych. Szczegóły: %1 + + + + An error occurred while commiting the transaction: %1 + Wystąpił błąd podczas zatwierdzania transakcji: %1 + + + + An error occurred while rolling back the transaction: %1 + Wystąpił błąd podczas wycofywania transakcji: %1 + + + + Tried to commit a cell which is not editable (yet modified and waiting for commit)! This is a bug. Please report it. + Próbowano zatwierdzić komórkę, której nie można edytować (a mimo to została zmodyfikowana i czeka na zatwierdzenie)! To jest błąd. Proszę to zgłosić. + + + + An error occurred while commiting the data: %1 + Wystąpił błąd podczas zatwierdzania danych: %1 + + + + + Error while executing SQL query on database '%1': %2 + Błąd podczas wykonywania zapytania SQL na bazie '%1': %2 + + + Error while executing SQL query: %1 + Błąd podczas wykonywania zapytania SQL: %1 + + + + Error while loading query results: %1 + Błąd podczas wczytywania wyników zapytania: %1 + + + + Insert multiple rows + Wstaw wiele wierszy + + + + Number of rows to insert: + Liczba wierszy do wstawienia: + + + + SqlQueryView + + + Copy + Kopiuj + + + + Copy as... + Kopiuj jako... + + + + Paste + Wklej + + + + Paste as... + Wklej jako... + + + + Set NULL values + Ustaw wartości NULL + + + + Erase values + Wymaż wartości + + + + Edit value in editor + Edytuj wartość w edytorze + + + + Commit + Zatwierdź + + + + Rollback + Wycofaj + + + + Commit selected cells + Zatwierdź zaznaczone komórki + + + + Rollback selected cells + Wycofaj zaznaczone komórki + + + + Define columns to sort by + Zdefiniuj kolumny po których sortować + + + + Remove custom sorting + Wycofaj własne sortowanie + + + + Insert row + Wstaw wiersz + + + + Insert multiple rows + Wstaw wiele wierszy + + + + Delete selected row + Usuń zaznaczony wiersz + + + + Edit value + Edytuj wartość + + + + SqlTableModel + + + Error while commiting new row: %1 + Błąd podczas zatwierdzania nowego wiersza: %1 + + + + Error while deleting row from table %1: %2 + Błąd podczas usuwania wiersza z tabeli %1: %2 + + + + StatusField + + + Status + Status + + + + Copy + Kopiuj + + + + Clear + Wyczyść + + + + TableConstraintsModel + + + Type + table constraints + Typ + + + + Details + table constraints + Szczegóły + + + + Name + table constraints + Nazwa + + + + TableForeignKeyPanel + + + Foreign table: + Tabela obca: + + + + SQLite 2 does not support foreign keys officially, +but it's okay to use them anyway. + SQLite 2 oficjalnie nie obsługuje kluczy obcych, +ale można ich używać. + + + + Columns + Kolumny + + + + Local column + Kolumna lokalna + + + + Foreign column + Kolumna obca + + + + Reactions + Reakcje + + + + Deferred foreign key + Klucz obcy odroczony + + + + Named constraint + Nazwane ograniczenie + + + + Constraint name + Nazwa ograniczenia + + + + Pick the foreign column. + Wybierz kolumnę obcą + + + + Pick the foreign table. + Wybierz tabelę obcą + + + + Select at least one foreign column. + Wybierz przynajmnie jedną kolumnę obcą. + + + + Enter a name of the constraint. + Wprowadź nazwę ograniczenia. + + + + Foreign column + table constraints + Kolumna obca + + + + TablePrimaryKeyAndUniquePanel + + + Columns + Kolumny + + + + Column + Kolumna + + + + Collation + Zestawienie + + + + Sort + Sortowanie + + + + Valid only for a single column with INTEGER data type + Dozwolone tylko dla jednej kolumny o typie danych INTEGER + + + + Autoincrement + Autoinkrementacja + + + + Named constraint + Nazwane ograniczenie + + + + Constraint name + Nazwa ograniczenia + + + + On conflict + W razie konfliktu + + + + Collate + table constraints + Zestawienie + + + + Sort order + table constraints + Kierunek sortowania + + + + Select at least one column. + Zaznacz przynajmniej jedną kolumnę. + + + + Enter a name of the constraint. + Wprowadź nazwę ograniczenia. + + + + TableStructureModel + + + Name + table structure columns + Nazwa + + + + Data type + table structure columns + Typ danych + + + + Default value + table structure columns + Domyślna wartość + + + + TableWindow + + + Structure + Struktura + + + + Table name: + Nazwa tabeli: + + + + Data + Dane + + + + Constraints + Ograniczenia + + + + Indexes + Indeksy + + + + Triggers + Wyzwalacze + + + + DDL + DDL + + + + Export table + table window + Eksportuj tabelę + + + + Import data to table + table window + Importuj do tabeli + + + + Populate table + table window + Zaludnij tabelę + + + + Refresh structure + table window + Odśwież strukturę + + + + Commit structure changes + table window + Zatwierdź zmiany w strukturze + + + + Rollback structure changes + table window + Wycofaj zmiany w strukturze + + + + Add column + table window + Dodaj kolumnę + + + + Edit column + table window + Edytuj kolumnę + + + + + Delete column + table window + Usuń kolumnę + + + + Move column up + table window + Przesuń kolumnę w górę + + + + Move column down + table window + Przesuń kolumnę w dół + + + + Create similar table + table window + Utwórz podobną tabelę + + + + Reset autoincrement value + table window + Wyzeruj wartość autoinkrementacji + + + + Add table constraint + table window + Dodaj ograniczenie tabeli + + + + Edit table constraint + table window + Edytuj ograniczenie tabeli + + + + Delete table constraint + table window + Usuń ograniczenie tabeli + + + + Move table constraint up + table window + Przesuń ograniczenie tabeli w górę + + + + Move table constraint down + table window + Przesuń ograniczenie tabeli w dół + + + + Add table primary key + table window + Dodaj klucz główny tabeli + + + + Add table foreign key + table window + Dodaj klucz obcy tabeli + + + + Add table unique constraint + table window + Dodaj ograniczenie unikalnych wartości tabeli + + + + Add table check constraint + table window + Dodaj ograniczenie warunkiem tabeli + + + + Refresh index list + table window + Odśwież listę indeksów + + + + Create index + table window + Utwórz indeks + + + + Edit index + table window + Edytuj indeks + + + + Delete index + table window + Usuń indeks + + + + Refresh trigger list + table window + Odśwież listę wyzwalaczy + + + + Create trigger + table window + Utwórz wyzwalacz + + + + Edit trigger + table window + Edytuj wyzwalacz + + + + Delete trigger + table window + Usuń wyzwalacz + + + + Are you sure you want to delete column '%1'? + table window + Czy na pewno chcesz usunąć kolumnę '%1'? + + + + Following problems will take place while modifying the table. +Would you like to proceed? + table window + Następujące problemy wystąpią podczas modyfikacji tabeli. +Czy chcesz kontynuować? + + + + Table modification + table window + Modyfikacja tabeli + + + + Could not load data for table %1. Error details: %2 + Nie udało się załadować danych dla tabeli %1. Szczegóły błędu: %2 + + + + Could not process the %1 table correctly. Unable to open a table window. + Nie udało się przetworzyć poprawnie tabeli %1. Nie można otworzyć okna tabeli. + + + + Could not restore window, because database %1 could not be resolved. + Nie można przywrócić okna, ponieważ nie znaleziono bazy danych %1. + + + + Could not restore window, because the table %1 doesn't exist in the database %2. + Nie można przywrócić okna, ponieważ tabela %1 już nie jestnieje w bazie danych %2. + + + + + New table %1 + Nowa tabela %1 + + + + Could not commit table structure. Error message: %1 + table window + Nie udało się zatwierdzić struktury tabeli. Treść błędu: %1 + + + + Reset autoincrement + Wyzeruj autoinkrementację + + + + Are you sure you want to reset autoincrement value for table '%1'? + Czy na pewno chcesz wyzerować wartość autoinkrementacji dla tabeli '%1'? + + + + An error occurred while trying to reset autoincrement value for table '%1': %2 + Wystąpił błąd podczas próby wyzerowania wartości autoinkrementacji dla tabeli '%1': %2 + + + + Autoincrement value for table '%1' has been reset successfly. + Wartość autoinkrementacji dla tabeli '%1' została pomyślnie wyzerowana. + + + + Empty name + Pusta nazwa + + + + A blank name for the table is allowed in SQLite, but it is not recommended. +Are you sure you want to create a table with blank name? + Pusta nazwa dla tabeli jest dozwolona w SQLite, ale nie jest zalecana. +Czy na pewno chcesz utworzyć tabelę o pustej nazwie? + + + + Cannot create a table without at least one column. + Nie można utworzyć tabeli bez przynajmniej jednej kolumny. + + + + Cannot create table %1, if it has no primary key defined. Either uncheck the %2, or define a primary key. + Nie można utworzyć tabeli %1, jeśli nie ma zdefiniowanego klucza głównego. Albo udznacz %2, albo zdefiniuj klucz główny. + + + + Cannot use autoincrement for primary key when %1 clause is used. Either uncheck the %2, or the autoincrement in a primary key. + Nie można użyć autoinkrementacji dla klucza głównego, kiedy klauzula %1 jest użyta. Albo odnacz %2, albo autonkrementację w kluczu głównym. + + + + Are you sure you want to delete table constraint '%1'? + table window + Czy na pewno chcesz usunąć ograniczenie tabeli '%1'? + + + + Delete constraint + table window + Usuń ograniczenie + + + + Cannot export, because no export plugin is loaded. + Nie można wyeksportować, ponieważ żadna wtyczka eksportu nie została załadowana. + + + + Cannot import, because no import plugin is loaded. + Nie można zaimportować, ponieważ żadna wtyczka importu nie została załadowana. + + + + Uncommited changes + Niezatwierdzone dane + + + + There are uncommited structure modifications. You cannot browse or edit data until you have table structure settled. +Do you want to commit the structure, or do you want to go back to the structure tab? + Zmiany w strukturze nie zostały zatwierdzone. Nie można przeglądać, ani edytować danych, dopóki struktura tabeli nie zostanie ustalona. +Czy chcesz zatwierdzić strukturę, czy jednak chcesz wrócić do karty struktury? + + + + Go back to structure tab + Wróć do karty struktury + + + + Commit modifications and browse data. + Zatwierdź modyfikacje i przeglądaj dane. + + + + Name + table window indexes + Nazwa + + + + Unique + table window indexes + Wartości unikalne + + + + Columns + table window indexes + Kolumny + + + + Partial index condition + table window indexes + Warunek indeksu częściowego: + + + + Name + table window triggers + Nazwa + + + + Event + table window triggers + Zdarzenie + + + + Condition + table window triggers + Warunek + + + + Details + table window triggers + Szczegóły + + + + Table window "%1" has uncommited structure modifications and data. + Okno tabeli "%1" ma niezatwierdzone modyfikacje struktury i danych. + + + + Table window "%1" has uncommited data. + Okno tabeli "%1" ma niezatwierdzone dane. + + + + Table window "%1" has uncommited structure modifications. + Okno tabeli "%1" ma niezatwierdzone modyfikacje struktury. + + + + TriggerColumnsDialog + + + Trigger columns + Kolumny wyzwalacza + + + + Triggering columns: + Kolumny wyzwalające: + + + + TriggerDialog + + + + Trigger + Wyzwalacz + + + + On table: + Na tabeli: + + + + Action: + Akcja: + + + + + <p>SQL condition that will be evaluated before the actual trigger code. In case the condition returns false, the trigger will not be fired for that row.</p> + <p>Warunek SQL, który będzie wykonany przed właściwym kodem wyzwalacza. W przypadku gdy warunek zwróci fałsz, wyzwalacz nie zostanie uruchomiony dla tego wiersza.</p> + + + + Pre-condition: + Warunek wstępny: + + + + The scope is still not fully supported by the SQLite database. + Zakres wciąż nie jest w pełni obsługiwany przez bazy danych SQLite. + + + + Trigger name: + Nazwa wyzwalacza: + + + + When: + Kiedy: + + + + List of columns for UPDATE OF action. + Lista kolumn dla akcji UPDATE OF. + + + + Scope: + Zakres: + + + + Code: + Kod: + + + + Trigger statements to be executed. + Zapytania wyzwalacz do wykonania. + + + + DDL + DDL + + + + On view: + Na widoku: + + + + Could not process trigger %1 correctly. Unable to open a trigger dialog. + Nie udało się przetworzyć poprawnie wyzwalacza %1. Nie można otworzyć okna wyzwalacza. + + + + Enter a valid condition. + Wprowadź poprawny warunek. + + + + Enter a valid trigger code. + Wprowadź poprawny kod wyzwalacza. + + + + Error + trigger dialog + Błąd + + + + An error occurred while executing SQL statements: +%1 + Wystąpił błąd podczas wykonywania zapytań SQL: +%1 + + + + VersionConvertSummaryDialog + + + Database version convert + Konwersja bazy danych + + + + Following changes to the SQL statements will be made: + Dokonane będą następujące zmiany w zapytaniach SQL: + + + + Before + Przed + + + + After + Po + + + + ViewWindow + + + Query + Zapytanie + + + + View name: + Nazwa widoku: + + + + Data + Dane + + + + Triggers + Wyzwalacze + + + + DDL + DDL + + + + Could not restore window, because database %1 could not be resolved. + Nie można przywrócić okna, ponieważ nie znaleziono bazy danych %1. + + + + Could not restore window, because database %1 could not be open. + Nie można przywrócić okna, ponieważ nie udało się otworzyć bazy danych %1. + + + + Could not restore window, because the view %1 doesn't exist in the database %2. + Nie można przywrócić okna, ponieważ widok %1 już nie jestnieje w bazie danych %2. + + + + + New view %1 + Nowy widok %1 + + + + Refresh the view + view window + Odśwież widok + + + + Commit the view changes + view window + Zatwierdź zmiany w widoku + + + + Rollback the view changes + view window + Wycofaj zmiany w widoku + + + + Refresh trigger list + view window + Odśwież listę wyzwalaczy + + + + Create new trigger + view window + Utwórz nowy wyzwalacz + + + + Edit selected trigger + view window + Edytuj wybrany wyzwalacz + + + + Delete selected trigger + view window + Usuń wybrany wyzwalacz + + + + View window "%1" has uncommited structure modifications and data. + Okno widoku "%1" ma niezatwierdzone modyfikacje struktury i danych. + + + + View window "%1" has uncommited data. + Okno widoku "%1" ma niezatwierdzone dane. + + + + View window "%1" has uncommited structure modifications. + Okno widoku "%1" ma niezatwierdzone modyfikacje struktury. + + + + Could not load data for view %1. Error details: %2 + Nie udało się załadować danych dla widoku %1. Szczegóły błędu: %2 + + + + Uncommited changes + Niezatwierdzone dane + + + + There are uncommited structure modifications. You cannot browse or edit data until you have the view structure settled. +Do you want to commit the structure, or do you want to go back to the structure tab? + Zmiany w strukturze nie zostały zatwierdzone. Nie można przeglądać, ani edytować danych, dopóki struktura widoku nie zostanie ustalona. +Czy chcesz zatwierdzić strukturę, czy jednak chcesz wrócić do karty struktury? + + + + Go back to structure tab + Wróć do karty struktury + + + + Commit modifications and browse data. + Zatwierdź modyfikacje i przeglądaj dane. + + + + Could not commit view changes. Error message: %1 + view window + Nie udało się zatwierdzić widoku. Treść błędu: %1 + + + + Name + view window triggers + Nazwa + + + + Instead of + view window triggers + Zamiast + + + + Condition + view window triggers + Warunek + + + + Details + table window triggers + Szczegóły + + + + Could not process the %1 view correctly. Unable to open a view window. + Nie udało się przetworzyć poprawnie widoku %1. Nie można otworzyć okna widoku. + + + + Empty name + Pusta nazwa + + + + A blank name for the view is allowed in SQLite, but it is not recommended. +Are you sure you want to create a view with blank name? + Pusta nazwa dla widoku jest dozwolona w SQLite, ale nie jest zalecana. +Czy na pewno chcesz utworzyć widok o pustej nazwie? + + + + The SELECT statement could not be parsed. Please correct the query and retry. +Details: %1 + Zapytanie SELECT nie mogło być poprawnie przeanalizowane. Proszę poprawić zapytanie i spróbować ponownie. +Szczegóły: %1 + + + + The view could not be modified due to internal SQLiteStudio error. Please report this! + Widok nie mógł być zmodyfikowany w związku z wewnętrznym błędem SQLiteStudio. Proszę to zgłosić! + + + + The view code could not be parsed properly for execution. This is a SQLiteStudio's bug. Please report it. + Kod widok nie mógł być poprawnie przeanalizowany. To jest błąd SQLiteStudio Proszę to zgłosić! + + + + Following problems will take place while modifying the view. +Would you like to proceed? + view window + Następujące problemy wystąpią podczas modyfikacji widoku. +Czy chcesz kontynuować? + + + + View modification + view window + Modyfikacja widoku + + + + WidgetCover + + + Interrupt + Przerwij + + + diff --git a/SQLiteStudio3/guiSQLiteStudio/uiconfig.h b/SQLiteStudio3/guiSQLiteStudio/uiconfig.h index 608ce47..e6cfea2 100644 --- a/SQLiteStudio3/guiSQLiteStudio/uiconfig.h +++ b/SQLiteStudio3/guiSQLiteStudio/uiconfig.h @@ -80,6 +80,7 @@ CFG_CATEGORIES(Ui, CFG_ENTRY(Cfg::DataEditorsOrder, DataEditorsOrder, Cfg::DataEditorsOrder()) CFG_ENTRY(QString, FileDialogLastPath, QString()) CFG_ENTRY(int, MaxInitialColumnWith, 600) + CFG_ENTRY(bool, LanguageAsked, false) ) ) diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/bugreporthistorywindow.ui b/SQLiteStudio3/guiSQLiteStudio/windows/bugreporthistorywindow.ui index 3218822..2211ec2 100644 --- a/SQLiteStudio3/guiSQLiteStudio/windows/bugreporthistorywindow.ui +++ b/SQLiteStudio3/guiSQLiteStudio/windows/bugreporthistorywindow.ui @@ -11,7 +11,7 @@ - Form + Form diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/collationseditor.ui b/SQLiteStudio3/guiSQLiteStudio/windows/collationseditor.ui index 635ae59..98e7ddb 100644 --- a/SQLiteStudio3/guiSQLiteStudio/windows/collationseditor.ui +++ b/SQLiteStudio3/guiSQLiteStudio/windows/collationseditor.ui @@ -11,7 +11,7 @@ - Form + Form diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/ddlhistorywindow.ui b/SQLiteStudio3/guiSQLiteStudio/windows/ddlhistorywindow.ui index 6591198..33cdb66 100644 --- a/SQLiteStudio3/guiSQLiteStudio/windows/ddlhistorywindow.ui +++ b/SQLiteStudio3/guiSQLiteStudio/windows/ddlhistorywindow.ui @@ -11,7 +11,7 @@ - Form + Form diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.cpp b/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.cpp index 7856a5e..590a2fd 100644 --- a/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.cpp @@ -17,13 +17,13 @@ #include "parser/lexer.h" #include "common/utils_sql.h" #include "parser/parser.h" +#include "dbobjectdialogs.h" +#include "dialogs/exportdialog.h" #include #include #include #include #include -#include -#include CFG_KEYS_DEFINE(EditorWindow) EditorWindow::ResultsDisplayMode EditorWindow::resultsDisplayMode; @@ -94,6 +94,10 @@ void EditorWindow::init() initActions(); updateShortcutTips(); + Db* treeSelectedDb = DBTREE->getSelectedOpenDb(); + if (treeSelectedDb) + dbCombo->setCurrentIndex(dbComboModel->getIndexForDb(treeSelectedDb)); + Db* currentDb = getCurrentDb(); resultsModel->setDb(currentDb); ui->sqlEdit->setDb(currentDb); @@ -484,7 +488,16 @@ void EditorWindow::executionSuccessful() { double secs = ((double)resultsModel->getExecutionTime()) / 1000; QString time = QString::number(secs, 'f', 3); - notifyInfo(tr("Query finished in %2 second(s).").arg(time)); + + if (resultsModel->wasDataModifyingQuery()) + { + QString rowsAffected = QString::number(resultsModel->getTotalRowsAffected()); + notifyInfo(tr("Query finished in %1 second(s). Rows affected: %2").arg(time, rowsAffected)); + } + else + { + notifyInfo(tr("Query finished in %1 second(s).").arg(time)); + } lastQueryHistoryId = CFG->addSqlHistory(resultsModel->getQuery(), resultsModel->getDb()->getName(), resultsModel->getExecutionTime(), 0); diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.h b/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.h index 0052a74..4666386 100644 --- a/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.h +++ b/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.h @@ -25,7 +25,7 @@ class SqlEditor; CFG_KEY_LIST(EditorWindow, QObject::tr("SQL editor window"), CFG_KEY_ENTRY(EXEC_QUERY, Qt::Key_F9, QObject::tr("Execute query")) - CFG_KEY_ENTRY(EXPLAIN_QUERY, Qt::Key_F8, QObject::tr("Execute \"EXPLAIN\" query")) + CFG_KEY_ENTRY(EXPLAIN_QUERY, Qt::Key_F8, QObject::tr("Execute \"%1\" query").arg("EXPLAIN")) CFG_KEY_ENTRY(PREV_DB, Qt::CTRL + Qt::Key_Up, QObject::tr("Switch current working database to previous on the list")) CFG_KEY_ENTRY(NEXT_DB, Qt::CTRL + Qt::Key_Down, QObject::tr("Switch current working database to next on the list")) CFG_KEY_ENTRY(SHOW_NEXT_TAB, Qt::ALT + Qt::Key_Right, QObject::tr("Go to next editor tab")) diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.ui b/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.ui index b0d598b..51d5503 100644 --- a/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.ui +++ b/SQLiteStudio3/guiSQLiteStudio/windows/editorwindow.ui @@ -11,10 +11,19 @@ - SQL editor + SQL editor - + + 0 + + + 0 + + + 0 + + 0 @@ -42,7 +51,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -59,7 +77,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -115,6 +142,11 @@ + + SqlView + QPlainTextEdit +
sqlview.h
+
DataView QTabWidget @@ -126,11 +158,6 @@ QPlainTextEdit
sqleditor.h
- - SqlView - QPlainTextEdit -
sqlview.h
-
diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/functionseditor.ui b/SQLiteStudio3/guiSQLiteStudio/windows/functionseditor.ui index d5d5015..45d291d 100644 --- a/SQLiteStudio3/guiSQLiteStudio/windows/functionseditor.ui +++ b/SQLiteStudio3/guiSQLiteStudio/windows/functionseditor.ui @@ -11,7 +11,7 @@ - Form + Form diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.cpp b/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.cpp index 56accd0..1b47433 100644 --- a/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.cpp @@ -208,6 +208,7 @@ void TableWindow::createStructureActions() ui->structureToolBar->addAction(actionMap[POPULATE]); ui->structureToolBar->addSeparator(); createAction(CREATE_SIMILAR, ICONS.TABLE_CREATE_SIMILAR, tr("Create similar table", "table window"), this, SLOT(createSimilarTable()), ui->structureToolBar); + createAction(RESET_AUTOINCREMENT, ICONS.RESET_AUTOINCREMENT, tr("Reset autoincrement value", "table window"), this, SLOT(resetAutoincrement()), ui->structureToolBar); // Table constraints createAction(ADD_TABLE_CONSTRAINT, ICONS.TABLE_CONSTRAINT_ADD, tr("Add table constraint", "table window"), this, SLOT(addConstraint()), ui->tableConstraintsToolbar, ui->tableConstraintsView); @@ -834,6 +835,24 @@ void TableWindow::rollbackStructure() updateStructureCommitState(); updateStructureToolbarState(); updateTableConstraintsToolbarState(); + updateDdlTab(); +} + +void TableWindow::resetAutoincrement() +{ + if (!existingTable) + return; + + QMessageBox::StandardButton btn = QMessageBox::question(this, tr("Reset autoincrement"), tr("Are you sure you want to reset autoincrement value for table '%1'?") + .arg(table)); + if (btn != QMessageBox::Yes) + return; + + SqlQueryPtr res = db->exec("DELETE FROM sqlite_sequence WHERE name = ?;", {table}); + if (res->isError()) + notifyError(tr("An error occurred while trying to reset autoincrement value for table '%1': %2").arg(table, res->getErrorText())); + else + notifyInfo(tr("Autoincrement value for table '%1' has been reset successfly.").arg(table)); } void TableWindow::addColumn() @@ -947,15 +966,15 @@ bool TableWindow::validate(bool skipWarning) if (!hasPk) { - notifyError(tr("Cannot create table without ROWID, if it has no PRIMARY KEY defined." - " Either uncheck the WITHOUT ROWID, or define a PRIMARY KEY.")); + notifyError(tr("Cannot create table %1, if it has no primary key defined." + " Either uncheck the %2, or define a primary key.").arg("WITHOUT ROWID", "WITHOUT ROWID")); return false; } if (isPkAutoIncr) { - notifyError(tr("Cannot use AUTOINCREMENT for PRIMARY KEY when WITHOUT ROWID clause is used." - " Either uncheck the WITHOUT ROWID, or the AUTOINCREMENT in a PRIMARY KEY.")); + notifyError(tr("Cannot use autoincrement for primary key when %1 clause is used." + " Either uncheck the %2, or the autoincrement in a primary key.").arg("WITHOUT ROWID", "WITHOUT ROWID")); return false; } } @@ -1023,9 +1042,12 @@ void TableWindow::applyInitialTab() void TableWindow::updateDdlTab() { - CodeFormatter* formatter = SQLITESTUDIO->getCodeFormatter(); createTable->rebuildTokens(); - ui->ddlEdit->setPlainText(formatter->format("sql", createTable->detokenize(), db)); + QString ddl = createTable->detokenize(); + if (createTable->columns.size() > 0) + ddl = SQLITESTUDIO->getCodeFormatter()->format("sql", ddl, db); + + ui->ddlEdit->setPlainText(ddl); } void TableWindow::updateNewTableState() @@ -1037,6 +1059,7 @@ void TableWindow::updateNewTableState() actionMap[IMPORT]->setEnabled(existingTable); actionMap[POPULATE]->setEnabled(existingTable); actionMap[CREATE_SIMILAR]->setEnabled(existingTable); + actionMap[RESET_AUTOINCREMENT]->setEnabled(existingTable); actionMap[REFRESH_STRUCTURE]->setEnabled(existingTable); } diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.h b/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.h index b0ee1e3..54d544f 100644 --- a/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.h +++ b/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.h @@ -79,6 +79,7 @@ class GUI_API_EXPORT TableWindow : public MdiChild IMPORT, POPULATE, CREATE_SIMILAR, + RESET_AUTOINCREMENT, // Indexes tab REFRESH_INDEXES, ADD_INDEX, @@ -189,6 +190,7 @@ class GUI_API_EXPORT TableWindow : public MdiChild void changesSuccessfullyCommited(); void changesFailedToCommit(int errorCode, const QString& errorText); void rollbackStructure(); + void resetAutoincrement(); void editColumn(); void delColumn(); void moveColumnUp(); diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.ui b/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.ui index 8c46443..f1fe409 100644 --- a/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.ui +++ b/SQLiteStudio3/guiSQLiteStudio/windows/tablewindow.ui @@ -11,7 +11,7 @@ - Form + Form @@ -74,7 +74,7 @@ - WITHOUT ROWID + WITHOUT ROWID diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.cpp b/SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.cpp index a37f387..a699801 100644 --- a/SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.cpp +++ b/SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.cpp @@ -284,9 +284,9 @@ void ViewWindow::createTriggersTabActions() { createAction(REFRESH_TRIGGERS, ICONS.RELOAD, tr("Refresh trigger list", "view window"), this, SLOT(refreshTriggers()), ui->triggersToolbar, ui->triggersList); ui->triggersToolbar->addSeparator(); - createAction(ADD_TRIGGER, ICONS.TRIGGER_ADD, tr("Create new triger", "view window"), this, SLOT(addTrigger()), ui->triggersToolbar, ui->triggersList); - createAction(EDIT_TRIGGER, ICONS.TRIGGER_EDIT, tr("Edit selected triger", "view window"), this, SLOT(editTrigger()), ui->triggersToolbar, ui->triggersList); - createAction(DEL_TRIGGER, ICONS.TRIGGER_DEL, tr("Delete selected triger", "view window"), this, SLOT(deleteTrigger()), ui->triggersToolbar, ui->triggersList); + createAction(ADD_TRIGGER, ICONS.TRIGGER_ADD, tr("Create new trigger", "view window"), this, SLOT(addTrigger()), ui->triggersToolbar, ui->triggersList); + createAction(EDIT_TRIGGER, ICONS.TRIGGER_EDIT, tr("Edit selected trigger", "view window"), this, SLOT(editTrigger()), ui->triggersToolbar, ui->triggersList); + createAction(DEL_TRIGGER, ICONS.TRIGGER_DEL, tr("Delete selected trigger", "view window"), this, SLOT(deleteTrigger()), ui->triggersToolbar, ui->triggersList); } QString ViewWindow::getView() const { diff --git a/SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.ui b/SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.ui index 734a265..94f5ea7 100644 --- a/SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.ui +++ b/SQLiteStudio3/guiSQLiteStudio/windows/viewwindow.ui @@ -11,10 +11,19 @@ - Form + Form - + + 0 + + + 0 + + + 0 + + 0 @@ -33,7 +42,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -115,6 +133,11 @@ + + SqlView + QPlainTextEdit +
sqlview.h
+
DataView QTabWidget @@ -126,11 +149,6 @@ QPlainTextEdit
sqleditor.h
- - SqlView - QPlainTextEdit -
sqlview.h
-
-- cgit v1.2.3