#ifndef SELECT_PPD_DIALOG_H
#define SELECT_PPD_DIALOG_H

#include <QDialog>
#include <QStandardItemModel>
#include "logo_icon_title_bar.h"
#include "findppdsthread.h"

QT_BEGIN_NAMESPACE
namespace Ui { class SelectPpdDialog; }
QT_END_NAMESPACE

class SelectPpdDialog : public QDialog
{
    Q_OBJECT

public:
    explicit SelectPpdDialog(QWidget *parentWindow = nullptr,QDialog *parent = nullptr);
    ~SelectPpdDialog();
    void setFontSizeF(QFont ft);
    void onShow();
signals:
    void mapIsReady();
    void chosenPPDName(QString ppd);
    void userCanceled();
public slots:
    void updateTableView();

private slots:
    void venderListClicked(const QModelIndex &index);
    void modelListClicked(const QModelIndex &index);
//    void venderListShowToolTip(const QModelIndex &index);
    void modelListShowToolTip(const QModelIndex &index);
    void sendOutPPDName();
    void cancelAndClose();
private:
    Ui::SelectPpdDialog *m_ui;

    QStandardItemModel *m_vendorModal;
    QStandardItemModel *m_modelModal;

    ppdPrinterMap *m_ppdMap;
    QMap<QString,PPDsAndAttr> m_currentVendor;
    bool m_updateFailed;

    QString m_currentChoosenPPD;
    QString m_currentChoosenModel;

    QWidget *m_pParentWindow;

    QFont m_font;
};
#endif // SELECT_PPD_DIALOG_H
