added import files into Profile menu

This commit is contained in:
Rafael 2016-04-13 00:47:07 +02:00
parent 6ff8de8972
commit f35647f76c
5 changed files with 25 additions and 4 deletions

View file

@ -325,8 +325,8 @@ void ProfileInterface::pictureDeleted_f(QWidget *picWidget_)
SnapmaticWidget *picWidget = (SnapmaticWidget*)picWidget_;
SnapmaticPicture *picture = picWidget->getPicture();
if (picWidget->isSelected()) { picWidget->setSelected(false); }
picWidget->close();
widgets.remove(picWidget);
picWidget->close();
picWidget->deleteLater();
pictures.removeAll(picture);
delete picture;
@ -774,3 +774,8 @@ void ProfileInterface::deleteSelected()
QMessageBox::information(this, tr("Remove selected"), tr("No Snapmatic pictures or Savegames files are selected"));
}
}
void ProfileInterface::importFiles()
{
on_cmdImport_clicked();
}

View file

@ -53,6 +53,7 @@ public slots:
void deselectAllWidgets();
void exportSelected();
void deleteSelected();
void importFiles();
private slots:
void on_cmdCloseProfile_clicked();

View file

@ -250,3 +250,8 @@ void UserInterface::on_actionOptions_triggered()
optionsDialog->deleteLater();
delete optionsDialog;
}
void UserInterface::on_action_Import_triggered()
{
profileUI->importFiles();
}

View file

@ -53,6 +53,7 @@ private slots:
void on_actionExport_selected_triggered();
void on_actionDelete_selected_triggered();
void on_actionOptions_triggered();
void on_action_Import_triggered();
private:
ProfileDatabase *profileDB;

View file

@ -154,11 +154,12 @@
<property name="title">
<string>&amp;Profile</string>
</property>
<addaction name="actionSelect_all"/>
<addaction name="actionDeselect_all"/>
<addaction name="separator"/>
<addaction name="action_Import"/>
<addaction name="actionExport_selected"/>
<addaction name="actionDelete_selected"/>
<addaction name="separator"/>
<addaction name="actionSelect_all"/>
<addaction name="actionDeselect_all"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuEdit"/>
@ -229,6 +230,14 @@
<string>Ctrl+R</string>
</property>
</action>
<action name="action_Import">
<property name="text">
<string>&amp;Import files...</string>
</property>
<property name="shortcut">
<string>Ctrl+I</string>
</property>
</action>
</widget>
<resources/>
<connections>