summaryrefslogtreecommitdiff
path: root/noncore/graphics/opie-eye/gui/iconview.cpp
Side-by-side diff
Diffstat (limited to 'noncore/graphics/opie-eye/gui/iconview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/iconview.cpp61
1 files changed, 41 insertions, 20 deletions
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp
index de2cdf0..4ced52d 100644
--- a/noncore/graphics/opie-eye/gui/iconview.cpp
+++ b/noncore/graphics/opie-eye/gui/iconview.cpp
@@ -36,7 +36,10 @@
using Opie::Ui::OKeyConfigItem;
+/*
+ * The Icons, Request Cache and IconViewItem for the IconView
+ */
namespace {
- QPixmap* _dirPix = 0;
- QPixmap* _unkPix = 0;
+ static QPixmap* _dirPix = 0;
+ static QPixmap* _unkPix = 0;
class IconViewItem : public QIconViewItem {
public:
@@ -60,6 +63,6 @@ namespace {
* we add it to the map
*/
- QMap<QString, IconViewItem*> g_stringInf;
- QMap<QString, IconViewItem*> g_stringPix;
+ static QMap<QString, IconViewItem*> g_stringInf;
+ static QMap<QString, IconViewItem*> g_stringPix;
IconViewItem::IconViewItem( QIconView* view,const QString& path,
@@ -102,4 +105,8 @@ namespace {
+/*
+ * Set up the GUI.. initialize the slave set up gui
+ * and also load a dir
+ */
PIconView::PIconView( QWidget* wid, Opie::Core::OConfig* cfg )
: QVBox( wid ), m_cfg( cfg ), m_updatet( false )
@@ -137,4 +144,7 @@ PIconView::PIconView( QWidget* wid, Opie::Core::OConfig* cfg )
}
+/*
+ * Unref the slave and save the keyboard manager
+ */
PIconView::~PIconView() {
{
@@ -149,4 +159,9 @@ Opie::Ui::OKeyConfigManager* PIconView::manager() {
}
+
+/*
+ * init the KeyBoard Shortcuts
+ * called from the c'tor
+ */
void PIconView::initKeys() {
Opie::Ui::OKeyPair::List lst;
@@ -179,4 +194,8 @@ void PIconView::initKeys() {
}
+
+/*
+ * change one dir up
+ */
void PIconView::slotDirUp() {
QDir dir( m_path );
@@ -186,4 +205,7 @@ void PIconView::slotDirUp() {
}
+/*
+ * change the dir
+ */
void PIconView::slotChangeDir(const QString& path) {
if ( !currentView() )
@@ -285,7 +307,7 @@ void PIconView::addFolders( const QStringList& lst) {
QStringList::ConstIterator it;
- for(it=lst.begin(); it != lst.end(); ++it ) {
+ for(it=lst.begin(); it != lst.end(); ++it )
(void)new IconViewItem( m_view, m_path+"/"+(*it), (*it), true );
- }
+
}
@@ -306,5 +328,5 @@ void PIconView::slotClicked(QIconViewItem* _it) {
slotChangeDir( it->path() );
else // view image
- ;
+ slotShowImage();
}
@@ -361,9 +383,7 @@ void PIconView::slotBeamDone( Ir* ir) {
void PIconView::slotStart() {
m_view->viewport()->setUpdatesEnabled( false );
- qWarning( "Sig Start" );
}
void PIconView::slotEnd() {
- qWarning( "SLot End" );
if ( m_updatet )
m_view->arrangeItemsInGrid( );
@@ -372,25 +392,26 @@ void PIconView::slotEnd() {
}
-void PIconView::slotShowImage() {
- qDebug("image show");
+void PIconView::slotShowImage()
+{
+ qWarning( "SLotShowImage" );
bool isDir = false;
QString name = currentFileName(isDir);
if (isDir) return;
- ImageDlg dlg(name);
- QPEApplication::execDialog(&dlg);
-}
-void PIconView::slotShowImage( const QString& ) {
+ slotShowImage( name );
+}
+void PIconView::slotShowImage( const QString& name) {
+ emit sig_display( name );
}
void PIconView::slotImageInfo() {
- qDebug("image info");
+ qWarning( "SlotImageInfo" );
bool isDir = false;
QString name = currentFileName(isDir);
if (isDir) return;
- infoDlg dlg(name);
- QPEApplication::execDialog(&dlg);
+
+ slotImageInfo( name );
}
-void PIconView::slotImageInfo( const QString& ) {
-
+void PIconView::slotImageInfo( const QString& name) {
+ emit sig_showInfo( name );
}