mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-16 01:37:20 -05:00
Merge pull request #417 from seatedscribe/feature/csv-import-button
Adds a button for CSV import option
This commit is contained in:
commit
e0c6981b40
@ -301,6 +301,7 @@ MainWindow::MainWindow()
|
|||||||
connect(m_ui->welcomeWidget, SIGNAL(openDatabase()), SLOT(switchToOpenDatabase()));
|
connect(m_ui->welcomeWidget, SIGNAL(openDatabase()), SLOT(switchToOpenDatabase()));
|
||||||
connect(m_ui->welcomeWidget, SIGNAL(openDatabaseFile(QString)), SLOT(switchToDatabaseFile(QString)));
|
connect(m_ui->welcomeWidget, SIGNAL(openDatabaseFile(QString)), SLOT(switchToDatabaseFile(QString)));
|
||||||
connect(m_ui->welcomeWidget, SIGNAL(importKeePass1Database()), SLOT(switchToKeePass1Database()));
|
connect(m_ui->welcomeWidget, SIGNAL(importKeePass1Database()), SLOT(switchToKeePass1Database()));
|
||||||
|
connect(m_ui->welcomeWidget, SIGNAL(importCsv()), SLOT(switchToImportCsv()));
|
||||||
|
|
||||||
connect(m_ui->actionAbout, SIGNAL(triggered()), SLOT(showAboutDialog()));
|
connect(m_ui->actionAbout, SIGNAL(triggered()), SLOT(showAboutDialog()));
|
||||||
|
|
||||||
@ -605,6 +606,12 @@ void MainWindow::switchToKeePass1Database()
|
|||||||
switchToDatabases();
|
switchToDatabases();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::switchToImportCsv()
|
||||||
|
{
|
||||||
|
m_ui->tabWidget->importCsv();
|
||||||
|
switchToDatabases();
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::databaseStatusChanged(DatabaseWidget *)
|
void MainWindow::databaseStatusChanged(DatabaseWidget *)
|
||||||
{
|
{
|
||||||
updateTrayIcon();
|
updateTrayIcon();
|
||||||
|
@ -65,6 +65,7 @@ private slots:
|
|||||||
void switchToOpenDatabase();
|
void switchToOpenDatabase();
|
||||||
void switchToDatabaseFile(QString file);
|
void switchToDatabaseFile(QString file);
|
||||||
void switchToKeePass1Database();
|
void switchToKeePass1Database();
|
||||||
|
void switchToImportCsv();
|
||||||
void closePasswordGen();
|
void closePasswordGen();
|
||||||
void databaseStatusChanged(DatabaseWidget *dbWidget);
|
void databaseStatusChanged(DatabaseWidget *dbWidget);
|
||||||
void databaseTabChanged(int tabIndex);
|
void databaseTabChanged(int tabIndex);
|
||||||
|
@ -51,6 +51,7 @@ WelcomeWidget::WelcomeWidget(QWidget* parent)
|
|||||||
connect(m_ui->buttonNewDatabase, SIGNAL(clicked()), SIGNAL(newDatabase()));
|
connect(m_ui->buttonNewDatabase, SIGNAL(clicked()), SIGNAL(newDatabase()));
|
||||||
connect(m_ui->buttonOpenDatabase, SIGNAL(clicked()), SIGNAL(openDatabase()));
|
connect(m_ui->buttonOpenDatabase, SIGNAL(clicked()), SIGNAL(openDatabase()));
|
||||||
connect(m_ui->buttonImportKeePass1, SIGNAL(clicked()), SIGNAL(importKeePass1Database()));
|
connect(m_ui->buttonImportKeePass1, SIGNAL(clicked()), SIGNAL(importKeePass1Database()));
|
||||||
|
connect(m_ui->buttonImportCSV, SIGNAL(clicked()), SIGNAL(importCsv()));
|
||||||
connect(m_ui->recentListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this,
|
connect(m_ui->recentListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this,
|
||||||
SLOT(openDatabaseFromFile(QListWidgetItem*)));
|
SLOT(openDatabaseFromFile(QListWidgetItem*)));
|
||||||
}
|
}
|
||||||
@ -65,4 +66,4 @@ void WelcomeWidget::openDatabaseFromFile(QListWidgetItem* item)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
emit openDatabaseFile(item->text());
|
emit openDatabaseFile(item->text());
|
||||||
}
|
}
|
||||||
|
@ -34,13 +34,14 @@ public:
|
|||||||
~WelcomeWidget();
|
~WelcomeWidget();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void newDatabase();
|
void newDatabase();
|
||||||
void openDatabase();
|
void openDatabase();
|
||||||
void openDatabaseFile(QString);
|
void openDatabaseFile(QString);
|
||||||
void importKeePass1Database();
|
void importKeePass1Database();
|
||||||
|
void importCsv();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void openDatabaseFromFile(QListWidgetItem* item);
|
void openDatabaseFromFile(QListWidgetItem* item);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const QScopedPointer<Ui::WelcomeWidget> m_ui;
|
const QScopedPointer<Ui::WelcomeWidget> m_ui;
|
||||||
|
@ -121,11 +121,22 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="buttonImportKeePass1">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<property name="text">
|
<item>
|
||||||
<string>Import from KeePass 1</string>
|
<widget class="QPushButton" name="buttonImportKeePass1">
|
||||||
</property>
|
<property name="text">
|
||||||
</widget>
|
<string>Import from KeePass 1</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="buttonImportCSV">
|
||||||
|
<property name="text">
|
||||||
|
<string>Import from CSV</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer_2">
|
<spacer name="verticalSpacer_2">
|
||||||
|
Loading…
Reference in New Issue
Block a user