-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
131 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include "diffdialog.h" | ||
#include "ui_diffdialog.h" | ||
|
||
DiffDialog::DiffDialog(QWidget* parent) | ||
: QDialog(parent) | ||
, ui(new Ui::DiffDialog) | ||
{ | ||
ui->setupUi(this); | ||
const auto filterString = QLatin1String("perf*.data\nperf.data*"); | ||
ui->file_a->setFilter(filterString); | ||
ui->file_b->setFilter(filterString); | ||
|
||
connect(ui->buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accepted); | ||
connect(ui->buttonBox, &QDialogButtonBox::rejected, this, &QDialog::close); | ||
} | ||
|
||
DiffDialog::~DiffDialog() = default; | ||
|
||
QString DiffDialog::fileA() const | ||
{ | ||
return ui->file_a->url().path(); | ||
} | ||
|
||
QString DiffDialog::fileB() const | ||
{ | ||
return ui->file_b->url().path(); | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#ifndef DIFFDIALOG_H | ||
#define DIFFDIALOG_H | ||
|
||
#include <QDialog> | ||
|
||
namespace Ui { | ||
class DiffDialog; | ||
} | ||
|
||
class DiffDialog : public QDialog | ||
{ | ||
public: | ||
explicit DiffDialog(QWidget* parent = nullptr); | ||
~DiffDialog(); | ||
|
||
QString fileA() const; | ||
QString fileB() const; | ||
|
||
private: | ||
QScopedPointer<Ui::DiffDialog> ui; | ||
}; | ||
|
||
#endif // DIFFDIALOG_H |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>DiffDialog</class> | ||
<widget class="QDialog" name="DiffDialog"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>400</width> | ||
<height>300</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Diff two files</string> | ||
</property> | ||
<property name="sizeGripEnabled"> | ||
<bool>false</bool> | ||
</property> | ||
<layout class="QFormLayout" name="formLayout"> | ||
<property name="leftMargin"> | ||
<number>6</number> | ||
</property> | ||
<property name="topMargin"> | ||
<number>6</number> | ||
</property> | ||
<property name="rightMargin"> | ||
<number>6</number> | ||
</property> | ||
<property name="bottomMargin"> | ||
<number>6</number> | ||
</property> | ||
<item row="0" column="0"> | ||
<widget class="QLabel" name="label"> | ||
<property name="text"> | ||
<string>File A:</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="1" column="0"> | ||
<widget class="QLabel" name="label_2"> | ||
<property name="text"> | ||
<string>File B:</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item row="0" column="1"> | ||
<widget class="KUrlRequester" name="file_a"/> | ||
</item> | ||
<item row="1" column="1"> | ||
<widget class="KUrlRequester" name="file_b"/> | ||
</item> | ||
<item row="2" column="1"> | ||
<widget class="QDialogButtonBox" name="buttonBox"> | ||
<property name="standardButtons"> | ||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Open</set> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
<customwidgets> | ||
<customwidget> | ||
<class>KUrlRequester</class> | ||
<extends>QWidget</extends> | ||
<header>kurlrequester.h</header> | ||
</customwidget> | ||
</customwidgets> | ||
<resources/> | ||
<connections/> | ||
</ui> |
This file contains 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
This file contains 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