1 #include <QApplication>
5 #include "qt/main_window.h"
11 Diff
*diff
= Diff::instance();
12 File
*file
= new File("filename");
13 File
*file2
= new File("filename2");
14 Hunk
*h1
= new Hunk(100, 105);
15 Hunk
*h2
= new Hunk(150, 155);
16 Hunk
*h3
= new Hunk(250, 255);
17 Text
*t1
= new Text();
18 Text
*t2
= new Text();
19 Text
*t3
= new Text();
20 Text
*t4
= new Text();
22 t1
->addLine(new QString("Line1 asdlkjf halsjdlfkjahlsdhf laj dsljfh\
23 lasjd hflakf jk ahlds jhflaksdkjfa hlsjf hlak dhflkjadslf\
24 askjd fl sadfl asld fald sfhlkja sdljfh asd fhalkdjsfhlksa\
26 t1
->addLine(new QString("Line2"));
27 t1
->addLine(new QString("Line3"));
28 t2
->addLine(new QString("LLine3"));
29 t2
->addLine(new QString("LLine3"));
30 t2
->addLine(new QString("LLine3"));
31 t3
->addLine(new QString("LLLine3"));
32 t3
->addLine(new QString("LLLine3"));
33 t3
->addLine(new QString("LLLine3"));
34 t4
->addLine(new QString("LLLLine3"));
35 t4
->addLine(new QString("LLLLLine3"));
37 h1
->addSnippet(new Context(new Text(*t1
)));
38 h1
->addSnippet(new Added(new Text(*t2
)));
39 h1
->addSnippet(new Context(new Text(*t1
)));
41 h2
->addSnippet(new Deleted(new Text(*t3
)));
42 h2
->addSnippet(new Context(new Text(*t1
)));
44 h3
->addSnippet(new Changed(new Text(*t4
), new Text(*t3
)));
45 h3
->addSnippet(new Added(new Text(*t1
)));
46 h3
->addSnippet(new Context(new Text(*t2
)));
52 file2
->addHunk(new Hunk(*h1
));
53 file2
->addHunk(new Hunk(*h2
));
54 file2
->addHunk(new Hunk(*h3
));
64 int main(int argc
, char *argv
[])
68 QApplication
app(argc
, argv
);