Typica is a free program for professional coffee roasters. https://typica.us
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

licensewindow.cpp 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*213:*/
  2. #line 36 "./licensewindow.w"
  3. /*217:*/
  4. #line 99 "./licensewindow.w"
  5. #include "licensewindow.h"
  6. #include <QSplitter>
  7. #include <QListWidget>
  8. #include <QVariant>
  9. #include <QUrl>
  10. #line 4916 "./typica.w"
  11. /*:217*/
  12. #line 37 "./licensewindow.w"
  13. /*214:*/
  14. #line 43 "./licensewindow.w"
  15. LicenseWindow::LicenseWindow()
  16. :QMainWindow(NULL),view(new QWebView)
  17. {
  18. QSplitter*split= new QSplitter;
  19. QListWidget*projects= new QListWidget;
  20. /*216:*/
  21. #line 79 "./licensewindow.w"
  22. QListWidgetItem*item= new QListWidgetItem("Typica",projects);
  23. item->setData(Qt::UserRole,QVariant(QUrl("qrc:/resources/html/licenses/typica.html")));
  24. projects->setCurrentItem(item);
  25. setWebView(item,NULL);
  26. item= new QListWidgetItem("d3.js",projects);
  27. item->setData(Qt::UserRole,QVariant(QUrl("qrc:/resources/html/licenses/d3.html")));
  28. item= new QListWidgetItem("Entypo",projects);
  29. item->setData(Qt::UserRole,QVariant(QUrl("qrc:/resources/html/licenses/entypo.html")));
  30. item= new QListWidgetItem("Tango Desktop Project",projects);
  31. item->setData(Qt::UserRole,QVariant(QUrl("qrc:/resources/html/licenses/tango.html")));
  32. item= new QListWidgetItem("QextSerialPort",projects);
  33. item->setData(Qt::UserRole,QVariant(QUrl("qrc:/resources/html/licenses/qextserialport.html")));
  34. item= new QListWidgetItem("qrcode-svg",projects);
  35. item->setData(Qt::UserRole,QVariant(QUrl("qrc:/resources/html/licenses/qrcode-svg.html")));
  36. item= new QListWidgetItem("Qt",projects);
  37. item->setData(Qt::UserRole,QVariant(QUrl("qrc:/resources/html/licenses/qt.html")));
  38. /*:216*/
  39. #line 50 "./licensewindow.w"
  40. connect(projects,SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)),
  41. this,SLOT(setWebView(QListWidgetItem*,QListWidgetItem*)));
  42. split->addWidget(projects);
  43. split->addWidget(view);
  44. setCentralWidget(split);
  45. }
  46. /*:214*//*215:*/
  47. #line 64 "./licensewindow.w"
  48. void LicenseWindow::setWebView(QListWidgetItem*current,QListWidgetItem*)
  49. {
  50. view->load(current->data(Qt::UserRole).toUrl());
  51. }
  52. /*:215*/
  53. #line 38 "./licensewindow.w"
  54. /*:213*/