OSDN Git Service

Ver0.26
[gefu/Gefu.git] / panel.h
1 #ifndef PANEL_H
2 #define PANEL_H
3
4 #include <QWidget>
5 #include <QModelIndex>
6 #include <QPointer>
7 class MainWindow;
8 class FileReadWorker;
9 class FolderPanel;
10 class FolderModel;
11 class Preferences;
12
13 namespace Ui {
14 class Panel;
15 }
16
17 class Panel : public QWidget
18 {
19     Q_OBJECT
20
21 public:
22     explicit Panel(QWidget *parent = 0);
23     ~Panel();
24
25     FolderPanel*    folderPanel() const;
26     void            initialize(MainWindow *w);
27     FolderModel*    model() const;
28     void            setModel(FolderModel *m);
29     void            setViewItem(const QModelIndex &index = QModelIndex());
30     void            updateAppearance(const Preferences &prefs);
31     QWidget*        visibleView() const;
32
33 private:
34     Ui::Panel *ui;
35     QPointer<FileReadWorker> m_worker;
36
37 public slots:
38     void    onReady(const QByteArray &data);
39
40 signals:
41     void    showed(QWidget *w);
42 };
43
44 #endif // PANEL_H