Vuo  2.0.2
VuoMetadataEditor.hh
Go to the documentation of this file.
1 
10 #pragma once
11 
14 
15 namespace Ui
16 {
17  class VuoMetadataEditor;
18 }
19 
23 class VuoMetadataEditor : public QDialog
24 {
25  Q_OBJECT
26 
27 public:
28  explicit VuoMetadataEditor(VuoEditorComposition *composition, QWidget *parent, Qt::WindowFlags flags, bool isCodeEditor=false);
30  void show();
32 
33  static QString generateBundleIdentifierForCompositionName(QString name);
34  static QString generateFxPlugGroupName();
35 
36 protected:
37  void dragEnterEvent(QDragEnterEvent *event);
38  void dropEvent(QDropEvent *event);
39  void keyPressEvent(QKeyEvent *event);
40 
41 private:
42  Ui::VuoMetadataEditor *ui;
43  VuoEditorComposition *composition;
44  QString iconURL;
45  static map<QString, QString> descriptionForLicense;
46  static const QString otherLicenseTitle;
47  static const QString placeholderIconText;
48 
49  void populateLicenseInfo();
50  QPair<QString, QString> getLicenseTextAndLinkFromDescription(QString description);
51  QString getLicense();
52  static vector<string> commaSeparatedListToStdVector(const QString &listText);
53 
54 private slots:
55  void updateLicenseFields(QString licenseTitle);
56  void recordCustomLicenseText();
57  void updatePlaceholderTexts();
58  void sanitizeURL();
59 };