Ktam3874/pitx software guide, And now follows the real main program (main.cpp) – Kontron KTAM3874-pITX User Manual
Page 208

KTD-S0057-I
Page 204 Linux® Programming Examples (DebianTM)
KTAM3874/pITX Software Guide
void retranslateUi(QDialog *Dialog)
{
Dialog->setWindowTitle(QApplication::translate("Dialog", "Dialog", 0, QApplication::UnicodeUTF8));
groupBox_2->setTitle(QApplication::translate("Dialog", " Change Font ", 0, QApplication::UnicodeUTF8));
groupBox->setTitle(QApplication::translate("Dialog", " Change Date ", 0, QApplication::UnicodeUTF8));
label->setText(QString());
} // retranslateUi
};
namespace Ui {
class Dialog: public Ui_Dialog {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_DIALOG_H
The lines in green color contain some key terms for the main program but the main Include-file (main.h) is
listed first.
#ifndef MAIN_H
#define MAIN_H
class Dialog : public QDialog
{
Q_OBJECT
public:
explicit Dialog (QWidget *parent = 0);
~Dialog
();
private slots:
void showTime ();
void drawDate ();
private:
static const int TIMEOUT = 200;
static const int FONTSIZE = 14;
Ui::Dialog
*ui;
};
#endif
and now follows the real main program (main.cpp):
/***************************************************************
* Qt demonstration program
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License.
****************************************************************/