adds possibility to save log files as ...
This commit is contained in:
@@ -3413,6 +3413,17 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_saveLogAs">
|
||||||
|
<property name="text">
|
||||||
|
<string>Save as ...</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="resources/pokerth.qrc">
|
||||||
|
<normaloff>:/gfx/filesave.png</normaloff>:/gfx/filesave.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton_deleteLog">
|
<widget class="QPushButton" name="pushButton_deleteLog">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|||||||
@@ -123,6 +123,7 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent, ConfigFile *c, selectAva
|
|||||||
connect( pushButton_deleteLog, SIGNAL(clicked()), this, SLOT (deleteLogFile()));
|
connect( pushButton_deleteLog, SIGNAL(clicked()), this, SLOT (deleteLogFile()));
|
||||||
connect( pushButton_exportLogHtml, SIGNAL(clicked()), this, SLOT (exportLogToHtml()));
|
connect( pushButton_exportLogHtml, SIGNAL(clicked()), this, SLOT (exportLogToHtml()));
|
||||||
connect( pushButton_exportLogTxt, SIGNAL(clicked()), this, SLOT (exportLogToTxt()));
|
connect( pushButton_exportLogTxt, SIGNAL(clicked()), this, SLOT (exportLogToTxt()));
|
||||||
|
connect( pushButton_saveLogAs, SIGNAL(clicked()), this, SLOT (saveLogFileAs()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1222,3 +1223,18 @@ void settingsDialogImpl::exportLogToTxt()
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void settingsDialogImpl::saveLogFileAs()
|
||||||
|
{
|
||||||
|
QTreeWidgetItem* selectedItem = treeWidget_logFiles->currentItem();
|
||||||
|
|
||||||
|
if(selectedItem) {
|
||||||
|
QString fileName = QFileDialog::getSaveFileName(this, tr("Save PokerTH log file"),
|
||||||
|
QDir::homePath()+"/"+selectedItem->text(0),
|
||||||
|
tr("PokerTH SQL log (*.pdb)"));
|
||||||
|
|
||||||
|
if(!fileName.isEmpty()) {
|
||||||
|
QFile::copy(selectedItem->data(0, Qt::UserRole).toString(), fileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ public slots:
|
|||||||
void deleteLogFile();
|
void deleteLogFile();
|
||||||
void exportLogToHtml();
|
void exportLogToHtml();
|
||||||
void exportLogToTxt();
|
void exportLogToTxt();
|
||||||
|
void saveLogFileAs();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user