mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Add a button for CSV import option
This commit is contained in:
parent
99036ec151
commit
9307834ef0
@ -301,6 +301,7 @@ MainWindow::MainWindow()
|
||||
connect(m_ui->welcomeWidget, SIGNAL(openDatabase()), SLOT(switchToOpenDatabase()));
|
||||
connect(m_ui->welcomeWidget, SIGNAL(openDatabaseFile(QString)), SLOT(switchToDatabaseFile(QString)));
|
||||
connect(m_ui->welcomeWidget, SIGNAL(importKeePass1Database()), SLOT(switchToKeePass1Database()));
|
||||
connect(m_ui->welcomeWidget, SIGNAL(importCsv()), SLOT(switchToCsvImport()));
|
||||
|
||||
connect(m_ui->actionAbout, SIGNAL(triggered()), SLOT(showAboutDialog()));
|
||||
|
||||
@ -605,6 +606,12 @@ void MainWindow::switchToKeePass1Database()
|
||||
switchToDatabases();
|
||||
}
|
||||
|
||||
void MainWindow::switchToCsvImport()
|
||||
{
|
||||
m_ui->tabWidget->importCsv();
|
||||
switchToDatabases();
|
||||
}
|
||||
|
||||
void MainWindow::databaseStatusChanged(DatabaseWidget *)
|
||||
{
|
||||
updateTrayIcon();
|
||||
|
@ -65,6 +65,7 @@ private slots:
|
||||
void switchToOpenDatabase();
|
||||
void switchToDatabaseFile(QString file);
|
||||
void switchToKeePass1Database();
|
||||
void switchToCsvImport();
|
||||
void closePasswordGen();
|
||||
void databaseStatusChanged(DatabaseWidget *dbWidget);
|
||||
void databaseTabChanged(int tabIndex);
|
||||
|
@ -51,6 +51,7 @@ WelcomeWidget::WelcomeWidget(QWidget* parent)
|
||||
connect(m_ui->buttonNewDatabase, SIGNAL(clicked()), SIGNAL(newDatabase()));
|
||||
connect(m_ui->buttonOpenDatabase, SIGNAL(clicked()), SIGNAL(openDatabase()));
|
||||
connect(m_ui->buttonImportKeePass1, SIGNAL(clicked()), SIGNAL(importKeePass1Database()));
|
||||
connect(m_ui->buttonImportCSV, SIGNAL(clicked()), SIGNAL(importCsv()));
|
||||
connect(m_ui->recentListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this,
|
||||
SLOT(openDatabaseFromFile(QListWidgetItem*)));
|
||||
}
|
||||
@ -65,4 +66,4 @@ void WelcomeWidget::openDatabaseFromFile(QListWidgetItem* item)
|
||||
return;
|
||||
}
|
||||
emit openDatabaseFile(item->text());
|
||||
}
|
||||
}
|
||||
|
@ -34,13 +34,14 @@ public:
|
||||
~WelcomeWidget();
|
||||
|
||||
signals:
|
||||
void newDatabase();
|
||||
void openDatabase();
|
||||
void openDatabaseFile(QString);
|
||||
void importKeePass1Database();
|
||||
void newDatabase();
|
||||
void openDatabase();
|
||||
void openDatabaseFile(QString);
|
||||
void importKeePass1Database();
|
||||
void importCsv();
|
||||
|
||||
private slots:
|
||||
void openDatabaseFromFile(QListWidgetItem* item);
|
||||
void openDatabaseFromFile(QListWidgetItem* item);
|
||||
|
||||
private:
|
||||
const QScopedPointer<Ui::WelcomeWidget> m_ui;
|
||||
|
@ -127,6 +127,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="buttonImportCSV">
|
||||
<property name="text">
|
||||
<string>Import from plain text CSV file</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
|
Loading…
Reference in New Issue
Block a user