#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, 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;
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 {
{
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;
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 <QString, QString> m_profilesInfo;
+ QLabel *m_welcomeLabel;
+ QMap <QString, QString> m_dvProfiles;
+ QMap <QString, QString> m_hdvProfiles;
+ QMap <QString, QString> m_otherProfiles;
void slotCheckPrograms();
void checkMltComponents();
+ void checkMissingCodecs();
KIcon m_okIcon;
KIcon m_badIcon;
void slotCheckStandard();
void slotCheckSelectedItem();
void slotCheckMlt();
+ void slotShowWebInfos();
+ void slotDetectWebcam();
+ void slotUpdateCaptureParameters();
+ void slotSaveCaptureFormat();
+ void slotUpdateDecklinkDevice(int captureCard);
+ void slotOpenManual();
};
#endif