MasterDetail Example

#ifndef WINDOW_H
#define WINDOW_H

#include <DevMachines/QtitanGrid>
#include "DemoMainWindow.h"

class Window : public DemoMainWindow
{
    Q_OBJECT
public:
    Window();
    QWidget* createSettingsWidget();
private Q_SLOTS:
    void autoWidthStateChanged(int state);
    void fastScrollChanged(int state);
    void dottedLineChanged(int state);
    void selectGridLineStyles(int index);
    void zoomEnabledChanged(int state);
    void zoomIndicatorChanged(int state);
    void cellButtonAutoRaiseEnabled(int state);
    void transparentBackgroundEnabled(int state);
    void rowSizingEnabled(int);
    void contextMenu(ContextMenuEventArgs* args);
    void cellButtonClicked(CellButtonClickEventArgs* args);
    void printPreview();
    void setShadeColor(const QColor& color) override;
    void zoomValueChanged(int value);
    void previewRowChanged(PreviewRowArgs* args);
    void selectPreviewRowExpandStyle(int index);
private:
    QAbstractItemModel* createMasterModel();
    void addDetailModel(const QString& country, const QString& gdp, const QString& population, const QString& gdpPerCapita);
    Qtitan::Grid* m_grid;
    QMap<QString, QAbstractItemModel *> m_detailModelMap;
};
#endif