author | zecke <zecke> | 2004-04-05 20:01:22 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-04-05 20:01:22 (UTC) |
commit | ecdd2845abeb5f3d00f58540e9b222799d6610e8 (patch) (side-by-side diff) | |
tree | 7199007b1dc296bb4572f2c96178d47d2f36bc02 /noncore/graphics/opie-eye/gui/imageinfoui.cpp | |
parent | cb3097d5249b6bd576d0212394ab57e885f9e9da (diff) | |
download | opie-ecdd2845abeb5f3d00f58540e9b222799d6610e8.zip opie-ecdd2845abeb5f3d00f58540e9b222799d6610e8.tar.gz opie-ecdd2845abeb5f3d00f58540e9b222799d6610e8.tar.bz2 |
Make use of OWidgetStack
Diffstat (limited to 'noncore/graphics/opie-eye/gui/imageinfoui.cpp') (more/less context) (show 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 @@ -16,17 +16,28 @@ #include <lib/slavemaster.h> #include <lib/imagecache.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/resource.h> -#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()" ); } if ( !name ) setName( "imageinfo" ); resize( 289, 335 ); @@ -59,13 +70,12 @@ imageinfo::imageinfo(const QString&_path, QWidget* parent, const char* name, WF SlaveMaster* master = SlaveMaster::self(); connect( master, SIGNAL(sig_fullInfo(const QString&, const QString&)), 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) { currentFile=_path; QFileInfo fi(_path); @@ -108,12 +118,25 @@ void imageinfo::slotThumbNail(const QString&_path, const QPixmap&_pix) PixmapLabel1->setPixmap( _pix ); PixmapLabel1->resize(QSize(_pix.width(),_pix.height())); } } } +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) { QVBoxLayout*dlglayout = new QVBoxLayout(this); dlglayout->setSpacing(2); @@ -122,6 +145,8 @@ infoDlg::infoDlg(const QString&fname,QWidget * parent, const char * name) dlglayout->addWidget(inf); } infoDlg::~infoDlg() { } + + |