From ecdd2845abeb5f3d00f58540e9b222799d6610e8 Mon Sep 17 00:00:00 2001 From: zecke Date: Mon, 05 Apr 2004 20:01:22 +0000 Subject: Make use of OWidgetStack --- (limited to 'noncore/graphics/opie-eye/gui/imageinfoui.cpp') 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 @@ #include #include -#define THUMBSIZE 128 +static const int THUMBSIZE = 128; + + +imageinfo::imageinfo(QWidget* parent, const char* name, WFlags fl ) + : QWidget( parent, name, fl ) +{ + init(name); +} imageinfo::imageinfo(const QString&_path, QWidget* parent, const char* name, WFlags fl ) : QWidget( parent, name, fl ),currentFile(_path) { + init(name); + slotChangeName(_path); +} +void imageinfo::init(const char* name) { { QCopEnvelope( "QPE/Application/opie-eye_slave", "refUp()" ); } @@ -62,7 +73,6 @@ imageinfo::imageinfo(const QString&_path, QWidget* parent, const char* name, WF this, SLOT(slot_fullInfo(const QString&, const QString&)) ); connect(master, SIGNAL( sig_thumbNail(const QString&, const QPixmap&)), this, SLOT(slotThumbNail(const QString&, const QPixmap&))); - slotChangeName(_path); } void imageinfo::slotChangeName(const QString&_path) @@ -111,6 +121,19 @@ void imageinfo::slotThumbNail(const QString&_path, const QPixmap&_pix) } } +void imageinfo::setPath( const QString& str ) { + slotChangeName( str ); +} + +void imageinfo::setDestructiveClose() { + WFlags fl = getWFlags(); + /* clear it just in case */ + fl &= ~WDestructiveClose; + fl |= WDestructiveClose; + setWFlags( fl ); +} + + /* for testing */ infoDlg::infoDlg(const QString&fname,QWidget * parent, const char * name) :QDialog(parent,name,true,WStyle_ContextHelp) @@ -125,3 +148,5 @@ infoDlg::infoDlg(const QString&fname,QWidget * parent, const char * name) infoDlg::~infoDlg() { } + + -- cgit v0.9.0.2