summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/iconview.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp
index c07a1e5..7e4164b 100644
--- a/noncore/graphics/opie-eye/gui/iconview.cpp
+++ b/noncore/graphics/opie-eye/gui/iconview.cpp
@@ -106,48 +106,50 @@ namespace {
106 106
107/* 107/*
108 * Set up the GUI.. initialize the slave set up gui 108 * Set up the GUI.. initialize the slave set up gui
109 * and also load a dir 109 * and also load a dir
110 */ 110 */
111PIconView::PIconView( QWidget* wid, Opie::Core::OConfig* cfg ) 111PIconView::PIconView( QWidget* wid, Opie::Core::OConfig* cfg )
112 : QVBox( wid ), m_cfg( cfg ), m_updatet( false ) 112 : QVBox( wid ), m_cfg( cfg ), m_updatet( false )
113{ 113{
114 { 114 {
115 QCopEnvelope( "QPE/Application/opie-eye_slave", "refUp()" ); 115 QCopEnvelope( "QPE/Application/opie-eye_slave", "refUp()" );
116 } 116 }
117 m_path = QDir::homeDirPath(); 117 m_path = QDir::homeDirPath();
118 118
119 QHBox *hbox = new QHBox( this ); 119 QHBox *hbox = new QHBox( this );
120 QLabel* lbl = new QLabel( hbox ); 120 QLabel* lbl = new QLabel( hbox );
121 lbl->setText( tr("View as" ) ); 121 lbl->setText( tr("View as" ) );
122 122
123 m_views = new QComboBox( hbox, "View As" ); 123 m_views = new QComboBox( hbox, "View As" );
124 connect( m_views, SIGNAL(activated(int)), 124 connect( m_views, SIGNAL(activated(int)),
125 this, SLOT(slotViewChanged(int)) ); 125 this, SLOT(slotViewChanged(int)) );
126 126
127 m_view= new QIconView( this ); 127 m_view= new QIconView( this );
128 connect(m_view, SIGNAL(clicked(QIconViewItem*) ), 128 connect(m_view, SIGNAL(clicked(QIconViewItem*) ),
129 this, SLOT(slotClicked(QIconViewItem*)) ); 129 this, SLOT(slotClicked(QIconViewItem*)) );
130 connect(m_view, SIGNAL(returnPressed(QIconViewItem*)),
131 this, SLOT(slotClicked(QIconViewItem*)) );
130 132
131 m_view->setArrangement( QIconView::LeftToRight ); 133 m_view->setArrangement( QIconView::LeftToRight );
132 m_view->setItemTextPos( QIconView::Right ); 134 m_view->setItemTextPos( QIconView::Right );
133 135
134 int dw = QApplication::desktop()->width(); 136 int dw = QApplication::desktop()->width();
135 int viewerWidth = dw-style().scrollBarExtent().width(); 137 int viewerWidth = dw-style().scrollBarExtent().width();
136 m_view->setGridX( viewerWidth-3*m_view->spacing()); 138 m_view->setGridX( viewerWidth-3*m_view->spacing());
137 m_view->setGridY( fontMetrics().height()*2+40 ); 139 m_view->setGridY( fontMetrics().height()*2+40 );
138 140
139 141
140 initKeys(); 142 initKeys();
141 143
142 loadViews(); 144 loadViews();
143 slotViewChanged( m_views->currentItem() ); 145 slotViewChanged( m_views->currentItem() );
144} 146}
145 147
146/* 148/*
147 * Unref the slave and save the keyboard manager 149 * Unref the slave and save the keyboard manager
148 */ 150 */
149PIconView::~PIconView() { 151PIconView::~PIconView() {
150 { 152 {
151 QCopEnvelope( "QPE/Application/opie-eye_slave", "refDown()" ); 153 QCopEnvelope( "QPE/Application/opie-eye_slave", "refDown()" );
152 } 154 }
153 m_viewManager->save(); 155 m_viewManager->save();
@@ -390,49 +392,48 @@ void PIconView::slotThumbNail(const QString& _path, const QPixmap &pix) {
390} 392}
391 393
392 394
393/* 395/*
394 * FIXME rename 396 * FIXME rename
395 */ 397 */
396void PIconView::slotRename() { 398void PIconView::slotRename() {
397 399
398} 400}
399 401
400 402
401/* 403/*
402 * BEAM the current file 404 * BEAM the current file
403 */ 405 */
404void PIconView::slotBeam() { 406void PIconView::slotBeam() {
405 bool isDir; 407 bool isDir;
406 QString pa = currentFileName( isDir ); 408 QString pa = currentFileName( isDir );
407 if ( isDir && pa.isEmpty() ) 409 if ( isDir && pa.isEmpty() )
408 return; 410 return;
409 411
410 Ir* ir = new Ir( this ); 412 Ir* ir = new Ir( this );
411 connect( ir, SIGNAL(done(Ir*)), 413 connect( ir, SIGNAL(done(Ir*)),
412 this, SLOT(slotBeamDone(Ir*))); 414 this, SLOT(slotBeamDone(Ir*)));
413 ir->send(pa, tr( "Image" ) ); 415 ir->send(pa, tr( "Image" ) );
414
415} 416}
416 417
417/* 418/*
418 * BEAM done clean up 419 * BEAM done clean up
419 */ 420 */
420void PIconView::slotBeamDone( Ir* ir) { 421void PIconView::slotBeamDone( Ir* ir) {
421 delete ir; 422 delete ir;
422} 423}
423 424
424void PIconView::slotStart() { 425void PIconView::slotStart() {
425 m_view->viewport()->setUpdatesEnabled( false ); 426 m_view->viewport()->setUpdatesEnabled( false );
426} 427}
427 428
428void PIconView::slotEnd() { 429void PIconView::slotEnd() {
429 if ( m_updatet ) 430 if ( m_updatet )
430 m_view->arrangeItemsInGrid( ); 431 m_view->arrangeItemsInGrid( );
431 m_view->viewport()->setUpdatesEnabled( true ); 432 m_view->viewport()->setUpdatesEnabled( true );
432 m_updatet = false; 433 m_updatet = false;
433} 434}
434 435
435void PIconView::slotShowImage() 436void PIconView::slotShowImage()
436{ 437{
437 bool isDir = false; 438 bool isDir = false;
438 QString name = currentFileName(isDir); 439 QString name = currentFileName(isDir);