summaryrefslogtreecommitdiff
path: root/noncore/graphics/opie-eye/gui/iconview.h
blob: af41aefbbf11e268a693a52e4edc04b81de7e7b0 (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
80
81
82
83
84
85
/*
 * GPLv2 zecke@handhelds.org
 * No WArranty...
 */

#ifndef PHUNK_ICON_VIEW_H
#define PHUNK_ICON_VIEW_H

#include <qvbox.h>


class QIconView;
class QIconViewItem;
class QComboBox;
class PIconViewItem;
class PDirLister;
class Ir;

namespace Opie {
namespace Core{
    class OConfig;
    class OKeyConfigManager;
}
}

class PIconView : public QVBox {
    Q_OBJECT
    friend class PIconViewItem;
    enum ActionIds {
        BeamItem, DeleteItem, ViewItem, InfoItem
    };
public:
    PIconView( QWidget* wid, Opie::Core::OConfig *cfg );
    ~PIconView();
    void resetView();
    Opie::Core::OKeyConfigManager* manager();

signals:
    void sig_showInfo( const QString& );
    void sig_display( const QString& );

private:
    void initKeys();
    QString currentFileName(bool &isDir)const;
    void loadViews();

private slots:
    void slotDirUp();
    void slotChangeDir(const QString&);
    void slotTrash();
    void slotViewChanged( int );
    void slotReloadDir();
    void slotRename();
    void slotBeam();
    void slotBeamDone( Ir* );

    void slotShowImage();
    void slotShowImage( const QString& );
    void slotImageInfo();
    void slotImageInfo( const QString& );

    void slotStart();
    void slotEnd();

/* for performance reasons make it inline in the future */
    void addFolders(  const QStringList& );
    void addFiles( const QStringList& );
    void slotClicked(QIconViewItem* );

/**/
    void slotThumbInfo(const QString&, const QString&);
    void slotThumbNail(const QString&, const QPixmap&);

    void  slotChangeMode( int );
private:
    Opie::Core::OKeyConfigManager *m_viewManager;
    Opie::Core::OConfig *m_cfg;
    QComboBox* m_views;
    QIconView* m_view;
    QString m_path;
    bool m_updatet : 1;
    int m_mode;
};

#endif