summaryrefslogtreecommitdiff
path: root/noncore/graphics/opie-eye/gui/mainwindow.h
blob: 9e94c6051a4f3828d4b19d89ee2f9b8b8760f830 (plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
 * GPLv2 zecke@handhelds.org
 * No WArranty...
 */

#ifndef PHUNK_MAIN_WINDOW_H
#define PHUNK_MAIN_WINDOW_H

#include <opie2/oconfig.h>

#include <qmainwindow.h>



namespace Opie {
namespace Ui{
    class OWidgetStack;
}
namespace Core{
    class OKeyConfigManager;
}
}

class ImageView;
class ImageWidget;
class PIconView;
class imageinfo;

class PMainWindow : public QMainWindow {
    Q_OBJECT
    enum Views { IconView,  ImageInfo, ImageDisplay };
public:
    static QString appName() { return QString::fromLatin1("opie-eye" ); }
    PMainWindow(QWidget*, const char*, WFlags );
    ~PMainWindow();

signals:
    void configChanged();

public slots:
    void slotShowInfo( const QString& inf );
    void slotDisplay( const QString& inf );
    void slotReturn();
    void slotRotateToggled(bool);
    void slotScaleToggled(bool);
    void slotZoomerToggled(bool);
    void slotToggleZoomer();
    void slotToggleAutorotate();
    void slotToggleAutoscale();
    void setDocument( const QString& );
    virtual void slotToggleFullScreen();

protected slots:
    void raiseIconView();
    void closeEvent( QCloseEvent* );

private:
    template<class T>  void initT( const char* name, T**, int );
    void initInfo();
    void initDisp();

private:
    Opie::Core::OConfig *m_cfg;
    Opie::Ui::OWidgetStack *m_stack;
    PIconView* m_view;
    imageinfo *m_info;
    ImageView *m_disp;
    bool autoRotate;
    bool autoScale;
    bool zoomerOn;
    ImageWidget*tFrame;
    QToolButton*rotateButton,*upButton,*fsButton,*viewModeButton;
    QToolButton*nextButton,*prevButton,*zoomButton,*scaleButton;

private slots:
    void slotConfig();
};

#endif