Last change
on this file since 236 was 45, checked in by Sanahuja Guillaume, 8 years ago |
added compile info
|
File size:
819 bytes
|
Rev | Line | |
---|
[12] | 1 | #include <QApplication>
|
---|
| 2 | #include <QCleanlooksStyle>
|
---|
| 3 | #include <QLocale>
|
---|
| 4 |
|
---|
| 5 | #include <stdio.h>
|
---|
[45] | 6 | #include "unexported/compile_info.h"
|
---|
[12] | 7 | #include "file_ui.h"
|
---|
| 8 | #include <QFileDialog>
|
---|
| 9 |
|
---|
[16] | 10 | int main(int argc, char *argv[]) {
|
---|
[45] | 11 | compile_info("Dbt2Csv");
|
---|
[12] | 12 |
|
---|
[16] | 13 | QLocale::setDefault(QLocale::C);
|
---|
| 14 | QApplication app(argc, argv);
|
---|
| 15 | app.setStyle(new QCleanlooksStyle);
|
---|
[12] | 16 |
|
---|
[16] | 17 | file_ui *files = new file_ui();
|
---|
| 18 | files->connect(files, SIGNAL(finished()), &app, SLOT(quit()));
|
---|
[12] | 19 |
|
---|
[16] | 20 | QString path = QFileDialog::getExistingDirectory(new QWidget(),
|
---|
| 21 | "Select a directory", 0, 0);
|
---|
| 22 | QDir directory(path);
|
---|
| 23 | QStringList list_files = directory.entryList();
|
---|
[12] | 24 |
|
---|
[16] | 25 | for (int i = 0; i < list_files.size(); i++) {
|
---|
| 26 | files->addFile(directory.path() + "/" + list_files.at(i));
|
---|
| 27 | }
|
---|
[12] | 28 |
|
---|
[16] | 29 | files->endOfFiles();
|
---|
| 30 |
|
---|
| 31 | app.exec();
|
---|
[12] | 32 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.