X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fwizard.h;h=de0fce1f3944df29d51aabb19fac137d6dc0c877;hb=f4462e7ecb75f64e524746e3bb7c62a5e973d965;hp=4b922028d18068666caba659aa40a9d8e7630c12;hpb=09d3c81cf2a582a71fd19cba534cca082e57d75a;p=kdenlive diff --git a/src/wizard.h b/src/wizard.h index 4b922028..de0fce1f 100644 --- a/src/wizard.h +++ b/src/wizard.h @@ -33,25 +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 { +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, QBrush(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; @@ -60,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 { @@ -70,11 +72,12 @@ public: }; -class Wizard : public QWizard { +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; @@ -83,15 +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; - QStringList m_dvProfiles; - QStringList m_hdvProfiles; - QStringList m_otherProfiles; - QMap m_profilesInfo; + QLabel *m_welcomeLabel; + QMap m_dvProfiles; + QMap m_hdvProfiles; + QMap m_otherProfiles; void slotCheckPrograms(); void checkMltComponents(); + void checkMissingCodecs(); KIcon m_okIcon; KIcon m_badIcon; @@ -100,6 +105,12 @@ private slots: void slotCheckStandard(); void slotCheckSelectedItem(); void slotCheckMlt(); + void slotShowWebInfos(); + void slotDetectWebcam(); + void slotUpdateCaptureParameters(); + void slotSaveCaptureFormat(); + void slotUpdateDecklinkDevice(int captureCard); + void slotOpenManual(); }; #endif