Typica is a free program for professional coffee roasters. https://typica.us
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

abouttypica.w 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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.
  8. This class previously provided some additional functionality which is no
  9. longer required because it is handled by the |TypicaWebView| class introduced
  10. in version 1.6.
  11. @(abouttypica.h@>=
  12. #include <QMainWindow>
  13. #include <QFile>
  14. #include "webview.h"
  15. #ifndef AboutTypicaHeader
  16. #define AboutTypicaHeader
  17. class AboutTypica : public QMainWindow@/
  18. {
  19. @[Q_OBJECT@]@;
  20. public:@/
  21. AboutTypica();@/
  22. };
  23. #endif
  24. @ The implementation is in a separate file.
  25. @(abouttypica.cpp@>=
  26. #include "abouttypica.h"
  27. @<AboutTypica implementation@>@;
  28. @ The information provided here comes from a set of HTML documents stored as
  29. compiled resources and presented in a set of |QWebView| instances accessible
  30. through a set of tabs.
  31. @<AboutTypica implementation@>=
  32. AboutTypica::AboutTypica() : QMainWindow(NULL)
  33. {
  34. QFile aboutFile(":/resources/html/about.html");
  35. aboutFile.open(QIODevice::ReadOnly);
  36. QByteArray content = aboutFile.readAll();
  37. TypicaWebView *banner = new TypicaWebView;
  38. banner->setHtml(content, QUrl("qrc:/resources/html/about.html"));
  39. aboutFile.close();
  40. setCentralWidget(banner);
  41. }