author | zecke <zecke> | 2004-04-04 21:38:46 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-04-04 21:38:46 (UTC) |
commit | fad3886132f81ff5f1f84c09e9a0b3048d91296d (patch) (unidiff) | |
tree | a6badf47f7e2a737d801e55388b67c8aa81508b0 | |
parent | 4da953f1ef0349acc5b86ee15b9e3005dabc319f (diff) | |
download | opie-fad3886132f81ff5f1f84c09e9a0b3048d91296d.zip opie-fad3886132f81ff5f1f84c09e9a0b3048d91296d.tar.gz opie-fad3886132f81ff5f1f84c09e9a0b3048d91296d.tar.bz2 |
Update todo
use owarn right
-rw-r--r-- | noncore/graphics/opie-eye/TODO | 2 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/imageinfoui.cpp | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/noncore/graphics/opie-eye/TODO b/noncore/graphics/opie-eye/TODO index e31cb73..8dbf35e 100644 --- a/noncore/graphics/opie-eye/TODO +++ b/noncore/graphics/opie-eye/TODO | |||
@@ -1,19 +1,19 @@ | |||
1 | Todo for Opie-Eye | 1 | Todo for Opie-Eye |
2 | 2 | ||
3 | 1.) Extend BigScreen classes to have something like a combined OSplitter and OWidgetStack. | 3 | 1.) Extend BigScreen classes to have something like a combined OSplitter and OWidgetStack. |
4 | On small screens one could toggle this Widget into the View but on BigScreen it would | 4 | On small screens one could toggle this Widget into the View but on BigScreen it would |
5 | be a full widget OToggleSplitter | 5 | be a full widget -> OToggleSplitter |
6 | 6 | ||
7 | 2.) Write a Image Info Widget which uses the cache to get the thumb and the slave to get | 7 | 2.) Write a Image Info Widget which uses the cache to get the thumb and the slave to get |
8 | the info and display it. Make use of OKeyConfigManager to manager keys for up and down | 8 | the info and display it. Make use of OKeyConfigManager to manager keys for up and down |
9 | and left and right to switch between views and go from one image to the next. it would | 9 | and left and right to switch between views and go from one image to the next. it would |
10 | emit signals (alwin) | 10 | emit signals (alwin) |
11 | 11 | ||
12 | 3.) Write Image Display component(zecke) | 12 | 3.) Write Image Display component(zecke) |
13 | 13 | ||
14 | 4.) make the cache tunable at runtime | 14 | 4.) make the cache tunable at runtime |
15 | 5.) fix config gui | 15 | 5.) fix config gui |
16 | 6.) more Configuration | 16 | 6.) more Configuration |
17 | 7.) 2 column mode on big screen | 17 | 7.) 2 column mode on big screen |
18 | 8.) 2/4 pix without info on a row | 18 | 8.) 2/4 pix without info on a row |
19 | 9.) Performance | 19 | 9.) Performance |
diff --git a/noncore/graphics/opie-eye/gui/imageinfoui.cpp b/noncore/graphics/opie-eye/gui/imageinfoui.cpp index 2580215..3463ba6 100644 --- a/noncore/graphics/opie-eye/gui/imageinfoui.cpp +++ b/noncore/graphics/opie-eye/gui/imageinfoui.cpp | |||
@@ -1,127 +1,127 @@ | |||
1 | #include "imageinfoui.h" | 1 | #include "imageinfoui.h" |
2 | 2 | ||
3 | #include <qframe.h> | 3 | #include <qframe.h> |
4 | #include <qlabel.h> | 4 | #include <qlabel.h> |
5 | #include <qpushbutton.h> | 5 | #include <qpushbutton.h> |
6 | #include <qtextview.h> | 6 | #include <qtextview.h> |
7 | #include <qlayout.h> | 7 | #include <qlayout.h> |
8 | #include <qvariant.h> | 8 | #include <qvariant.h> |
9 | #include <qtooltip.h> | 9 | #include <qtooltip.h> |
10 | #include <qwhatsthis.h> | 10 | #include <qwhatsthis.h> |
11 | #include <qimage.h> | 11 | #include <qimage.h> |
12 | #include <qpixmap.h> | 12 | #include <qpixmap.h> |
13 | #include <qstring.h> | 13 | #include <qstring.h> |
14 | #include <qfileinfo.h> | 14 | #include <qfileinfo.h> |
15 | 15 | ||
16 | #include <lib/slavemaster.h> | 16 | #include <lib/slavemaster.h> |
17 | #include <lib/imagecache.h> | 17 | #include <lib/imagecache.h> |
18 | 18 | ||
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 | #define THUMBSIZE 128 |
23 | 23 | ||
24 | imageinfo::imageinfo(const QString&_path, QWidget* parent, const char* name, WFlags fl ) | 24 | imageinfo::imageinfo(const QString&_path, QWidget* parent, const char* name, WFlags fl ) |
25 | : QWidget( parent, name, fl ),currentFile(_path) | 25 | : QWidget( parent, name, fl ),currentFile(_path) |
26 | { | 26 | { |
27 | { | 27 | { |
28 | QCopEnvelope( "QPE/Application/opie-eye_slave", "refUp()" ); | 28 | QCopEnvelope( "QPE/Application/opie-eye_slave", "refUp()" ); |
29 | } | 29 | } |
30 | if ( !name ) | 30 | if ( !name ) |
31 | setName( "imageinfo" ); | 31 | setName( "imageinfo" ); |
32 | resize( 289, 335 ); | 32 | resize( 289, 335 ); |
33 | setCaption( tr( "Image info" ) ); | 33 | setCaption( tr( "Image info" ) ); |
34 | imageinfoLayout = new QVBoxLayout( this ); | 34 | imageinfoLayout = new QVBoxLayout( this ); |
35 | imageinfoLayout->setSpacing(2); | 35 | imageinfoLayout->setSpacing(2); |
36 | imageinfoLayout->setMargin(4); | 36 | imageinfoLayout->setMargin(4); |
37 | 37 | ||
38 | PixmapLabel1 = new QLabel( this, "PixmapLabel1" ); | 38 | PixmapLabel1 = new QLabel( this, "PixmapLabel1" ); |
39 | PixmapLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, PixmapLabel1->sizePolicy().hasHeightForWidth() ) ); | 39 | PixmapLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, PixmapLabel1->sizePolicy().hasHeightForWidth() ) ); |
40 | QWhatsThis::add( PixmapLabel1, tr("Displays an thumbnail of the image") ); | 40 | QWhatsThis::add( PixmapLabel1, tr("Displays an thumbnail of the image") ); |
41 | 41 | ||
42 | imageinfoLayout->addWidget( PixmapLabel1 ); | 42 | imageinfoLayout->addWidget( PixmapLabel1 ); |
43 | 43 | ||
44 | Line1 = new QFrame( this, "Line1" ); | 44 | Line1 = new QFrame( this, "Line1" ); |
45 | Line1->setFrameStyle( QFrame::HLine | QFrame::Sunken ); | 45 | Line1->setFrameStyle( QFrame::HLine | QFrame::Sunken ); |
46 | imageinfoLayout->addWidget( Line1 ); | 46 | imageinfoLayout->addWidget( Line1 ); |
47 | 47 | ||
48 | fnameLabel = new QLabel( this, "FnameLabel" ); | 48 | fnameLabel = new QLabel( this, "FnameLabel" ); |
49 | imageinfoLayout->addWidget( fnameLabel); | 49 | imageinfoLayout->addWidget( fnameLabel); |
50 | 50 | ||
51 | TextView1 = new QTextView( this, "TextView1" ); | 51 | TextView1 = new QTextView( this, "TextView1" ); |
52 | TextView1->setFrameShadow( QTextView::Sunken ); | 52 | TextView1->setFrameShadow( QTextView::Sunken ); |
53 | TextView1->setResizePolicy( QTextView::AutoOneFit ); | 53 | TextView1->setResizePolicy( QTextView::AutoOneFit ); |
54 | TextView1->setBackgroundOrigin( QTextView::ParentOrigin ); | 54 | TextView1->setBackgroundOrigin( QTextView::ParentOrigin ); |
55 | TextView1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)3, TextView1->sizePolicy().hasHeightForWidth() ) ); | 55 | TextView1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)3, TextView1->sizePolicy().hasHeightForWidth() ) ); |
56 | // TextView1->setVScrollBarMode(QScrollView::AlwaysOn); | 56 | // TextView1->setVScrollBarMode(QScrollView::AlwaysOn); |
57 | QWhatsThis::add( TextView1, tr("Displays info of selected image") ); | 57 | QWhatsThis::add( TextView1, tr("Displays info of selected image") ); |
58 | imageinfoLayout->addWidget( TextView1 ); | 58 | imageinfoLayout->addWidget( TextView1 ); |
59 | 59 | ||
60 | SlaveMaster* master = SlaveMaster::self(); | 60 | SlaveMaster* master = SlaveMaster::self(); |
61 | connect( master, SIGNAL(sig_fullInfo(const QString&, const QString&)), | 61 | connect( master, SIGNAL(sig_fullInfo(const QString&, const QString&)), |
62 | this, SLOT(slot_fullInfo(const QString&, const QString&)) ); | 62 | this, SLOT(slot_fullInfo(const QString&, const QString&)) ); |
63 | connect(master, SIGNAL( sig_thumbNail(const QString&, const QPixmap&)), | 63 | connect(master, SIGNAL( sig_thumbNail(const QString&, const QPixmap&)), |
64 | this, SLOT(slotThumbNail(const QString&, const QPixmap&))); | 64 | this, SLOT(slotThumbNail(const QString&, const QPixmap&))); |
65 | slotChangeName(_path); | 65 | slotChangeName(_path); |
66 | } | 66 | } |
67 | 67 | ||
68 | void imageinfo::slotChangeName(const QString&_path) | 68 | void imageinfo::slotChangeName(const QString&_path) |
69 | { | 69 | { |
70 | currentFile=_path; | 70 | currentFile=_path; |
71 | QFileInfo fi(_path); | 71 | QFileInfo fi(_path); |
72 | fnameLabel->setText("<qt><center><b>"+fi.fileName()+"</b></center></qt>"); | 72 | fnameLabel->setText("<qt><center><b>"+fi.fileName()+"</b></center></qt>"); |
73 | SlaveMaster::self()->imageInfo( currentFile ); | 73 | SlaveMaster::self()->imageInfo( currentFile ); |
74 | 74 | ||
75 | QPixmap*m_pix = PPixmapCache::self()->cachedImage( _path, THUMBSIZE,THUMBSIZE ); | 75 | QPixmap*m_pix = PPixmapCache::self()->cachedImage( _path, THUMBSIZE,THUMBSIZE ); |
76 | if (!m_pix) { | 76 | if (!m_pix) { |
77 | PixmapLabel1->setPixmap(QPixmap( Resource::loadPixmap( "UnknownDocument" ))); | 77 | PixmapLabel1->setPixmap(QPixmap( Resource::loadPixmap( "UnknownDocument" ))); |
78 | SlaveMaster::self()->thumbNail(currentFile,THUMBSIZE,THUMBSIZE); | 78 | SlaveMaster::self()->thumbNail(currentFile,THUMBSIZE,THUMBSIZE); |
79 | } else { | 79 | } else { |
80 | PixmapLabel1->setPixmap(*m_pix); | 80 | PixmapLabel1->setPixmap(*m_pix); |
81 | } | 81 | } |
82 | } | 82 | } |
83 | 83 | ||
84 | imageinfo::~imageinfo() | 84 | imageinfo::~imageinfo() |
85 | { | 85 | { |
86 | { | 86 | { |
87 | QCopEnvelope( "QPE/Application/opie-eye_slave", "refDown()" ); | 87 | QCopEnvelope( "QPE/Application/opie-eye_slave", "refDown()" ); |
88 | } | 88 | } |
89 | } | 89 | } |
90 | 90 | ||
91 | void imageinfo::slot_fullInfo(const QString&_path, const QString&_t) | 91 | void imageinfo::slot_fullInfo(const QString&_path, const QString&_t) |
92 | { | 92 | { |
93 | if (_path == currentFile) { | 93 | if (_path == currentFile) { |
94 | qDebug(_t); | 94 | qDebug(_t); |
95 | QString t = _t; | 95 | QString t = _t; |
96 | t.replace(QRegExp("\n"),"<br>"); | 96 | t.replace(QRegExp("\n"),"<br>"); |
97 | /* t.replace(QRegeExp("<qt>",""); | 97 | /* t.replace(QRegeExp("<qt>",""); |
98 | t.replace(QRegeExp("</qt>","");*/ | 98 | t.replace(QRegeExp("</qt>","");*/ |
99 | TextView1->setText(t); | 99 | TextView1->setText(t); |
100 | } | 100 | } |
101 | } | 101 | } |
102 | 102 | ||
103 | void imageinfo::slotThumbNail(const QString&_path, const QPixmap&_pix) | 103 | void imageinfo::slotThumbNail(const QString&_path, const QPixmap&_pix) |
104 | { | 104 | { |
105 | if (_path == currentFile) { | 105 | if (_path == currentFile) { |
106 | if (_pix.width()>0) { | 106 | if (_pix.width()>0) { |
107 | PPixmapCache::self()->insertImage( _path, _pix, THUMBSIZE, THUMBSIZE ); | 107 | PPixmapCache::self()->insertImage( _path, _pix, THUMBSIZE, THUMBSIZE ); |
108 | PixmapLabel1->setPixmap( _pix ); | 108 | PixmapLabel1->setPixmap( _pix ); |
109 | PixmapLabel1->resize(QSize(_pix.width(),_pix.height())); | 109 | PixmapLabel1->resize(QSize(_pix.width(),_pix.height())); |
110 | } | 110 | } |
111 | } | 111 | } |
112 | } | 112 | } |
113 | 113 | ||
114 | /* for testing */ | 114 | /* for testing */ |
115 | infoDlg::infoDlg(const QString&fname,QWidget * parent, const char * name) | 115 | infoDlg::infoDlg(const QString&fname,QWidget * parent, const char * name) |
116 | :QDialog(parent,name,true,WStyle_ContextHelp) | 116 | :QDialog(parent,name,true,WStyle_ContextHelp) |
117 | { | 117 | { |
118 | QVBoxLayout*dlglayout = new QVBoxLayout(this); | 118 | QVBoxLayout*dlglayout = new QVBoxLayout(this); |
119 | dlglayout->setSpacing(2); | 119 | dlglayout->setSpacing(2); |
120 | dlglayout->setMargin(1); | 120 | dlglayout->setMargin(1); |
121 | imageinfo*inf = new imageinfo(fname,this); | 121 | imageinfo*inf = new imageinfo(fname,this); |
122 | dlglayout->addWidget(inf); | 122 | dlglayout->addWidget(inf); |
123 | } | 123 | } |
124 | 124 | ||
125 | infoDlg::~infoDlg() | 125 | infoDlg::~infoDlg() |
126 | { | 126 | { |
127 | } | 127 | } |