diff --git a/CMakeLists.txt b/CMakeLists.txt index 6fd3a516..0419659e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,7 +81,7 @@ set(SQLB_HDR set(SQLB_MOC_HDR src/sqlitedb.h src/AboutDialog.h - src/CreateIndexDialog.h + src/EditIndexDialog.h src/EditDialog.h src/EditTableDialog.h src/ExportDataDialog.h @@ -110,7 +110,7 @@ set(SQLB_MOC_HDR set(SQLB_SRC src/AboutDialog.cpp - src/CreateIndexDialog.cpp + src/EditIndexDialog.cpp src/EditDialog.cpp src/EditTableDialog.cpp src/ExportDataDialog.cpp @@ -145,7 +145,7 @@ set(SQLB_SRC set(SQLB_FORMS src/AboutDialog.ui - src/CreateIndexDialog.ui + src/EditIndexDialog.ui src/EditDialog.ui src/EditTableDialog.ui src/ExportDataDialog.ui diff --git a/src/CreateIndexDialog.cpp b/src/EditIndexDialog.cpp similarity index 92% rename from src/CreateIndexDialog.cpp rename to src/EditIndexDialog.cpp index 61dfaed2..09b2f939 100644 --- a/src/CreateIndexDialog.cpp +++ b/src/EditIndexDialog.cpp @@ -1,17 +1,17 @@ -#include "CreateIndexDialog.h" -#include "ui_CreateIndexDialog.h" +#include "EditIndexDialog.h" +#include "ui_EditIndexDialog.h" #include "sqlitedb.h" #include #include -CreateIndexDialog::CreateIndexDialog(DBBrowserDB& db, const QString& indexName, bool createIndex, QWidget* parent) +EditIndexDialog::EditIndexDialog(DBBrowserDB& db, const QString& indexName, bool createIndex, QWidget* parent) : QDialog(parent), pdb(db), curIndex(indexName), index(indexName), newIndex(createIndex), - ui(new Ui::CreateIndexDialog) + ui(new Ui::EditIndexDialog) { // Create UI ui->setupUi(this); @@ -54,12 +54,12 @@ CreateIndexDialog::CreateIndexDialog(DBBrowserDB& db, const QString& indexName, updateSqlText(); } -CreateIndexDialog::~CreateIndexDialog() +EditIndexDialog::~EditIndexDialog() { delete ui; } -void CreateIndexDialog::tableChanged(const QString& new_table, bool initialLoad) +void EditIndexDialog::tableChanged(const QString& new_table, bool initialLoad) { // Set the table name and clear all index columns if(!initialLoad) @@ -125,7 +125,7 @@ void CreateIndexDialog::tableChanged(const QString& new_table, bool initialLoad) updateSqlText(); } -void CreateIndexDialog::checkInput() +void EditIndexDialog::checkInput() { // Check if index name is set bool valid = true; @@ -145,7 +145,7 @@ void CreateIndexDialog::checkInput() updateSqlText(); } -void CreateIndexDialog::accept() +void EditIndexDialog::accept() { // When editing an index, delete the old one first if(!newIndex) @@ -164,7 +164,7 @@ void CreateIndexDialog::accept() QMessageBox::warning(this, QApplication::applicationName(), tr("Creating the index failed:\n%1").arg(pdb.lastError())); } -void CreateIndexDialog::updateSqlText() +void EditIndexDialog::updateSqlText() { ui->sqlTextEdit->setText(index.sql()); } diff --git a/src/CreateIndexDialog.h b/src/EditIndexDialog.h similarity index 56% rename from src/CreateIndexDialog.h rename to src/EditIndexDialog.h index 06bdc2c1..caf2e3b3 100644 --- a/src/CreateIndexDialog.h +++ b/src/EditIndexDialog.h @@ -1,5 +1,5 @@ -#ifndef CREATEINDEXDIALOG_H -#define CREATEINDEXDIALOG_H +#ifndef EDITINDEXDIALOG_H +#define EDITINDEXDIALOG_H #include "sqlitetypes.h" @@ -8,16 +8,16 @@ class DBBrowserDB; namespace Ui { -class CreateIndexDialog; +class EditIndexDialog; } -class CreateIndexDialog : public QDialog +class EditIndexDialog : public QDialog { Q_OBJECT public: - explicit CreateIndexDialog(DBBrowserDB& db, const QString& indexName, bool createIndex, QWidget* parent = 0); - ~CreateIndexDialog(); + explicit EditIndexDialog(DBBrowserDB& db, const QString& indexName, bool createIndex, QWidget* parent = 0); + ~EditIndexDialog(); private slots: void accept(); @@ -29,7 +29,7 @@ private: QString curIndex; sqlb::Index index; bool newIndex; - Ui::CreateIndexDialog* ui; + Ui::EditIndexDialog* ui; void updateSqlText(); }; diff --git a/src/CreateIndexDialog.ui b/src/EditIndexDialog.ui similarity index 94% rename from src/CreateIndexDialog.ui rename to src/EditIndexDialog.ui index 8dabbcf3..7ad3d399 100644 --- a/src/CreateIndexDialog.ui +++ b/src/EditIndexDialog.ui @@ -1,7 +1,7 @@ - CreateIndexDialog - + EditIndexDialog + 0 @@ -11,7 +11,7 @@ - Create New Index + Edit Index Schema @@ -177,7 +177,7 @@ buttonBox accepted() - CreateIndexDialog + EditIndexDialog accept() @@ -193,7 +193,7 @@ buttonBox rejected() - CreateIndexDialog + EditIndexDialog reject() @@ -209,7 +209,7 @@ comboTableName currentIndexChanged(QString) - CreateIndexDialog + EditIndexDialog tableChanged(QString) @@ -225,7 +225,7 @@ editIndexName textChanged(QString) - CreateIndexDialog + EditIndexDialog checkInput() @@ -241,7 +241,7 @@ tableIndexColumns cellChanged(int,int) - CreateIndexDialog + EditIndexDialog checkInput() @@ -257,7 +257,7 @@ checkIndexUnique toggled(bool) - CreateIndexDialog + EditIndexDialog checkInput() diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 8b61af70..fbb5d781 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -1,7 +1,7 @@ #include "MainWindow.h" #include "ui_MainWindow.h" -#include "CreateIndexDialog.h" +#include "EditIndexDialog.h" #include "AboutDialog.h" #include "EditTableDialog.h" #include "ImportCsvDialog.h" @@ -724,7 +724,7 @@ void MainWindow::createIndex() return; } - CreateIndexDialog dialog(db, "", true, this); + EditIndexDialog dialog(db, "", true, this); if(dialog.exec()) populateTable(); } @@ -773,7 +773,7 @@ void MainWindow::editObject() if(dialog.exec()) populateTable(); } else if(type == "index") { - CreateIndexDialog dialog(db, name, false, this); + EditIndexDialog dialog(db, name, false, this); if(dialog.exec()) populateTable(); } diff --git a/src/src.pro b/src/src.pro index 3c2897f4..404d77cd 100644 --- a/src/src.pro +++ b/src/src.pro @@ -23,7 +23,7 @@ CONFIG(unittest) { HEADERS += \ sqlitedb.h \ MainWindow.h \ - CreateIndexDialog.h \ + EditIndexDialog.h \ AboutDialog.h \ EditTableDialog.h \ Settings.h \ @@ -59,7 +59,7 @@ HEADERS += \ SOURCES += \ sqlitedb.cpp \ MainWindow.cpp \ - CreateIndexDialog.cpp \ + EditIndexDialog.cpp \ EditTableDialog.cpp \ Settings.cpp \ PreferencesDialog.cpp \ @@ -96,7 +96,7 @@ RESOURCES += icons/icons.qrc \ FORMS += \ MainWindow.ui \ - CreateIndexDialog.ui \ + EditIndexDialog.ui \ AboutDialog.ui \ EditTableDialog.ui \ PreferencesDialog.ui \ diff --git a/src/translations/sqlb_ar_SA.ts b/src/translations/sqlb_ar_SA.ts index 2467ba14..95796036 100644 --- a/src/translations/sqlb_ar_SA.ts +++ b/src/translations/sqlb_ar_SA.ts @@ -230,49 +230,49 @@ If any of the other settings were altered for this database file you need to pro - CreateIndexDialog + EditIndexDialog - + Create New Index إنشاء فهرس جديد - + &Name الا&سم - + &Columns الأ&عمدة - + Column العمود - + Use in Index استخدمه في الفهرس - + Order التّرتيب - + &Table ال&جدول - + &Unique &فريد - + Creating the index failed: %1 فشل إنشاء الفهرس: diff --git a/src/translations/sqlb_de.ts b/src/translations/sqlb_de.ts index 1e896c08..45def914 100644 --- a/src/translations/sqlb_de.ts +++ b/src/translations/sqlb_de.ts @@ -245,50 +245,50 @@ Falls weitere Einstellungen für diese Datenbank-Datei vorgenommen worden sind, - CreateIndexDialog + EditIndexDialog - + Create New Index Neuen Index erstellen - + &Name &Name - + &Columns character after ampersand changed &Spalten - + Column Spalte - + Use in Index Im Index verwenden - + Order Sortierung - + &Table &Tabelle - + &Unique Einde&utig - + Creating the index failed: %1 Erstellen des Index fehlgeschlagen: diff --git a/src/translations/sqlb_en_GB.ts b/src/translations/sqlb_en_GB.ts index c4f707b4..46bd48e4 100644 --- a/src/translations/sqlb_en_GB.ts +++ b/src/translations/sqlb_en_GB.ts @@ -224,49 +224,49 @@ If any of the other settings were altered for this database file you need to pro - CreateIndexDialog + EditIndexDialog - + Create New Index - + &Name - + &Columns - + Column - + Use in Index - + Order - + &Table - + &Unique - + Creating the index failed: %1 diff --git a/src/translations/sqlb_es_ES.ts b/src/translations/sqlb_es_ES.ts index a4298b92..4ca8ead6 100644 --- a/src/translations/sqlb_es_ES.ts +++ b/src/translations/sqlb_es_ES.ts @@ -244,49 +244,49 @@ Si se modificaron cualquiera de los otros ajustes para este archivo de base de d - CreateIndexDialog + EditIndexDialog - + Create New Index Crear un Índice Nuevo - + &Name &Nombre - + &Columns &Columnas - + Column Columna - + Use in Index Usar como Índice - + Order Orden - + &Table &Tabla - + &Unique &Único - + Creating the index failed: %1 Creación de índice fallida: diff --git a/src/translations/sqlb_fr.ts b/src/translations/sqlb_fr.ts index 7f1ae0fa..28c27af7 100644 --- a/src/translations/sqlb_fr.ts +++ b/src/translations/sqlb_fr.ts @@ -253,49 +253,49 @@ Il sera appliqué à chaque valeur avant son affichage. - CreateIndexDialog + EditIndexDialog - + Create New Index Créer un Nouvel Index - + &Name &Nom - + &Columns &Colonnes - + Column Colonne - + Use in Index Utiliser dans l'index - + Order Ordre - + &Table &Table - + &Unique &Unique - + Creating the index failed: %1 La création de l'index a échoué : diff --git a/src/translations/sqlb_ko_KR.ts b/src/translations/sqlb_ko_KR.ts index ad9f2525..e6a22f21 100644 --- a/src/translations/sqlb_ko_KR.ts +++ b/src/translations/sqlb_ko_KR.ts @@ -234,49 +234,49 @@ If any of the other settings were altered for this database file you need to pro - CreateIndexDialog + EditIndexDialog - + Create New Index 새 인덱스 생성하기 - + &Name 이름(&N) - + &Columns 필드(&C) - + Column 필드 - + Use in Index 인덱스 사용 - + Order 정렬순서 - + &Table 테이블(&T) - + &Unique 유니크(&U) - + Creating the index failed: %1 인덱스 생성에 실패했습니다: diff --git a/src/translations/sqlb_pt_BR.ts b/src/translations/sqlb_pt_BR.ts index 0e485ed0..91227755 100644 --- a/src/translations/sqlb_pt_BR.ts +++ b/src/translations/sqlb_pt_BR.ts @@ -201,7 +201,7 @@ O processo de encriptação pode demorar alguns minutos e você deve ter um back - CreateIndexDialog + EditIndexDialog Create New Index Criar novo índice diff --git a/src/translations/sqlb_ru.ts b/src/translations/sqlb_ru.ts index 7f4744a8..8265ebfe 100755 --- a/src/translations/sqlb_ru.ts +++ b/src/translations/sqlb_ru.ts @@ -228,49 +228,49 @@ If any of the other settings were altered for this database file you need to pro - CreateIndexDialog + EditIndexDialog - + Create New Index Создание нового индекса - + &Name &Имя - + &Columns &Столбцы - + Column Столбец - + Use in Index Использовать в индексе - + Order Сортировка - + &Table &Таблица - + &Unique &Уникальный - + Creating the index failed: %1 Ошибка создания индекса: diff --git a/src/translations/sqlb_tr.ts b/src/translations/sqlb_tr.ts index 42255faf..246b2d2e 100644 --- a/src/translations/sqlb_tr.ts +++ b/src/translations/sqlb_tr.ts @@ -233,49 +233,49 @@ Bu veritabanı için herhangi bir başka ayar daha yapılmışsa, bu bilgileri d - CreateIndexDialog + EditIndexDialog - + Create New Index Yeni İndeks Oluştur - + &Name &İsim - + &Columns &Sütunlar - + Column Sütun - + Use in Index İndeksin içinde Kullan - + Order Sırala - + &Table &Tablo - + &Unique Benzersi&z - + Creating the index failed: %1 İndeks oluşturma hatası: %1 diff --git a/src/translations/sqlb_zh.ts b/src/translations/sqlb_zh.ts index f9b0bd10..392fd006 100644 --- a/src/translations/sqlb_zh.ts +++ b/src/translations/sqlb_zh.ts @@ -229,49 +229,49 @@ If any of the other settings were altered for this database file you need to pro - CreateIndexDialog + EditIndexDialog - + Create New Index 创建新索引 - + &Name 名称(&N) - + &Columns 列(&C) - + Column - + Use in Index 在索引中使用 - + Order 顺序 - + &Table 表(&T) - + &Unique 唯一(&U) - + Creating the index failed: %1 创建索引时失败: diff --git a/src/translations/sqlb_zh_TW.ts b/src/translations/sqlb_zh_TW.ts index 5594b956..cacf22c1 100644 --- a/src/translations/sqlb_zh_TW.ts +++ b/src/translations/sqlb_zh_TW.ts @@ -257,49 +257,49 @@ If any of the other settings were altered for this database file you need to pro - CreateIndexDialog + EditIndexDialog - + Create New Index 建立新索引 - + &Name 名稱(&N) - + &Columns 列(&C) - + Column - + Use in Index 在索引中使用 - + Order 順序 - + &Table 資料表(&T) - + &Unique 唯一(&U) - + Creating the index failed: %1 建立索引時失敗: