Created
September 8, 2016 21:12
-
-
Save Fred-Barclay/f0454d31681fe3744659cd18dfd62403 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "taz.h" | |
#include "ui_taz.h" | |
#include <QFileDialog> | |
// May not be needed: | |
#include <QFile> | |
#include <QMessageBox> | |
#include <QTextStream> | |
// Depends on debugging and testing | |
#include <QProcess> | |
#include <iostream> | |
#include <QObject> | |
Taz::Taz(QWidget *parent) : | |
QMainWindow(parent), | |
ui(new Ui::Taz) | |
{ | |
ui->setupUi(this); | |
} | |
Taz::~Taz() | |
{ | |
delete ui; | |
} | |
void Taz::on_chooseButton_clicked() | |
{ | |
// New behavior | |
QFileDialog dialog(this); | |
dialog.setViewMode(QFileDialog::Detail); | |
dialog.setFileMode(QFileDialog::ExistingFiles); | |
QStringList fileNames; | |
if (dialog.exec()) | |
fileNames = dialog.selectedFiles(); | |
QString program = "/bin/echo"; | |
QStringList arguments; | |
fileNames << ">> /home/fred/fn.txt"; | |
QProcess *myProcess = new QProcess(this); | |
myProcess->start(program, fileNames ); | |
// NOT USING AT THE MOMENT: | |
// arguments << "fileNames" << ">> /home/fred/fn.txt"; | |
// QProcess *myProcess = new QProcess(this); | |
// myProcess->start(program, arguments); | |
} | |
void Taz::on_CancelButton_clicked() | |
{ | |
qApp->quit(); | |
} | |
void Taz::on_shredButton_clicked() | |
{ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment