summaryrefslogtreecommitdiffstats
path: root/src/dialog.h
blob: 805ed08333311a4a65ce64ee19dc25721ac59d0c (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef DIALOG_H
#define DIALOG_H

#include <QDialog>
#include <QModelIndex>
#include <QList>
#include <QSettings>
#include "session.h"
#include "sessiontreemodel.h"

namespace Ui {
    class Dialog;
}

class Dialog : public QDialog {
    Q_OBJECT
  public:
    explicit Dialog(QWidget *parent = 0);
    ~Dialog();
    void addItems(const QList<Session*>&, const QString& section);
    void selectSession(const QString& name);
    void selectPreviousSession();
    void showSettingsPVS();
    void setTheme();

  protected:
    void changeEvent(QEvent *e);

  private:
    Ui::Dialog *ui;
    SessionTreeModel *model_;
    QSettings *pvsSettings_;
    void readPVSSettings();
    void writePVSSettings();

  private slots:
    void on_comboBoxOthers_currentIndexChanged(int index);
    void on_comboBoxLecturer_currentIndexChanged(int index);
    void on_pushButtonStart_clicked();
    void on_pushButtonAbort_clicked();
    void on_treeView_activated(QModelIndex index);
};

#endif // DIALOG_H