X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fwizard.h;h=de0fce1f3944df29d51aabb19fac137d6dc0c877;hb=c3302003093710ee247ad84c0fe2ef3c579d417f;hp=633ba299eb2469996be7228b44074ce085f94c44;hpb=d43383d14efb17899c439d85c257f5be5d2a118e;p=kdenlive diff --git a/src/wizard.h b/src/wizard.h index 633ba299..de0fce1f 100644 --- a/src/wizard.h +++ b/src/wizard.h @@ -33,26 +33,28 @@ #include "ui_wizardextra_ui.h" #include "ui_wizardcheck_ui.h" #include "ui_wizardmltcheck_ui.h" +#include "ui_wizardcapture_ui.h" class WizardDelegate: public QItemDelegate { public: - WizardDelegate(QAbstractItemView* parent = 0): QItemDelegate(parent) { + explicit WizardDelegate(QAbstractItemView* parent = 0) + : QItemDelegate(parent) + { } void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const { if (index.column() == 1) { - const bool hover = option.state & (QStyle::State_Selected); - QRect r1 = option.rect; painter->save(); - if (hover) { - painter->setPen(option.palette.color(QPalette::HighlightedText)); - QColor backgroundColor = option.palette.color(QPalette::Highlight); - painter->setBrush(QBrush(backgroundColor)); - painter->fillRect(r1, backgroundColor); - } + QStyleOptionViewItemV4 opt(option); + QStyle *style = opt.widget ? opt.widget->style() : QApplication::style(); + const int textMargin = style->pixelMetric(QStyle::PM_FocusFrameHMargin) + 1; + style->drawPrimitive(QStyle::PE_PanelItemViewItem, &opt, painter, opt.widget); + QFont font = painter->font(); font.setBold(true); painter->setFont(font); + QRect r1 = option.rect; + r1.adjust(0, textMargin, 0, - textMargin); int mid = (int)((r1.height() / 2)); r1.setBottom(r1.y() + mid); QRect r2 = option.rect; @@ -61,7 +63,6 @@ public: font.setBold(false); painter->setFont(font); QString subText = index.data(Qt::UserRole).toString(); - painter->setPen(option.palette.color(QPalette::Mid)); painter->drawText(r2, Qt::AlignLeft | Qt::AlignVCenter , subText); painter->restore(); } else { @@ -75,8 +76,8 @@ class Wizard : public QWizard { Q_OBJECT public: - Wizard(bool upgrade, QWidget * parent = 0); - void installExtraMimes(QString baseName, QStringList globs); + explicit Wizard(bool upgrade, QWidget * parent = 0); + void installExtraMimes(const QString &baseName, const QStringList &globs); void runUpdateMimeDatabase(); void adjustSettings(); bool isOk() const; @@ -85,14 +86,17 @@ private: Ui::WizardStandard_UI m_standard; Ui::WizardExtra_UI m_extra; Ui::WizardMltCheck_UI m_mltCheck; + Ui::WizardCapture_UI m_capture; Ui::WizardCheck_UI m_check; QVBoxLayout *m_startLayout; bool m_systemCheckIsOk; + QLabel *m_welcomeLabel; QMap m_dvProfiles; QMap m_hdvProfiles; QMap m_otherProfiles; void slotCheckPrograms(); void checkMltComponents(); + void checkMissingCodecs(); KIcon m_okIcon; KIcon m_badIcon; @@ -102,6 +106,11 @@ private slots: void slotCheckSelectedItem(); void slotCheckMlt(); void slotShowWebInfos(); + void slotDetectWebcam(); + void slotUpdateCaptureParameters(); + void slotSaveCaptureFormat(); + void slotUpdateDecklinkDevice(int captureCard); + void slotOpenManual(); }; #endif