summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Rules.make5
-rw-r--r--libslcompat/.cvsignore6
-rw-r--r--libslcompat/README4
-rw-r--r--libslcompat/config.in4
-rw-r--r--libslcompat/libslcompat.pro16
-rw-r--r--libslcompat/slcolorselector.cpp64
-rw-r--r--libslcompat/slcolorselector.h112
-rw-r--r--libslcompat/slfiledialog.h70
-rw-r--r--libslcompat/slfileselector.cpp86
-rw-r--r--libslcompat/slfileselector.h414
-rw-r--r--libslcompat/slmisc.h135
-rw-r--r--packages1
12 files changed, 916 insertions, 1 deletions
diff --git a/Rules.make b/Rules.make
index 16b4ffa..69b54e4 100644
--- a/Rules.make
+++ b/Rules.make
@@ -93,13 +93,14 @@ $(QTDIR)/stamp-headers-x11 :
$(OPIEDIR)/stamp-headers :
@-rm -f $(OPIEDIR)/stamp-headers*
mkdir -p $(TOPDIR)/include/qpe \
$(TOPDIR)/include/qtopia \
$(TOPDIR)/include/opie \
$(TOPDIR)/include/opie2 \
- $(TOPDIR)/include/qtopia/private
+ $(TOPDIR)/include/qtopia/private \
+ $(TOPDIR)/include/sl
( cd include/qpe && rm -f *.h; ln -sf ../../library/*.h .; ln -sf ../../library/backend/*.h .; rm -f *_p.h; )
( cd include/qtopia && rm -f *.h; ln -sf ../../library/*.h .; )
( cd include/qtopia/private && rm -f *.h; ln -sf ../../../library/backend/*.h .; )
# libopie1
( cd include/opie && rm -f *.h; ln -sf ../../libopie/*.h .; rm -f *_p.h; )
( cd include/opie && ln -sf ../../libopie/pim/*.h .; )
@@ -114,13 +115,15 @@ $(OPIEDIR)/stamp-headers :
( cd include/opie2 && ln -sf ../../libopie2/opiepim/core/*.h .; )
( cd include/opie2 && ln -sf ../../libopie2/opiepim/core/backends/*.h .; )
( cd include/opie2 && ln -sf ../../libopie2/opiepim/ui/*.h .; )
( cd include/opie2 && ln -sf ../../libopie2/opieui/*.h .; )
( cd include/opie2 && ln -sf ../../libopie2/opieui/fileselector/*.h .; )
( cd include/opie2 && ln -sf ../../libopie2/opieui/big-screen/*.h .; )
+ # auxilliary libraries
( cd include/opie2 && ln -sf ../../libqtaux/*.h .; )
+ ( cd include/sl && ln -sf ../../libslcompat/*.h .; )
# all
( cd include/opie; for generatedHeader in `cd ../../libopie; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \
ln -sf ../../libopie/$$generatedHeader $$generatedHeader; done )
ln -sf ../../library/custom.h $(TOPDIR)/include/qpe/custom.h
touch $@
diff --git a/libslcompat/.cvsignore b/libslcompat/.cvsignore
new file mode 100644
index 0000000..8f7300c
--- a/dev/null
+++ b/libslcompat/.cvsignore
@@ -0,0 +1,6 @@
+Makefile*
+moc*
+*moc
+*.o
+~*
+
diff --git a/libslcompat/README b/libslcompat/README
new file mode 100644
index 0000000..1bed034
--- a/dev/null
+++ b/libslcompat/README
@@ -0,0 +1,4 @@
+Skeleton for a compat library for the Sharp closed source libsl.
+Early stage and will probably never be useful except for getting
+some of the japaneese apps to compile.
+Better pester Sharp to open up their sources.
diff --git a/libslcompat/config.in b/libslcompat/config.in
new file mode 100644
index 0000000..365d217
--- a/dev/null
+++ b/libslcompat/config.in
@@ -0,0 +1,4 @@
+ config LIBSLCOMPAT
+ boolean "Sharp libsl compatibility library"
+ default "n"
+ depends on LIBOPIE2UI
diff --git a/libslcompat/libslcompat.pro b/libslcompat/libslcompat.pro
new file mode 100644
index 0000000..84d9ad6
--- a/dev/null
+++ b/libslcompat/libslcompat.pro
@@ -0,0 +1,16 @@
+TEMPLATE = lib
+CONFIG += qte warn_on debug
+
+HEADERS = slcolorselector.h \
+ slfileselector.h \
+ slmisc.h
+
+SOURCES = slcolorselector.cpp \
+ slfileselector.cpp
+
+TARGET = slcompat
+INCLUDEPATH += $(OPIEDIR)/include
+DESTDIR = $(OPIEDIR)/lib
+LIBS += -lopiecore2 -lopieui2 -lqtaux2
+
+include ( $(OPIEDIR)/include.pro )
diff --git a/libslcompat/slcolorselector.cpp b/libslcompat/slcolorselector.cpp
new file mode 100644
index 0000000..18b408f
--- a/dev/null
+++ b/libslcompat/slcolorselector.cpp
@@ -0,0 +1,64 @@
+#include "slcolorselector.h"
+
+SlColorTable::SlColorTable( QWidget *parent, const char *name,WFlags f,
+ int r, int c, const QRgb *a )
+ :QTableView( parent, name, f )
+{
+}
+
+SlColorTable::~SlColorTable()
+{
+}
+
+QSize SlColorTable::sizeHint() const
+{
+}
+
+void SlColorTable::paintCell(QPainter*,int,int)
+{
+}
+
+void SlColorTable::mousePressEvent(QMouseEvent*)
+{
+}
+
+void SlColorTable::mouseMoveEvent(QMouseEvent*)
+{
+}
+
+void SlColorTable::mouseReleaseEvent(QMouseEvent*)
+{
+}
+
+void SlColorTable::keyPressEvent(QKeyEvent*)
+{
+}
+
+
+/*================================================================*/
+
+SlColorSelector::SlColorSelector(bool isTransparentAccept, QWidget *parent, const char *name, WFlags f)
+ :QVBox( parent, name, f )
+{
+}
+
+SlColorSelector::~SlColorSelector()
+{
+}
+
+/*================================================================*/
+
+SlColorSelectorPopup::SlColorSelectorPopup(bool isTransparentAccept, QWidget *parent, const char *name, WFlags f)
+ :OColorPopupMenu( QColor(), parent, name )
+{
+}
+
+
+SlColorSelectorPopup::~SlColorSelectorPopup()
+{
+}
+
+void SlColorSelectorPopup::setCurrentColor(QRgb)
+{
+}
+
diff --git a/libslcompat/slcolorselector.h b/libslcompat/slcolorselector.h
new file mode 100644
index 0000000..e1ee1f2
--- a/dev/null
+++ b/libslcompat/slcolorselector.h
@@ -0,0 +1,112 @@
+/*
+ * Copyright (C) 2002 SHARP CORPORATION All rights reserved.
+ */
+#ifndef _SLCOLORSELECTOR_H_INCLUDED
+#define _SLCOLORSELECTOR_H_INCLUDED
+
+#include <opie2/ocolorpopupmenu.h>
+using namespace Opie;
+#include <qtableview.h>
+#include <qpopupmenu.h>
+#include <qvbox.h>
+
+#define DEF_COLOR_R (6)
+#define DEF_COLOR_C (8)
+struct SlColorTablePrivate;
+class SlColorTable : public QTableView
+{
+ Q_OBJECT
+public:
+ SlColorTable(QWidget *parent=0,const char *name=NULL,WFlags f=0,
+ int r=DEF_COLOR_R,int c=DEF_COLOR_C,const QRgb *a=NULL);
+ ~SlColorTable();
+ void setCurrentColor(QRgb);
+
+protected:
+ QSize sizeHint() const;
+ void paintCell(QPainter*,int,int);
+ void mousePressEvent(QMouseEvent*);
+ void mouseMoveEvent(QMouseEvent*);
+ void mouseReleaseEvent(QMouseEvent*);
+ void keyPressEvent(QKeyEvent*);
+
+signals:
+
+
+ void selected(QRgb rgb);
+
+
+ void reSelected(QRgb rgb);
+
+private:
+ SlColorTablePrivate *p;
+ void setCurrent(int,int);
+ void setSelected(int,int);
+ QRgb getRgbInCell(int,int);
+};
+
+
+struct SlColorSelectorPrivate;
+class SlColorSelector : public QVBox
+{
+ Q_OBJECT
+public:
+ SlColorSelector(bool isTransparentAccept,
+ QWidget *parent=0,const char *name=NULL,WFlags f=0);
+ ~SlColorSelector();
+ void setCurrentColor(QRgb);
+ void setCurrentColorTransparent();
+
+signals:
+
+
+ void selected(QRgb rgb);
+
+
+ void reSelected(QRgb rgb);
+
+
+ void transparentSelected();
+
+
+ void transparentReSelected();
+/*
+private slots:
+ void slotTransparentToggled(int);
+*/
+private:
+ SlColorSelectorPrivate *p;
+};
+
+struct SlColorSelectorPopupPrivate;
+class SlColorSelectorPopup : public OColorPopupMenu //QPopupMenu
+{
+ Q_OBJECT
+public:
+ SlColorSelectorPopup(bool isTransparentAccept,
+ QWidget *parent=0,const char *name=NULL,WFlags f=0);
+ ~SlColorSelectorPopup();
+ void setCurrentColor(QRgb);
+ void setCurrentColorTransparent();
+
+signals:
+
+
+ void selected(QRgb rgb);
+
+
+ void transparentSelected();
+/*
+private slots:
+ void slotSelected(QRgb);
+ void slotReSelected(QRgb);
+ void slotTransparentSelected();
+ void slotTransparentReSelected();
+*/
+private:
+ SlColorSelectorPopupPrivate *p;
+};
+
+#endif
+
+
diff --git a/libslcompat/slfiledialog.h b/libslcompat/slfiledialog.h
new file mode 100644
index 0000000..2ad105c
--- a/dev/null
+++ b/libslcompat/slfiledialog.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2002 SHARP CORPORATION All rights reserved.
+ */
+#ifndef __SLFILEDIALOG_H__
+#define __SLFILEDIALOG_H__
+
+#include <qdialog.h>
+#include <qfileinfo.h>
+#include <qvalidator.h>
+#include <sl/slmisc.h>
+
+class SlFileNameValidator : public QValidator
+{
+ Q_OBJECT
+public:
+ SlFileNameValidator( QWidget * parent, const char * name = 0 ) : QValidator(parent,name) {};
+ virtual State validate(QString&,int&) const;
+ virtual void fixup(QString&) const;
+};
+
+class SlFileDialogPrivate;
+class SlFileDialog : public QDialog
+{
+ Q_OBJECT
+public:
+
+
+ SlFileDialog(bool bSaveAs = FALSE, QWidget * parent=0, const char * name=0, bool modal=TRUE, WFlags f=0 );
+
+
+ virtual ~SlFileDialog();
+
+
+ void setNewDirEnabled(bool);
+
+
+ void setDefaultFile( QString path );
+ void setDefaultName( QString name );
+
+
+ void setMimeType( QString mime );
+
+
+ void setComplementExt( QString ext );
+
+
+ void setIconViewType(bool isIcon);
+
+
+ QString &getFilePath();
+ QString &getFileName();
+
+ int exec();
+
+protected slots:
+ virtual void accept();
+
+ void fileSelected(const QFileInfo &fInfo);
+ void slotNewDir();
+ void rotateChanged();
+ void keyPressed(QKeyEvent*,bool&);
+
+protected:
+ void getDefaultColumnWidth(SlMisc::SlListColumnInfos &infos);
+
+ SlFileDialogPrivate *m_pD;
+
+};
+
+#endif
diff --git a/libslcompat/slfileselector.cpp b/libslcompat/slfileselector.cpp
new file mode 100644
index 0000000..3189b51
--- a/dev/null
+++ b/libslcompat/slfileselector.cpp
@@ -0,0 +1,86 @@
+#include "slfileselector.h"
+
+SlFileIconView::SlFileIconView( QWidget* parent, const char* name )
+ :QIconView( parent, name )
+{
+}
+
+SlFileIconView::~SlFileIconView()
+{
+}
+
+/*================================================================*/
+
+SlFileListView::SlFileListView( QWidget* parent, const char* name )
+ :QListView( parent, name )
+{
+}
+
+SlFileListView::~SlFileListView()
+{
+}
+
+/*================================================================*/
+
+SlFileSelector::SlFileSelector( const QString &dirPath, const QString &mimefilter, QWidget *parent, const char *name )
+ :OFileSelector( dirPath, parent, name )
+{
+}
+
+SlFileSelector::~SlFileSelector()
+{
+}
+
+bool SlFileSelector::isTopDir()
+{
+ return false;
+}
+
+void SlFileSelector::setSelected()
+{
+}
+
+void SlFileSelector::setSelected(const QString&)
+{
+ int a;
+}
+
+void SlFileSelector::createFileList()
+{
+ int a;
+}
+
+void SlFileSelector::createFileList(QDir&)
+{
+ int a;
+}
+
+const QFileInfo* SlFileSelector::selected()
+{
+ int a;
+}
+
+void SlFileSelector::setCurrentFile(const QString&)
+{
+ int a;
+}
+
+const QString SlFileSelector::currentDir()
+{
+ int a;
+}
+
+
+void SlFileSelector::focusInEvent(QFocusEvent*)
+{
+}
+
+void SlFileSelector::show()
+{
+}
+
+void SlFileSelector::keyPressEvent( QKeyEvent *e )
+{
+}
+
+
diff --git a/libslcompat/slfileselector.h b/libslcompat/slfileselector.h
new file mode 100644
index 0000000..35fd11b
--- a/dev/null
+++ b/libslcompat/slfileselector.h
@@ -0,0 +1,414 @@
+/*
+ * Copyright (C) 2002 SHARP CORPORATION All rights reserved.
+ */
+#ifndef _SLFILESELECTOR_H_INCLUDED
+#define _SLFILESELECTOR_H_INCLUDED
+
+#include <opie2/ofileselector.h>
+using namespace Opie;
+#include <qhbox.h>
+#include <qvbox.h>
+#include <qlistview.h>
+#include <qiconview.h>
+#include <qtoolbutton.h>
+#include <qfileinfo.h>
+#include <qtableview.h>
+#include <qwidgetstack.h>
+#include <qvaluelist.h>
+
+#include <qpe/applnk.h>
+#include <qpe/mimetype.h>
+#include <sl/slmisc.h>
+
+class QComboBox;
+class SlFileItemType;
+class QCopChannel;
+
+struct SlFileListItemPrivate;
+class SlFileListItem
+{
+public:
+ SlFileListItem(const QFileInfo&,const MimeType&);
+ ~SlFileListItem();
+ const QFileInfo &file() const;
+ const MimeType &mimeType() const;
+ const QString getItemIconFilePath() const;
+ const QString name() const;
+ void setName(const QString&);
+ const QString sortKey() const;
+ void setSortKey(const QString&);
+ QPixmap pixmap() const;
+ QPixmap bigPixmap() const;
+ const QString dateString() const;
+ const QString typeString() const;
+ const QString bytesString() const;
+ void setDevice();
+ bool isDevice() const;
+ enum ColumnItem {
+ Name = 1,
+ Type,
+ Date,
+ Bytes,
+ Custom = 100
+ };
+private:
+ SlFileListItemPrivate *p;
+ SlFileListItem(const SlFileListItem&);
+};
+
+typedef QValueList<SlFileListItem*> SlFileList;
+typedef QValueList<SlFileListItem::ColumnItem> SlFileListColumnConf;
+
+class SlFileListViewItem;
+
+struct SlFileListViewPrivate;
+class SlFileListView : public QListView
+{
+ Q_OBJECT
+
+public:
+ SlFileListView(QWidget*, const char*);
+ ~SlFileListView();
+ void createFileList(SlFileList&);
+ int fileCount() const;
+ void updateItem(SlFileListViewItem*);
+ void createItem(SlFileListItem*);
+ void deleteItem(const QString&);
+ void deleteItem(SlFileListViewItem*);
+ SlFileListViewItem* searchItem(const QString&);
+ SlFileListColumnConf columnConf();
+ void setColumnConf(SlFileListColumnConf&);
+ void updateColumn();
+ static const QString columnItemName(SlFileListItem::ColumnItem);
+ static const SlFileListColumnConf columnItemList();
+
+ //virtual void takeItem( SlFileListViewItem * );
+
+ SlMisc::SlListColumnInfos columnWidthInfos();
+
+protected:
+ //void keyPressEvent( QKeyEvent *e );
+
+signals:
+ void keyPressed(QKeyEvent *e,bool &isAccepted);
+
+protected slots:
+
+private:
+ friend class SlFileSelector;
+ SlFileListViewPrivate *p;
+ SlFileListView(const SlFileListView&);
+};
+
+class SlFileIconViewItem;
+
+struct SlFileIconViewPrivate;
+class SlFileIconView : public QIconView
+{
+ Q_OBJECT
+
+public:
+ SlFileIconView(QWidget*, const char*);
+ ~SlFileIconView();
+ void createFileList(SlFileList&);
+ int fileCount() const;
+ void updateItem(SlFileIconViewItem*);
+ void createItem(SlFileListItem*);
+ void deleteItem(const QString&);
+ void deleteItem(SlFileIconViewItem*);
+ SlFileIconViewItem* searchItem(const QString&);
+ void setSorting(int column,bool ascending);
+ int sortColumn() const;
+ void repaintItemsForce();
+ SlFileListColumnConf columnConf();
+ void setColumnConf(SlFileListColumnConf&);
+
+ //virtual void takeItem( SlFileIconViewItem * );
+
+protected:
+ //void keyPressEvent( QKeyEvent *e );
+
+protected slots:
+
+signals:
+ void keyPressed(QKeyEvent *e,bool &isAccepted);
+
+private:
+ friend class SlFileSelector;
+ SlFileIconViewPrivate *p;
+ SlFileIconView(const SlFileIconView&);
+};
+
+class SlFileSelectorFilter : public QObject
+{
+public:
+ SlFileSelectorFilter(QWidget *parent,const char *name=0);
+ ~SlFileSelectorFilter();
+
+ virtual bool isAddToList(QFileInfo&) const = 0;
+private:
+ SlFileSelectorFilter(const SlFileSelectorFilter&);
+};
+
+typedef QList<MimeType> SlFileMimeTypeList;
+
+struct SlFileSelectorPrivate;
+class SlFileSelector : public OFileSelector /*QVBox*/
+{
+ Q_OBJECT
+
+public:
+
+
+ enum SlFileSelectorViewType {
+
+ ListView = 1,
+
+ IconView
+ };
+
+
+ enum SlFileOverwirteMode {
+
+ Overwrite = 1,
+
+ NewName,
+
+ Error
+ };
+ SlFileSelector(const QString &dirPath,
+ const QString &mimefilter,
+ QWidget *parent,
+ const char *name);
+ SlFileSelector(const QString &currentFileName,
+ SlFileSelectorViewType type,
+ const QString &mimeFilter,
+ SlFileListColumnConf &items,
+ int sortColumn,bool sortAscending,
+ SlFileSelectorFilter *filter=NULL,
+ bool isRecursive=FALSE,
+ QWidget *parent=NULL,
+ const char *name=NULL,
+ WFlags f=0);
+ SlFileSelector(QWidget *parent=NULL,const char *name=NULL,WFlags f=0);
+ virtual ~SlFileSelector();
+ void createFileList();
+ void createFileList(QDir&);
+ int fileCount() const;
+ const QFileInfo* selected();
+ void modifyItem(QFileInfo*,bool);
+ void createItem(QString&);
+ void deleteItem(const QString&);
+ void deleteItem();
+ void updateItem(const QString&);
+ SlFileListItem* searchItem(const QString&);
+ void setSelected();
+ void setSelected(const QString&);
+ void ensureItemVisible();
+ SlFileListItem* selectedItem();
+ bool setSelectedNext(bool);
+ bool setSelectedPrev(bool);
+ const QString currentDir();
+ void setSorting(int,bool);
+ int sortColumn() const;
+ bool ascending() const;
+ SlFileSelectorViewType viewType();
+ void setColumnItem(SlFileListColumnConf&);
+ void setViewType(SlFileSelectorViewType);
+ void setListView();
+ void setIconView();
+ int columnWidth(int);
+ void setColumnWidth(int,int);
+ static const QString columnItemName(SlFileListItem::ColumnItem);
+ static const SlFileListColumnConf columnItemList();
+
+ int columns() const;
+
+ bool upDir();
+ bool isTopDir();
+
+ void setCurrentFile(const QString&);
+ const QString currentFile(bool isReal=FALSE);
+ static bool copyFile(const QString&,const QString&,
+ SlFileOverwirteMode m=Error,
+ QString *resultName=NULL);
+
+ static bool copyFileCreateDir(const QString &srcName,
+ const QString &dstName,
+ SlFileOverwirteMode m=Error,
+ QString *resultName=NULL);
+ static bool moveFile(const QString&,const QString&,
+ SlFileOverwirteMode m=Error,
+ QString *resultName=NULL);
+ static QString getCopyFileName(const QString&);
+
+ const QStringList& recent() const;
+ void setRecent(const QStringList&);
+
+
+ void setRecent(const QStringList&,bool isReplace);
+ void setRecentEnabled(bool);
+
+ const QStringList& history() const;
+ void setHistory(const QStringList&);
+
+
+ void setHistory(const QStringList&,bool isReplace);
+ bool isHistoryBackAvailable() const;
+ bool isHistoryForwardAvailable() const;
+ bool historyBack();
+ bool historyForward();
+ QPopupMenu *backHistoryPopupMenu() const;
+ QPopupMenu *forwardHistoryPopupMenu() const;
+ void setColumnConf(SlFileListColumnConf&);
+
+ void sendFileUpdateMessage(const QString&);
+ void updateView();
+ void recreateIcon();
+ void focusToNext();
+ void focusToPrev();
+ bool rename();
+ bool newfolder();
+ bool del();
+ bool duplicate();
+ bool cut();
+ bool copy();
+ bool paste();
+ void setMimeFilter(const QString &);
+ void clearTmpFolder();
+
+ void setRecursive(bool,bool);
+ bool recursive() const;
+ void setFilter(SlFileSelectorFilter *);
+ SlFileSelectorFilter *filter();
+ bool isEnablePaste();
+
+ static bool deleteFile(const QString&);
+ static bool deleteDir(const QDir&);
+ static bool copyDir(const QString &srcName,const QString &dstName,
+ SlFileOverwirteMode m=Error);
+ static bool moveDir(const QString&,const QString&,
+ SlFileOverwirteMode m=Error);
+ static QString getCopyDirName(const QString &);
+ static bool makeDir(const QString &path);
+
+ static uint size(const QString &fName);
+ static uint fileFree(const QString &fName);
+
+
+
+ enum DesktopMode {
+
+ HideDesktop = 1,
+
+ ShowAll,
+
+ FileTab
+ };
+ void setDesktopMode(DesktopMode mode);
+ void setEnabledSystemChannel(bool);
+ void showUpDirBtn(bool);
+ void showWritableFile(bool);
+
+
+ void setEnableSD(bool);
+ void setEnableCF(bool);
+ bool getEnableSD();
+ bool getEnableCF();
+
+
+
+
+ void sendKeyPressEvent( QKeyEvent *e );
+
+ void setScale(int scale);
+ int scale() const;
+
+ SlMisc::SlListColumnInfos columnWidthInfos();
+
+
+
+ enum FocusMode {
+
+ Auto = 1,
+
+ ByTab,
+
+ ByCommand
+ };
+ void setFocusMode(FocusMode mode);
+
+ void adjustContentsSize();
+
+ static void updateFile(const QString &filename);
+
+ bool delFile(const QString &mymsg);
+
+ bool isIncludedFile(const QString &filename);
+
+signals:
+
+
+ void selectionChanged(const QFileInfo &file,bool isDevice);
+
+
+ void fileSelected(const QFileInfo &file);
+
+
+ void dirOpened(const QDir &dir);
+
+
+ void enabledPaste(bool);
+
+
+ void columnWidthChanged(int column,int oldSize,int newSize);
+
+
+ void itemRightPressed(const QFileInfo &file,const QPoint &pos);
+
+
+ void selectionLost();
+
+
+ //void keyPressed(QKeyEvent *e,bool &isAccepted);
+/*
+private slots:
+ void fileClicked(QListViewItem *);
+ void fileClicked(QIconViewItem *);
+ void selectionChanged(QListViewItem *);
+ void selectionChanged(QIconViewItem *);
+ void dMenuChanged(int);
+ void changeDirectory(int,bool isImmediate=TRUE);
+ void hMenuSelected(int);
+ void cardMessage( const QCString &, const QByteArray &);
+ void systemMessage( const QCString &, const QByteArray &);
+ void headerClicked(int);
+ void asyncHMenuSelected();
+ void asyncDMenuChanged();
+ void rightPressed(QIconViewItem *,const QPoint&);
+ void rightPressed(QListViewItem *,const QPoint&,int);
+ void upDirClicked();
+ void slotKeyPressed(QKeyEvent *e,bool &isAccepted);
+*/
+protected:
+ void focusInEvent(QFocusEvent*);
+ void show();
+ void keyPressEvent( QKeyEvent *e );
+
+private:
+ void openDirInside(QDir&);
+ void createMyPda();
+ void init();
+ SlFileSelectorPrivate *p;
+ SlFileSelector(const SlFileSelector&);
+ ulong focusWidgets() const;
+ QWidget* nextFocus(QWidget *,bool) const;
+ bool focusToTheWidget(QWidget *);
+};
+
+#endif
+
+
+
+
+
diff --git a/libslcompat/slmisc.h b/libslcompat/slmisc.h
new file mode 100644
index 0000000..20ba988
--- a/dev/null
+++ b/libslcompat/slmisc.h
@@ -0,0 +1,135 @@
+/*
+ * Copyright (C) 2002 SHARP CORPORATION All rights reserved.
+ */
+#ifndef _SLMISC_H_INCLUDED
+#define _SLMISC_H_INCLUDED
+
+#include <qpe/qpeapplication.h>
+#include <qfileinfo.h>
+#include <qpe/global.h>
+#include <qmessagebox.h>
+
+
+#define _SLPOWER
+
+class QPopupMenu;
+class QListView;
+#if !defined(_SLPOWER)
+class PowerStatus;
+#else
+class SlPowerStatus;
+#endif
+class Config;
+
+typedef ulong SlResolutionScale;
+
+class SlMisc {
+public:
+ static bool isExecutable(const QString &c) {
+ QFileInfo exec(QPEApplication::qpeDir() + "/bin/" + c);
+ return exec.isExecutable();
+ };
+ static ulong availableMemory();
+ static bool invalidFileName(QString &fName);
+ static QString getValidFileName(const QString &baseName);
+ static QString getCanonicalPath(const QString &fName);
+ static void enableAutoPowerOff(bool isOn);
+ static void enableAutoPowerOff(bool isOn,bool DimAlso,bool ScreenSaverAlso=FALSE);
+ static void enableLockApplication(bool);
+ static bool isTheSmbShareFileHasWriteEntry(const QString &shareFName);
+ static bool isTheSmbShareFileNowCopy(const QString &shareFName);
+ static bool checkTheSmbShareFileMode(const QString &shareFName,
+ char modeMask, char checkMode, bool equality);
+ static bool isTheFileLockedBySmbd(const QString &fName);
+ static bool isSambaForked();
+ static void startSamba();
+ static void stopSamba();
+ enum ListType { Pid, CmdLine, Both };
+ static QStringList procList (const QRegExp& re, uint max = 0, enum ListType type = Pid);
+ static void dumpMemInfo(bool isShowHeap);
+ static bool canCreateTheFile(const QString&);
+ static QString getLanguage();
+ static QSize getMaximizedWidgetInfo();
+ static QSize SlMisc::getScrollbarMetrics();
+ static int getDpi();
+ static SlResolutionScale getResolutionScale();
+ static int getMaximizedWidgetContentsWidth();
+ static bool isLandscape();
+ static void requestCloseFile(const QString&);
+ static void requestOpenFile(const QString&);
+
+ static void insertStandardFontMenu(QPopupMenu *pm);
+ static void insertAllFontMenu(QPopupMenu *pm);
+ static int getLogicalSizeFromMenuId(int id);
+ static void setFontSizeItemChecked(QPopupMenu *pm,int logicalSize);
+ static int getFontPointSize(int logicalSize);
+ static void toggleFontSize(QPopupMenu *pm,int &logicalSize,bool isLarge=true);
+ static void toggleAllFontSize(QPopupMenu *pm,int *fontSize,bool isLarge=true);
+
+ static void SlFontArrange (QWidget* widget);
+ static void SlLayoutSpaceArrange (QObject* object);
+
+ static bool checkBatteryError(const QString &module_name, bool force);
+ static bool checkBatteryErrorWithoutDialog(const QString &module_name, bool force);
+
+
+ enum InputDeviceType {
+ BuiltinKeyboard = 1,
+ SoftwareKeyboard = 2
+ };
+ static InputDeviceType defaultInputDevice();
+
+
+ typedef struct SlListColumnInfo {
+ enum Type {
+ Fixed = 0,
+ StringLen,
+ Scale,
+ FixedDpiAware
+ };
+ Type type;
+ QString str;
+ int val;
+ };
+ typedef QValueList<SlListColumnInfo> SlListColumnInfos;
+
+ static void setListColumnsWidth(QWidget *w,SlListColumnInfos &infos,
+ Config &config);
+ static void writeListColumnsWidth(QWidget *w,SlListColumnInfos &infos,
+ Config &config);
+ static void writeListColumnsWidth(QWidget *w,SlListColumnInfos &infos,
+ Config &config,bool isLandscape);
+ static void rotateListColumnsWidth(QWidget *w,SlListColumnInfos &infos,
+ Config &config);
+ static void setListColumnsWidth(QWidget *w,SlListColumnInfos &infos, Config *config=NULL);
+ static void writeListColumnsWidth(QWidget *w,SlListColumnInfos &infos, Config *config=NULL);
+ static void writeListColumnsWidth(QWidget *w,SlListColumnInfos &infos, bool isLandscape, Config *config=NULL);
+ static void rotateListColumnsWidth(QWidget *w,SlListColumnInfos &infos, Config *config=NULL);
+ static void temporaryMessageBox(const QString &caption, const QString &text, int msec=10000, QMessageBox::Icon icon=QMessageBox::NoIcon, int button0=0, int button1=0, int button2=0, QWidget *parent=0, const char *name=0, QWidget::WFlags f=QWidget::WStyle_DialogBorder);
+
+ static QString defaultWallPaper();
+ typedef enum AppCommand {
+ NoneCommand = 0,
+ NewCommand,
+ ModifyCommand,
+ DeleteCommand,
+ ZoomInCommand,
+ ZoomOutCommand,
+ CutCommand = 50,
+ CopyCommand,
+ PasteCommand
+ };
+ static AppCommand appCommandFromKey(const QKeyEvent &e);
+
+ typedef enum RequiredSize {
+ SmallSize = 0,
+ LargeSize
+ };
+ static const char* getTmpPath(RequiredSize);
+ static const char* getTmpPath(ulong);
+ static QString getObexTmpPath();
+ static ulong availableInternalStorage(void);
+ static QString moduleNameFromPath(const QString &path);
+};
+
+#endif
diff --git a/packages b/packages
index d5a0c14..b56cfac 100644
--- a/packages
+++ b/packages
@@ -85,12 +85,13 @@ CONFIG_LIBOPIE libopie libopie.pro
CONFIG_LIBOPIE_PIM libopie/pim pim.pro
CONFIG_LIBOPIETOOTH noncore/net/opietooth/lib lib.pro
CONFIG_LIBQPE library library.pro
CONFIG_LIBQPE-X11 x11/libqpe-x11 libqpe-x11.pro
CONFIG_LIBQTAUX libqtaux libqtaux.pro
CONFIG_LIBSQL libsql libsql.pro
+CONFIG_LIBSLCOMPAT libslcompat libslcompat.pro
CONFIG_LIBTREMOR core/multimedia/opieplayer/vorbis/tremor tremor.pro
CONFIG_LIBTREMORPLUGIN core/multimedia/opieplayer/vorbis libtremor.pro
CONFIG_LIGHT-AND-POWER core/settings/light-and-power light-and-power.pro
CONFIG_LIQUID noncore/styles/liquid liquid.pro
CONFIG_LOGOUTAPPLET core/applets/logoutapplet logoutapplet.pro
CONFIG_MAIL3 noncore/net/mail mail.pro