You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
563 B
32 lines
563 B
7 years ago
|
#ifndef TABVIEW_H
|
||
|
#define TABVIEW_H
|
||
|
|
||
|
#include <QtWidgets/QTabWidget>
|
||
|
#include <QtMvvmWidgets/IPresentingView>
|
||
|
#include <tabviewmodel.h>
|
||
|
|
||
|
namespace Ui {
|
||
|
class TabView;
|
||
|
}
|
||
|
|
||
|
class TabView : public QTabWidget, public QtMvvm::IPresentingView
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
Q_INTERFACES(QtMvvm::IPresentingView)
|
||
|
|
||
|
public:
|
||
|
Q_INVOKABLE explicit TabView(QtMvvm::ViewModel *viewModel, QWidget *parent = nullptr);
|
||
|
~TabView();
|
||
|
|
||
|
bool tryPresent(QWidget *view) override;
|
||
|
|
||
|
private Q_SLOTS:
|
||
|
void trigger(int index);
|
||
|
|
||
|
private:
|
||
|
TabViewModel *_viewModel;
|
||
|
Ui::TabView *ui;
|
||
|
};
|
||
|
|
||
|
#endif // TABVIEW_H
|