summaryrefslogtreecommitdiff
path: root/noncore
Side-by-side diff
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/iconview.cpp28
-rw-r--r--noncore/graphics/opie-eye/gui/iconview.h6
-rw-r--r--noncore/graphics/opie-eye/gui/imageinfoui.cpp26
-rw-r--r--noncore/graphics/opie-eye/gui/imageinfoui.h6
-rw-r--r--noncore/graphics/opie-eye/gui/imageview.cpp22
-rw-r--r--noncore/graphics/opie-eye/gui/imageview.h6
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.h4
7 files changed, 47 insertions, 51 deletions
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp
index 7e4164b..2a49786 100644
--- a/noncore/graphics/opie-eye/gui/iconview.cpp
+++ b/noncore/graphics/opie-eye/gui/iconview.cpp
@@ -24,25 +24,25 @@
#include <qiconview.h>
#include <qlabel.h>
#include <qhbox.h>
#include <qcombobox.h>
#include <qdir.h>
#include <qapplication.h>
#include <qmainwindow.h>
#include <qtimer.h>
#include <qstyle.h>
-using Opie::Ui::OKeyConfigItem;
+using Opie::Core::OKeyConfigItem;
/*
* The Icons, Request Cache and IconViewItem for the IconView
*/
namespace {
static QPixmap* _dirPix = 0;
static QPixmap* _unkPix = 0;
class IconViewItem : public QIconViewItem {
public:
IconViewItem( QIconView*, const QString& path, const QString& name, bool isDir = false);
QPixmap* pixmap()const;
QString path()const { return m_path; }
@@ -147,58 +147,58 @@ PIconView::PIconView( QWidget* wid, Opie::Core::OConfig* cfg )
/*
* Unref the slave and save the keyboard manager
*/
PIconView::~PIconView() {
{
QCopEnvelope( "QPE/Application/opie-eye_slave", "refDown()" );
}
m_viewManager->save();
delete m_viewManager;
}
-Opie::Ui::OKeyConfigManager* PIconView::manager() {
+Opie::Core::OKeyConfigManager* PIconView::manager() {
return m_viewManager;
}
/*
* init the KeyBoard Shortcuts
* called from the c'tor
*/
void PIconView::initKeys() {
- Opie::Ui::OKeyPair::List lst;
- lst.append( Opie::Ui::OKeyPair::upArrowKey() );
- lst.append( Opie::Ui::OKeyPair::downArrowKey() );
- lst.append( Opie::Ui::OKeyPair::leftArrowKey() );
- lst.append( Opie::Ui::OKeyPair::rightArrowKey() );
- lst.append( Opie::Ui::OKeyPair::returnKey() );
-
- m_viewManager = new Opie::Ui::OKeyConfigManager(m_cfg, "View-KeyBoard-Config",
+ Opie::Core::OKeyPair::List lst;
+ lst.append( Opie::Core::OKeyPair::upArrowKey() );
+ lst.append( Opie::Core::OKeyPair::downArrowKey() );
+ lst.append( Opie::Core::OKeyPair::leftArrowKey() );
+ lst.append( Opie::Core::OKeyPair::rightArrowKey() );
+ lst.append( Opie::Core::OKeyPair::returnKey() );
+
+ m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "View-KeyBoard-Config",
lst, false,this, "keyconfig name" );
m_viewManager->addKeyConfig( OKeyConfigItem(tr("Beam Current Item") , "beam",
Resource::loadPixmap("beam"), BeamItem,
- Opie::Ui::OKeyPair(Qt::Key_B, Qt::ShiftButton),
+ Opie::Core::OKeyPair(Qt::Key_B, Qt::ShiftButton),
this, SLOT(slotBeam())) );
m_viewManager->addKeyConfig( OKeyConfigItem(tr("Delete Current Item"), "delete",
Resource::loadPixmap("trash"), DeleteItem,
- Opie::Ui::OKeyPair(Qt::Key_D, Qt::ShiftButton),
+ Opie::Core::OKeyPair(Qt::Key_D, Qt::ShiftButton),
this, SLOT(slotTrash())) );
m_viewManager->addKeyConfig( OKeyConfigItem(tr("View Current Item"), "view",
Resource::loadPixmap("1to1"), ViewItem,
- Opie::Ui::OKeyPair(Qt::Key_V, Qt::ShiftButton),
+ Opie::Core::OKeyPair(Qt::Key_V, Qt::ShiftButton),
this, SLOT(slotShowImage())));
m_viewManager->addKeyConfig( OKeyConfigItem(tr("Show Image Info") , "info",
Resource::loadPixmap("DocumentTypeWord"), InfoItem,
- Opie::Ui::OKeyPair(Qt::Key_I, Qt::ShiftButton ),
+ Opie::Core::OKeyPair(Qt::Key_I, Qt::ShiftButton ),
this, SLOT(slotImageInfo()) ) );
m_viewManager->load();
m_viewManager->handleWidget( m_view );
}
/*
* change one dir up
*/
void PIconView::slotDirUp() {
QDir dir( m_path );
dir.cdUp();
diff --git a/noncore/graphics/opie-eye/gui/iconview.h b/noncore/graphics/opie-eye/gui/iconview.h
index a4ca0bc..9cf7b3e 100644
--- a/noncore/graphics/opie-eye/gui/iconview.h
+++ b/noncore/graphics/opie-eye/gui/iconview.h
@@ -10,41 +10,39 @@
class QIconView;
class QIconViewItem;
class QComboBox;
class PIconViewItem;
class PDirLister;
class Ir;
namespace Opie {
namespace Core{
class OConfig;
-}
-namespace Ui {
class OKeyConfigManager;
}
}
class PIconView : public QVBox {
Q_OBJECT
friend class PIconViewItem;
enum ActionIds {
BeamItem, DeleteItem, ViewItem, InfoItem
};
public:
PIconView( QWidget* wid, Opie::Core::OConfig *cfg );
~PIconView();
void resetView();
- Opie::Ui::OKeyConfigManager* manager();
+ Opie::Core::OKeyConfigManager* manager();
signals:
void sig_showInfo( const QString& );
void sig_display( const QString& );
private:
void initKeys();
QString currentFileName(bool &isDir)const;
void loadViews();
private slots:
void slotDirUp();
@@ -64,21 +62,21 @@ private slots:
void slotStart();
void slotEnd();
/* for performance reasons make it inline in the future */
void addFolders( const QStringList& );
void addFiles( const QStringList& );
void slotClicked(QIconViewItem* );
/**/
void slotThumbInfo(const QString&, const QString&);
void slotThumbNail(const QString&, const QPixmap&);
private:
- Opie::Ui::OKeyConfigManager *m_viewManager;
+ Opie::Core::OKeyConfigManager *m_viewManager;
Opie::Core::OConfig *m_cfg;
QComboBox* m_views;
QIconView* m_view;
QString m_path;
bool m_updatet : 1;
};
#endif
diff --git a/noncore/graphics/opie-eye/gui/imageinfoui.cpp b/noncore/graphics/opie-eye/gui/imageinfoui.cpp
index 0b3250c..27a67a6 100644
--- a/noncore/graphics/opie-eye/gui/imageinfoui.cpp
+++ b/noncore/graphics/opie-eye/gui/imageinfoui.cpp
@@ -37,54 +37,54 @@ imageinfo::imageinfo(Opie::Core::OConfig *cfg,QWidget* parent, const char* name,
}
imageinfo::imageinfo(const QString&_path, QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl ),currentFile(_path)
{
m_viewManager = 0;
m_cfg = 0;
init(name);
initKeys();
slotChangeName(_path);
}
-Opie::Ui::OKeyConfigManager* imageinfo::manager()
+Opie::Core::OKeyConfigManager* imageinfo::manager()
{
if (!m_viewManager) {
initKeys();
}
return m_viewManager;
}
void imageinfo::initKeys()
{
odebug << "init imageinfo keys" << oendl;
#if 0
if (!m_cfg) {
m_cfg = new Opie::Core::OConfig("phunkview");
m_cfg->setGroup("imageinfo_keys" );
}
#endif
- Opie::Ui::OKeyPair::List lst;
- lst.append( Opie::Ui::OKeyPair::upArrowKey() );
- lst.append( Opie::Ui::OKeyPair::downArrowKey() );
- lst.append( Opie::Ui::OKeyPair::leftArrowKey() );
- lst.append( Opie::Ui::OKeyPair::rightArrowKey() );
- lst.append( Opie::Ui::OKeyPair::returnKey() );
-
- m_viewManager = new Opie::Ui::OKeyConfigManager(m_cfg, "imageinfo_keys",
+ Opie::Core::OKeyPair::List lst;
+ lst.append( Opie::Core::OKeyPair::upArrowKey() );
+ lst.append( Opie::Core::OKeyPair::downArrowKey() );
+ lst.append( Opie::Core::OKeyPair::leftArrowKey() );
+ lst.append( Opie::Core::OKeyPair::rightArrowKey() );
+ lst.append( Opie::Core::OKeyPair::returnKey() );
+
+ m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "imageinfo_keys",
lst, false,this, "keyconfig name" );
- m_viewManager->addKeyConfig( Opie::Ui::OKeyConfigItem(tr("View Full Image"), "infoview",
- Resource::loadPixmap("1to1"), ViewItem,
- Opie::Ui::OKeyPair(Qt::Key_V, Qt::ShiftButton),
- this, SLOT(slotShowImage())));
+ m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("View Full Image"), "infoview",
+ Resource::loadPixmap("1to1"), ViewItem,
+ Opie::Core::OKeyPair(Qt::Key_V, Qt::ShiftButton),
+ this, SLOT(slotShowImage())));
m_viewManager->load();
m_viewManager->handleWidget( this );
m_viewManager->handleWidget( TextView1 );
}
void imageinfo::slotShowImage()
{
emit dispImage(currentFile);
}
void imageinfo::init(const char* name) {
{
diff --git a/noncore/graphics/opie-eye/gui/imageinfoui.h b/noncore/graphics/opie-eye/gui/imageinfoui.h
index c9b83a1..bc99bf9 100644
--- a/noncore/graphics/opie-eye/gui/imageinfoui.h
+++ b/noncore/graphics/opie-eye/gui/imageinfoui.h
@@ -6,66 +6,64 @@
#include <qdialog.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QFrame;
class QLabel;
class QTextView;
namespace Opie {
namespace Core {
class OConfig;
- }
- namespace Ui {
class OKeyConfigManager;
}
}
class imageinfo : public QWidget
{
Q_OBJECT
enum ActionIds {
ViewItem
};
public:
imageinfo(Opie::Core::OConfig *cfg, QWidget* parent = 0, const char* name = 0, WFlags fl =0);
imageinfo(const QString&_path, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
virtual ~imageinfo();
void setDestructiveClose();
- Opie::Ui::OKeyConfigManager* manager();
+ Opie::Core::OKeyConfigManager* manager();
signals:
void dispImage(const QString&);
void sig_return();
public slots:
virtual void setPath( const QString& path );
virtual void slotShowImage();
private:
void init(const char* name);
protected:
QLabel* PixmapLabel1;
QLabel* fnameLabel;
QFrame* Line1;
QTextView* TextView1;
QVBoxLayout* imageinfoLayout;
QString currentFile;
Opie::Core::OConfig * m_cfg;
- Opie::Ui::OKeyConfigManager*m_viewManager;
+ Opie::Core::OKeyConfigManager*m_viewManager;
void initKeys();
protected slots:
virtual void slot_fullInfo(const QString&, const QString&);
virtual void slotThumbNail(const QString&, const QPixmap&);
virtual void slotChangeName(const QString&);
};
/* for testing purpose */
class infoDlg:public QDialog
{
diff --git a/noncore/graphics/opie-eye/gui/imageview.cpp b/noncore/graphics/opie-eye/gui/imageview.cpp
index e43bbff..2078b19 100644
--- a/noncore/graphics/opie-eye/gui/imageview.cpp
+++ b/noncore/graphics/opie-eye/gui/imageview.cpp
@@ -14,48 +14,48 @@ ImageView::ImageView(Opie::Core::OConfig *cfg, QWidget* parent, const char* name
m_viewManager = 0;
m_cfg = cfg;
initKeys();
}
ImageView::~ImageView()
{
if (m_viewManager) {
delete m_viewManager;
}
}
-Opie::Ui::OKeyConfigManager* ImageView::manager()
+Opie::Core::OKeyConfigManager* ImageView::manager()
{
if (!m_viewManager) {
initKeys();
}
return m_viewManager;
}
void ImageView::initKeys()
{
odebug << "init imageview keys" << oendl;
if (!m_cfg) {
m_cfg = new Opie::Core::OConfig("phunkview");
m_cfg->setGroup("image_view_keys" );
}
- Opie::Ui::OKeyPair::List lst;
- lst.append( Opie::Ui::OKeyPair::upArrowKey() );
- lst.append( Opie::Ui::OKeyPair::downArrowKey() );
- lst.append( Opie::Ui::OKeyPair::leftArrowKey() );
- lst.append( Opie::Ui::OKeyPair::rightArrowKey() );
- lst.append( Opie::Ui::OKeyPair::returnKey() );
-
- m_viewManager = new Opie::Ui::OKeyConfigManager(m_cfg, "image_view_keys",
+ Opie::Core::OKeyPair::List lst;
+ lst.append( Opie::Core::OKeyPair::upArrowKey() );
+ lst.append( Opie::Core::OKeyPair::downArrowKey() );
+ lst.append( Opie::Core::OKeyPair::leftArrowKey() );
+ lst.append( Opie::Core::OKeyPair::rightArrowKey() );
+ lst.append( Opie::Core::OKeyPair::returnKey() );
+
+ m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "image_view_keys",
lst, false,this, "image_view_keys" );
- m_viewManager->addKeyConfig( Opie::Ui::OKeyConfigItem(tr("View Image Info"), "imageviewinfo",
+ m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("View Image Info"), "imageviewinfo",
Resource::loadPixmap("1to1"), ViewInfo,
- Opie::Ui::OKeyPair(Qt::Key_I,Qt::ShiftButton),
+ Opie::Core::OKeyPair(Qt::Key_I,Qt::ShiftButton),
this, SLOT(slotShowImageInfo())));
m_viewManager->handleWidget( this );
m_viewManager->load();
}
void ImageView::slotShowImageInfo()
{
emit dispImageInfo(m_lastName);
}
diff --git a/noncore/graphics/opie-eye/gui/imageview.h b/noncore/graphics/opie-eye/gui/imageview.h
index f61c93f..87e2b32 100644
--- a/noncore/graphics/opie-eye/gui/imageview.h
+++ b/noncore/graphics/opie-eye/gui/imageview.h
@@ -1,40 +1,38 @@
#ifndef _IMAGE_VIEW_H
#define _IMAGE_VIEW_H
/* must be changed when it will moved to Opie::MM */
#include "imagescrollview.h"
namespace Opie {
namespace Core {
class OConfig;
- }
- namespace Ui {
class OKeyConfigManager;
}
}
class ImageView:public ImageScrollView
{
Q_OBJECT
enum ActionIds {
ViewInfo
};
public:
ImageView(Opie::Core::OConfig *cfg, QWidget* parent, const char* name = 0, WFlags fl = 0 );
virtual ~ImageView();
- Opie::Ui::OKeyConfigManager* manager();
+ Opie::Core::OKeyConfigManager* manager();
signals:
void dispImageInfo(const QString&);
void sig_return();
protected:
Opie::Core::OConfig * m_cfg;
- Opie::Ui::OKeyConfigManager*m_viewManager;
+ Opie::Core::OKeyConfigManager*m_viewManager;
void initKeys();
protected slots:
virtual void slotShowImageInfo();
};
#endif
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.h b/noncore/graphics/opie-eye/gui/mainwindow.h
index 042d568..59dba30 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.h
+++ b/noncore/graphics/opie-eye/gui/mainwindow.h
@@ -5,27 +5,29 @@
#ifndef PHUNK_MAIN_WINDOW_H
#define PHUNK_MAIN_WINDOW_H
#include <opie2/oconfig.h>
#include <qmainwindow.h>
namespace Opie {
namespace Ui{
- class OKeyConfigManager;
class OWidgetStack;
}
+namespace Core{
+ class OKeyConfigManager;
+}
}
class PIconView;
class imageinfo;
class ImageView;
class PMainWindow : public QMainWindow {
Q_OBJECT
enum Views { IconView, ImageInfo, ImageDisplay };
public:
static QString appName() { return QString::fromLatin1("opie-eye" ); }
PMainWindow(QWidget*, const char*, WFlags );
~PMainWindow();