summaryrefslogtreecommitdiff
path: root/noncore/graphics/opie-eye/gui/mainwindow.h
blob: 042d56859b07ca7524e231fcecd761d6f9b6fd4b (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
/*
 * 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 OKeyConfigManager;
    class OWidgetStack;
}
}

class PIconView;
class imageinfo;
class ImageView;
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 setDocument( const QString& );

protected:
    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;
    QToolButton*rotateButton;


private slots:
    void slotConfig();
};

#endif