예제 #1
0
DiaryView::DiaryView(Context *context, QStackedWidget *controls) : TabView(context, VIEW_DIARY)
{
    DiarySidebar *s = new DiarySidebar(context);
    HomeWindow *d = new HomeWindow(context, "diary", "Diary");
    controls->addWidget(d->controls());
    controls->setCurrentIndex(0);
    BlankStateDiaryPage *b = new BlankStateDiaryPage(context);

    setSidebar(s);
    setPage(d);
    setBlank(b);

    connect(s, SIGNAL(dateRangeChanged(DateRange)), this, SLOT(dateRangeChanged(DateRange)));
}
예제 #2
0
AnalysisView::AnalysisView(Context *context, QStackedWidget *controls) : TabView(context, VIEW_ANALYSIS)
{
    analSidebar = new AnalysisSidebar(context);
    HomeWindow *a = new HomeWindow(context, "analysis", "Rides");
    controls->addWidget(a->controls());
    controls->setCurrentIndex(0);
    BlankStateAnalysisPage *b = new BlankStateAnalysisPage(context);

    setSidebar(analSidebar);
    setPage(a);
    setBlank(b);
    setBottom(new ComparePane(context, this, ComparePane::interval));

    connect(bottomSplitter(), SIGNAL(compareChanged(bool)), this, SLOT(compareChanged(bool)));
    connect(bottomSplitter(), SIGNAL(compareClear()), bottom(), SLOT(clear()));
}
예제 #3
0
HomeView::HomeView(Context *context, QStackedWidget *controls) : TabView(context, VIEW_HOME)
{
    LTMSidebar *s = new LTMSidebar(context);
    HomeWindow *h = new HomeWindow(context, "home", "Trends");
    controls->addWidget(h->controls());
    controls->setCurrentIndex(0);
    BlankStateHomePage *b = new BlankStateHomePage(context);

    setSidebar(s);
    setPage(h);
    setBlank(b);
    setBottom(new ComparePane(context, this, ComparePane::season));

    connect(s, SIGNAL(dateRangeChanged(DateRange)), this, SLOT(dateRangeChanged(DateRange)));
    connect(this, SIGNAL(onSelectionChanged()), this, SLOT(justSelected()));
    connect(bottomSplitter(), SIGNAL(compareChanged(bool)), this, SLOT(compareChanged(bool)));
    connect(bottomSplitter(), SIGNAL(compareClear()), bottom(), SLOT(clear()));
}
예제 #4
0
TrainView::TrainView(Context *context, QStackedWidget *controls) : TabView(context, VIEW_TRAIN)
{
    trainTool = new TrainSidebar(context);
    trainTool->hide();

    HomeWindow *t = new HomeWindow(context, "train", "train");
    controls->addWidget(t->controls());
    controls->setCurrentIndex(0);
    BlankStateTrainPage *b = new BlankStateTrainPage(context);

    setSidebar(trainTool->controls());
    setPage(t);
    setBlank(b);

    trainBottom = new TrainBottom(trainTool, this);
    setBottom(trainBottom);
    setHideBottomOnIdle(false);

    connect(this, SIGNAL(onSelectionChanged()), this, SLOT(onSelectionChanged()));
    connect(trainBottom, SIGNAL(autoHideChanged(bool)), this, SLOT(onAutoHideChanged(bool)));
}
예제 #5
0
TrainView::TrainView(Context *context, QStackedWidget *controls) : TabView(context, VIEW_TRAIN)
{
    trainTool = new TrainSidebar(context);
    trainTool->hide();

    HomeWindow *t = new HomeWindow(context, "train", "train");
    controls->addWidget(t->controls());
    controls->setCurrentIndex(0);
    BlankStateTrainPage *b = new BlankStateTrainPage(context);

    setSidebar(trainTool->controls());
    setPage(t);
    setBlank(b);

    p = new QDialog(NULL);
    QVBoxLayout *m = new QVBoxLayout(p);
    m->addWidget(trainTool->getToolbarButtons());
    trainTool->getToolbarButtons()->show();
    p->setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint | Qt::Tool);
    p->hide();

    connect(this, SIGNAL(onSelectionChanged()), this, SLOT(onSelectionChanged()));
}