Diffstat (limited to 'noncore/graphics/opie-eye/gui/imageinfoui.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/imageinfoui.cpp | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/noncore/graphics/opie-eye/gui/imageinfoui.cpp b/noncore/graphics/opie-eye/gui/imageinfoui.cpp index 3463ba6..74a9ea4 100644 --- a/noncore/graphics/opie-eye/gui/imageinfoui.cpp +++ b/noncore/graphics/opie-eye/gui/imageinfoui.cpp | |||
@@ -19,11 +19,22 @@ | |||
19 | #include <qpe/qcopenvelope_qws.h> | 19 | #include <qpe/qcopenvelope_qws.h> |
20 | #include <qpe/resource.h> | 20 | #include <qpe/resource.h> |
21 | 21 | ||
22 | #define THUMBSIZE 128 | 22 | static const int THUMBSIZE = 128; |
23 | |||
24 | |||
25 | imageinfo::imageinfo(QWidget* parent, const char* name, WFlags fl ) | ||
26 | : QWidget( parent, name, fl ) | ||
27 | { | ||
28 | init(name); | ||
29 | } | ||
23 | 30 | ||
24 | imageinfo::imageinfo(const QString&_path, QWidget* parent, const char* name, WFlags fl ) | 31 | imageinfo::imageinfo(const QString&_path, QWidget* parent, const char* name, WFlags fl ) |
25 | : QWidget( parent, name, fl ),currentFile(_path) | 32 | : QWidget( parent, name, fl ),currentFile(_path) |
26 | { | 33 | { |
34 | init(name); | ||
35 | slotChangeName(_path); | ||
36 | } | ||
37 | void imageinfo::init(const char* name) { | ||
27 | { | 38 | { |
28 | QCopEnvelope( "QPE/Application/opie-eye_slave", "refUp()" ); | 39 | QCopEnvelope( "QPE/Application/opie-eye_slave", "refUp()" ); |
29 | } | 40 | } |
@@ -62,7 +73,6 @@ imageinfo::imageinfo(const QString&_path, QWidget* parent, const char* name, WF | |||
62 | this, SLOT(slot_fullInfo(const QString&, const QString&)) ); | 73 | this, SLOT(slot_fullInfo(const QString&, const QString&)) ); |
63 | connect(master, SIGNAL( sig_thumbNail(const QString&, const QPixmap&)), | 74 | connect(master, SIGNAL( sig_thumbNail(const QString&, const QPixmap&)), |
64 | this, SLOT(slotThumbNail(const QString&, const QPixmap&))); | 75 | this, SLOT(slotThumbNail(const QString&, const QPixmap&))); |
65 | slotChangeName(_path); | ||
66 | } | 76 | } |
67 | 77 | ||
68 | void imageinfo::slotChangeName(const QString&_path) | 78 | void imageinfo::slotChangeName(const QString&_path) |
@@ -111,6 +121,19 @@ void imageinfo::slotThumbNail(const QString&_path, const QPixmap&_pix) | |||
111 | } | 121 | } |
112 | } | 122 | } |
113 | 123 | ||
124 | void imageinfo::setPath( const QString& str ) { | ||
125 | slotChangeName( str ); | ||
126 | } | ||
127 | |||
128 | void imageinfo::setDestructiveClose() { | ||
129 | WFlags fl = getWFlags(); | ||
130 | /* clear it just in case */ | ||
131 | fl &= ~WDestructiveClose; | ||
132 | fl |= WDestructiveClose; | ||
133 | setWFlags( fl ); | ||
134 | } | ||
135 | |||
136 | |||
114 | /* for testing */ | 137 | /* for testing */ |
115 | infoDlg::infoDlg(const QString&fname,QWidget * parent, const char * name) | 138 | infoDlg::infoDlg(const QString&fname,QWidget * parent, const char * name) |
116 | :QDialog(parent,name,true,WStyle_ContextHelp) | 139 | :QDialog(parent,name,true,WStyle_ContextHelp) |
@@ -125,3 +148,5 @@ infoDlg::infoDlg(const QString&fname,QWidget * parent, const char * name) | |||
125 | infoDlg::~infoDlg() | 148 | infoDlg::~infoDlg() |
126 | { | 149 | { |
127 | } | 150 | } |
151 | |||
152 | |||