comparison multichoicedialog.h @ 72:121cb1032717

* Bit more work on Open dialog
author Chris Cannam
date Thu, 18 Nov 2010 17:36:53 +0000
parents 6d5a5571caec
children 10eb97683aa9
comparison
equal deleted inserted replaced
71:eaabc54de103 72:121cb1032717
42 enum ArgType { 42 enum ArgType {
43 NoArg, 43 NoArg,
44 FileArg, 44 FileArg,
45 DirectoryArg, 45 DirectoryArg,
46 UrlArg, 46 UrlArg,
47 FileOrUrlArg 47 UrlToDirectoryArg
48 }; 48 };
49 49
50 void addChoice(QString identifier, QString text, 50 void addChoice(QString identifier, QString text,
51 QString description, ArgType arg); 51 QString description, ArgType arg);
52 52
53 void setCurrentChoice(QString); 53 void setCurrentChoice(QString);
54 QString getCurrentChoice(); 54 QString getCurrentChoice();
55 QString getArgument(); 55 QString getArgument();
56 QString getAdditionalArgument();
56 57
57 static void addRecentArgument(QString identifier, QString name); 58 static void addRecentArgument(QString identifier, QString name,
59 bool additionalArgument = false);
58 60
59 private slots: 61 private slots:
60 void choiceChanged(); 62 void choiceChanged();
63 void urlChanged(const QString &);
61 void browse(); 64 void browse();
62 65
63 private: 66 private:
64 QMap<QString, QString> m_texts; 67 QMap<QString, QString> m_texts;
65 QMap<QString, QString> m_descriptions; 68 QMap<QString, QString> m_descriptions;
69 QString m_currentChoice; 72 QString m_currentChoice;
70 QMap<QWidget *, QString> m_choiceButtons; 73 QMap<QWidget *, QString> m_choiceButtons;
71 74
72 QHBoxLayout *m_choiceLayout; 75 QHBoxLayout *m_choiceLayout;
73 QLabel *m_descriptionLabel; 76 QLabel *m_descriptionLabel;
74 QLabel *m_argLabel; 77 QLabel *m_fileLabel;
75 QComboBox *m_argEdit; 78 QComboBox *m_fileCombo;
76 QAbstractButton *m_browseButton; 79 QAbstractButton *m_browseButton;
80 QLabel *m_urlLabel;
81 QComboBox *m_urlCombo;
77 }; 82 };
78 83
79 #endif // MULTICHOICEDIALOG_H 84 #endif // MULTICHOICEDIALOG_H