Typica is a free program for professional coffee roasters. https://typica.us
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

abouttypica.w 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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 <QWebView>
  13. #include <QFile>
  14. #ifndef AboutTypicaHeader
  15. #define AboutTypicaHeader
  16. class AboutTypica : public QMainWindow
  17. {
  18. Q_OBJECT
  19. public:
  20. AboutTypica();
  21. };
  22. #endif
  23. @ The implementation is in a separate file.
  24. @(abouttypica.cpp@>=
  25. #include "abouttypica.h"
  26. @<AboutTypica implementation@>@;
  27. @ The information provided here comes from a set of HTML documents stored as
  28. compiled resources and presented in a set of |QWebView| instances accessible
  29. through a set of tabs.
  30. @<AboutTypica implementation@>=
  31. AboutTypica::AboutTypica() : QMainWindow(NULL)
  32. {
  33. QFile aboutFile(":/resources/html/about.html");
  34. aboutFile.open(QIODevice::ReadOnly);
  35. QByteArray content = aboutFile.readAll();
  36. QWebView *banner = new QWebView;
  37. banner->setHtml(content, QUrl("qrc:/resources/html/about.html"));
  38. aboutFile.close();
  39. setCentralWidget(banner);
  40. }