removed PrefixPath debug line
[opentx.git] / companion / src / comparedialog.h
blobb8b15fc0576b70c0d14fc3dab8293923e7063445
1 #ifndef COMPAREDIALOG_H
2 #define COMPAREDIALOG_H
4 #include <QDialog>
5 #include <QtGui>
6 #include <QDir>
7 #include "eeprominterface.h"
8 #include "modelprinter.h"
10 namespace Ui {
11 class CompareDialog;
14 class CompareDialog : public QDialog
16 Q_OBJECT
18 public:
19 CompareDialog(QWidget *parent, Firmware * firmware);
20 ~CompareDialog();
21 Firmware * firmware;
23 protected:
24 GeneralSettings * settings;
25 ModelData g_model1;
26 ModelData g_model2;
27 bool model1Valid;
28 bool model2Valid;
30 private:
31 void closeEvent(QCloseEvent *event);
32 Ui::CompareDialog *ui;
33 template<class T> QString getColor1(T val1, T val2) {
34 if (val1!=val2)
35 return "green";
36 else
37 return "grey";
39 template<class T> QString getColor2(T val1, T val2) {
40 if (val1!=val2)
41 return "red";
42 else
43 return "grey";
45 QString getColor1(char * val1, char * val2) {
46 if (strcmp(val1,val2)!=0)
47 return "green";
48 else
49 return "grey";
51 QString getColor2(char * val1, char * val2) {
52 if (strcmp(val1,val2)!=0)
53 return "red";
54 else
55 return "grey";
58 bool ChannelHasExpo(ExpoData * expoArray, uint8_t destCh);
59 bool ChannelHasMix(MixData * mixArray, uint8_t destCh);
60 bool handleDroppedModel(const QMimeData * mimeData, ModelData * model, QLabel * label);
61 void applyDiffFont(QString & v1, QString & v2, const QString & font = "", bool eqGrey = false);
62 void diffAndAssembleTableLines(QStringList & i1, QStringList & i2, QString & o1, QString & o2);
64 QTextEdit * te;
65 QString curvefile1;
66 QString curvefile2;
67 QDir *qd;
69 ModelPrinter modelPrinter1;
70 ModelPrinter modelPrinter2;
71 GeneralSettings dummySettings;
73 private slots:
74 void on_printButton_clicked();
75 void on_printFileButton_clicked();
77 protected:
78 void dropEvent(QDropEvent *event);
79 void dragMoveEvent(QDragMoveEvent *event);
80 void dragEnterEvent(QDragEnterEvent *event);
81 void dragLeaveEvent(QDragLeaveEvent *event);
82 void printDiff();
83 void printSetup();
84 void printPhases();
85 void printLimits();
86 void printInputs();
87 void printMixers();
88 void printCurves();
89 void printGvars();
90 void printLogicalSwitches();
91 void printSafetySwitches();
92 void printCustomFunctions();
93 void printFrSky();
96 #endif // COMPAREDIALOG_H