aboutsummaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/guiSQLiteStudio/common/dbcombobox.h
blob: 602c20e711ffaabbfa68da3f7cba4012b883f561 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef DBCOMBOBOX_H
#define DBCOMBOBOX_H

#include <QComboBox>

class QComboBox;
class DbListModel;
class Db;

class DbComboBox : public QComboBox
{
    Q_OBJECT

    public:
        explicit DbComboBox(QWidget* parent = nullptr);

        DbListModel* getModel() const;
        void setCurrentDb(Db* db);
        Db* currentDb() const;

    private:
        DbListModel* dbComboModel = nullptr;

    private slots:
        void handleListCleared();
};

#endif // DBCOMBOBOX_H