summaryrefslogtreecommitdiff
path: root/core/launcher/launcher.h
authorzecke <zecke>2003-08-28 14:54:19 (UTC)
committer zecke <zecke>2003-08-28 14:54:19 (UTC)
commitfa605085c3f966aa2897cacea03b24025c5c23a3 (patch) (side-by-side diff)
treee342f66d4773a9197cda6db0f4bb432a97e04616 /core/launcher/launcher.h
parentfc83c75dd33cb31f80bfa2587a4b7689061deaa8 (diff)
downloadopie-fa605085c3f966aa2897cacea03b24025c5c23a3.zip
opie-fa605085c3f966aa2897cacea03b24025c5c23a3.tar.gz
opie-fa605085c3f966aa2897cacea03b24025c5c23a3.tar.bz2
prepare busy cursor config
Diffstat (limited to 'core/launcher/launcher.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/launcher.h177
1 files changed, 81 insertions, 96 deletions
diff --git a/core/launcher/launcher.h b/core/launcher/launcher.h
index 0616734..2917027 100644
--- a/core/launcher/launcher.h
+++ b/core/launcher/launcher.h
@@ -1,7 +1,8 @@
/**********************************************************************
** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
**
-** This file is part of the Qtopia Environment.**
+** This file is part of the Qtopia Environment.
+**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
@@ -19,152 +20,136 @@
#ifndef LAUNCHER_H
#define LAUNCHER_H
-#include <qpe/config.h>
-#include <qpe/applnk.h>
-
-#include <opie/ofileselector.h>
-
+#include <qtopia/config.h>
+#include <qtopia/storage.h>
+#include <qtopia/applnk.h>
#include <qmainwindow.h>
-#include <qtabbar.h>
#include <qstringlist.h>
+#include <qprogressbar.h>
#include <qvbox.h>
#include <qlist.h>
-#include <qpe/palmtopuidgen.h>
+#include <qdict.h>
#include "launcherview.h"
+#include "launchertab.h"
+#include "serverinterface.h"
-class AppLnk;
-class AppLnkSet;
-class DocLnkSet;
class QWidgetStack;
-class StorageInfo;
-class SyncDialog;
+class TaskBar;
+class Launcher;
-
-class DocumentTab : public OFileSelector
-{
- Q_OBJECT
+class LauncherTabWidget : public QVBox {
+ // can't use a QTabWidget, since it won't let us set the frame style.
+ Q_OBJECT
public:
- DocumentTab( QWidget *parent, int mode, int selector, const QString &dirName, const QString &fileName);//, 4,0, "/","");
-~DocumentTab();
-private:
+ LauncherTabWidget( Launcher* parent );
-};
+ void updateDocs(AppLnkSet* docFolder);
+ void setBusy(bool on);
+ LauncherView *currentView(void);
-class CategoryTabBar : public QTabBar
-{
- Q_OBJECT
-public:
- CategoryTabBar( QWidget *parent=0, const char *name=0 );
- ~CategoryTabBar();
+ LauncherView* newView( const QString&, const QPixmap& pm, const QString& label );
+ void deleteView( const QString& );
+ void setTabViewAppearance( LauncherView *v, Config &cfg );
+ void setTabAppearance( LauncherTab *, Config &cfg );
-signals:
+ LauncherView *view( const QString & );
+ LauncherView *docView();
-protected slots:
- virtual void layoutTabs();
+ void createDocLoadingWidget();
+ void setLoadingWidgetEnabled( bool v );
+ void setLoadingProgress( int percent );
-protected:
- void paint ( QPainter *p, QTab *t, bool f ) const;
- void paintLabel( QPainter* p, const QRect& br, QTab* t, bool has_focus ) const;
-
-};
+ LauncherTabBar* categoryBar;
+
+ void setBusyIndicatorType( const QString& type );
-class CategoryTabWidget : public QVBox {
- // can't use a QTabWidget, since it won't let us set the frame style.
- Q_OBJECT
-public:
- CategoryTabWidget( QWidget* parent );
- void initializeCategories(AppLnkSet* rootFolder, AppLnkSet* docFolder,
- const QList<FileSystem> &);
-// void updateDocs(AppLnkSet* docFolder, const QList<FileSystem> &fs);
- void updateLink(const QString& linkfile);
- void setBusy(bool on);
- QString getAllDocLinkInfo() const;
- LauncherView *view( const QString &id );
- void setBusyIndicatorType ( const QString &type );
- DocumentTab *fileSel;
signals:
void selected(const QString&);
void clicked(const AppLnk*);
void rightPressed(AppLnk*);
- void ofileSel(const DocLnk &);
-public slots:
- void nextTab();
- void prevTab();
- void showTab(const QString&);
- void clickie(const DocLnk&);
- void clickie(const QString &);
+
protected slots:
+ void raiseTabWidget();
void tabProperties();
+ void initLayout();
+
+private slots:
+ void launcherMessage( const QCString &, const QByteArray &);
+ void appMessage( const QCString &, const QByteArray &);
+ void setProgressStyle();
protected:
- void setTabAppearance( const QString &id, Config &cfg );
void paletteChange( const QPalette &p );
+ void styleChange( QStyle & );
private:
- CategoryTabBar* categoryBar;
- QWidgetStack* stack;
- LauncherView* docview;
- QStringList ids;
- int tabs;
- LauncherView* newView( const QString&, const QPixmap& pm, const QString& label );
- void addItem( const QString& );
+ Launcher *launcher;
+ LauncherView *docview;
+
+ QWidgetStack *stack;
+ LauncherView *docLoadingWidget;
+ QProgressBar *docLoadingWidgetProgress;
+ bool docLoadingWidgetEnabled;
};
-class Launcher : public QMainWindow
+class Launcher : public QMainWindow, public ServerInterface
{
Q_OBJECT
- friend class LauncherPrivate;
public:
- Launcher( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ Launcher();
~Launcher();
- static QString appsFolderName();
-
- virtual void showMaximized();
- static bool mkdir(const QString &path);
+ // implementing ServerInterface
+ void createGUI();
+ void destroyGUI();
+ void typeAdded( const QString& type, const QString& name, const QPixmap& pixmap, const QPixmap& bgPixmap );
+ void typeRemoved( const QString& type );
+ void applicationAdded( const QString& type, const AppLnk& doc );
+ void applicationRemoved( const QString& type, const AppLnk& doc );
+ void allApplicationsRemoved();
+ void applicationStateChanged( const QString& name, ApplicationState state );
+ void documentAdded( const DocLnk& doc );
+ void documentRemoved( const DocLnk& doc );
+ void allDocumentsRemoved();
+ void documentChanged( const DocLnk& oldDoc, const DocLnk& newDoc );
+ void storageChanged( const QList<FileSystem> & );
+ void applicationScanningProgress( int percent );
+ void documentScanningProgress( int percent );
+ bool requiresApplications() const { return TRUE; }
+ bool requiresDocuments() const { return TRUE; }
+ void showLoadingDocs();
+ void showDocTab();
+
+ QStringList idList() const { return ids; }
public slots:
void viewSelected(const QString&);
void showTab(const QString&);
void select( const AppLnk * );
- void externalSelected( const AppLnk *);
void properties( AppLnk * );
- void nextView();
+ void makeVisible();
signals:
void executing( const AppLnk * );
- void busy();
- void notBusy(const QString&);
private slots:
- void doMaximize();
void systemMessage( const QCString &, const QByteArray &);
- void launcherMessage( const QCString &, const QByteArray &);
- void storageChanged();
- void cancelSync();
+ void toggleSymbolInput();
+ void toggleNumLockState();
+ void toggleCapsLockState();
+
+protected:
+ bool eventFilter( QObject *o, QEvent *ev );
private:
void updateApps();
void loadDocs();
void updateDocs();
void updateTabs();
- void updateMimeTypes();
- void updateMimeTypes(AppLnkSet*);
- void preloadApps();
- AppLnkSet *rootFolder;
- DocLnkSet *docsFolder;
- CategoryTabWidget *tabs;
- StorageInfo *storage;
- SyncDialog *syncDialog;
-
- void updateLink(const QString& link);
- bool in_lnk_props;
- bool got_lnk_change;
- QString lnk_change;
-
- QString m_timeStamp;
- Qtopia::UidGen uidgen;
+
+ LauncherTabWidget *tabs;
+ QStringList ids;
+ TaskBar *tb;
};
#endif // LAUNCHERVIEW_H
-