mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
@@ -2626,3 +2626,15 @@ void MainWindow::requestCollation(const QString& name, int eTextRep)
|
||||
if(reply == QMessageBox::Yes)
|
||||
sqlite3_create_collation(db._db, name.toUtf8(), eTextRep, nullptr, collCompare);
|
||||
}
|
||||
|
||||
void MainWindow::renameSqlTab(int index)
|
||||
{
|
||||
QString new_name = QInputDialog::getText(this,
|
||||
qApp->applicationName(),
|
||||
tr("Set a new name for the SQL tab. Use the '&' character to allow using the following character as a keyboard shortcut."),
|
||||
QLineEdit::EchoMode::Normal,
|
||||
ui->tabSqlAreas->tabText(index));
|
||||
|
||||
if(!new_name.isNull()) // Don't do anything if the Cancel button was clicked
|
||||
ui->tabSqlAreas->setTabText(index, new_name);
|
||||
}
|
||||
|
||||
@@ -285,6 +285,7 @@ private slots:
|
||||
void hideColumns(int column = -1, bool hide = true);
|
||||
void on_actionShowAllColumns_triggered();
|
||||
void requestCollation(const QString& name, int eTextRep);
|
||||
void renameSqlTab(int index);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2937,6 +2937,22 @@
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>tabSqlAreas</sender>
|
||||
<signal>tabBarDoubleClicked(int)</signal>
|
||||
<receiver>MainWindow</receiver>
|
||||
<slot>renameSqlTab(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>330</x>
|
||||
<y>372</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>518</x>
|
||||
<y>314</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<slots>
|
||||
<slot>fileOpen()</slot>
|
||||
@@ -3005,5 +3021,6 @@
|
||||
<slot>saveSqlResultsAsView()</slot>
|
||||
<slot>changeSqlTab(int)</slot>
|
||||
<slot>hideColumns()</slot>
|
||||
<slot>renameSqlTab(int)</slot>
|
||||
</slots>
|
||||
</ui>
|
||||
|
||||
Reference in New Issue
Block a user