summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/launcher.h171
1 files changed, 78 insertions, 93 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,170 +1,155 @@
/**********************************************************************
** 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
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#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
-{
+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 );
-class CategoryTabBar : public QTabBar
-{
- Q_OBJECT
-public:
- CategoryTabBar( QWidget *parent=0, const char *name=0 );
- ~CategoryTabBar();
+ void updateDocs(AppLnkSet* docFolder);
+ void setBusy(bool on);
+ LauncherView *currentView(void);
-signals:
+ 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 );
-protected slots:
- virtual void layoutTabs();
+ LauncherView *view( const QString & );
+ LauncherView *docView();
-protected:
- void paint ( QPainter *p, QTab *t, bool f ) const;
- void paintLabel( QPainter* p, const QRect& br, QTab* t, bool has_focus ) const;
+ void createDocLoadingWidget();
+ void setLoadingWidgetEnabled( bool v );
+ void setLoadingProgress( int percent );
-};
+ LauncherTabBar* categoryBar;
-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;
+ Launcher *launcher;
LauncherView* docview;
- QStringList ids;
- int tabs;
- LauncherView* newView( const QString&, const QPixmap& pm, const QString& label );
- void addItem( const QString& );
+
+ 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
-