Typica is a free program for professional coffee roasters. https://typica.us
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

abouttypica.w 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. @** A Window for Displaying Information About Typica.
  2. \noindent The About window for an application typically displays a few pieces
  3. of information: The application logo, name, and version number, copyright and
  4. license information, and other assorted information. In Typica this also
  5. includes a list of the people and companies that have provided financial
  6. assistance toward the ongoing development of the software and information that
  7. others can use to help in this way. Some of this information would benefit
  8. from existing as a link which can open an external application such as a web
  9. browser or email client.
  10. @(abouttypica.h@>=
  11. #include <QMainWindow>
  12. #include <QFile>
  13. #include <QtDebug>
  14. #include <QMessageBox>
  15. #include <QDesktopServices>
  16. #include "webview.h"
  17. #ifndef AboutTypicaHeader
  18. #define AboutTypicaHeader
  19. class AboutTypica : public QMainWindow
  20. {
  21. Q_OBJECT
  22. public:
  23. AboutTypica();
  24. };
  25. #endif
  26. @ The implementation is in a separate file.
  27. @(abouttypica.cpp@>=
  28. #include "abouttypica.h"
  29. @<AboutTypica implementation@>@;
  30. @ The information provided here comes from a set of HTML documents stored as
  31. compiled resources and presented in a set of |QWebView| instances accessible
  32. through a set of tabs.
  33. @<AboutTypica implementation@>=
  34. AboutTypica::AboutTypica() : QMainWindow(NULL)
  35. {
  36. QFile aboutFile(":/resources/html/about.html");
  37. aboutFile.open(QIODevice::ReadOnly);
  38. QByteArray content = aboutFile.readAll();
  39. TypicaWebView *banner = new TypicaWebView;
  40. banner->setHtml(content, QUrl("qrc:/resources/html/about.html"));
  41. aboutFile.close();
  42. setCentralWidget(banner);
  43. }