src/scythia.h

00001 /***************************************************************************
00002  *   Copyleft (C) 2004 by Cocophotos                                       *
00003  *   cocophotos@hotmail.com                                                *
00004  *   Sous licence GPL v2 ou plus                                           *
00005  ***************************************************************************/
00006 
00007 #ifndef SCYTHIA_H
00008 #define SCYTHIA_H
00009 
00010 #include <QtCore>
00011 #include <QtGui>
00012 #include <QtNetwork>
00013 #include "liste_signet.h"
00014 #include "MyFtp/myftp.h"
00015 #include "ui_scythia.h"
00016 #include "transfers.h"
00017 
00018 /*************************************************************************/
00020 
00023 /*************************************************************************/
00024 class scythia:public QMainWindow, public Ui::scythia
00025 {
00026         Q_OBJECT
00027 public:
00029         scythia(QWidget * parent = 0);
00031         ~scythia();
00032 
00039         MyFtp *ftp;
00042         transfers *transfersWidget;
00044         ListeSignet list;
00046         QString listProgs;
00048         QString currentFtpDir;
00050         QString Host;
00052         QString UserName;
00054         QString Password;
00056         int Port;
00058         int itemSelected;
00060         enum ListSelected
00061         { Nothing, LocalList, FtpList, TransfersList };
00063         ListSelected listSelected;
00065         QLabel *stateLabel;
00067         QLabel *waitLabel;
00069         QLabel *connectLabel;
00071         QSystemTrayIcon *trayIcon;
00073         QMenu *menu;
00075         bool systemTray;
00077         QProcess progs;
00078 
00079 public slots:
00080         /*************************************************************
00081         Gestion des connexions/déconnexions
00082         *************************************************************/
00085         void slotConnect();
00088         void slotDisconnect();
00098         void slotStateChanged(int state);
00107         void slotDetailledError(const QString & error);
00108 
00109         /*************************************************************
00110         Gestion des différents changements de dossiers
00111         *************************************************************/
00113         void slotReloadFtpList();
00115         void slotReloadLocalList();
00117         void slotReloadList();
00119         void slotLocalPathChanged();
00121         void slotFtpPathChanged();
00124         void slotChangeLocalPath(QTreeWidgetItem *);
00127         void slotChangeLocalPath(const QString &);
00130         void slotChangeLocalPath();
00133         void slotChangeFtpPath(QTreeWidgetItem *);
00136         void slotChangeFtpPath();
00138         void slotHiddenFiles();
00139 
00140         /*************************************************************
00141         Actions directs sur les fichiers
00142         *************************************************************/
00144         void slotOpenFile();
00147         void slotRemoveFile();
00150         void slotNewFolder();
00153         void slotRenameFile();
00156         void slotDownload(const QString & destDir = NULL);
00157         inline void slot_download()
00158         {
00159                 slotDownload();
00160         }
00163         void slotUpload(const QString & destDir = NULL);
00164         inline void slot_upload()
00165         {
00166                 slotUpload();
00167         }
00170         //void slotDataTransferProgress(qint64 done, qint64 total);
00172         void slotDownloadFinished(const QString &destPath, int id, bool error);
00174         void slotUploadFinished(const QString &destPath, int id, bool error);
00176         void slotExecProg();
00177 
00178         /*************************************************************
00179         Autres actions...
00180         *************************************************************/
00182         void slotCommand();
00184         void slotAddSignet();
00186         void slotSelectLang();
00187 
00188         /*************************************************************
00189         Gestion de l'affichage
00190         *************************************************************/
00192         void slotSelectAll();
00194         void slotAffichToolbarFile();
00196         void slotAffichToolbarConnect();
00198         void slotAffichToolbarTransfert();
00200         void slotHideToolbarFile();
00202         void slotHideToolbarConnect();
00204         void slotHideToolbarTransfert();
00207         void slotLocalSelection(QTreeWidgetItem * = NULL);
00210         void slotFtpSelection(QTreeWidgetItem * = NULL);
00212         void slotTransferSelection(QTreeWidgetItem * = NULL);
00214         void slotPopupLocal(QTreeWidgetItem * item, const QPoint pos);
00216         void slotPopupFtp(QTreeWidgetItem * item, const QPoint pos);
00218         void slotHelp();
00220         void slotCurrentActionChanged(MyFtp::FtpCurrentAction action);
00222         void showOrHide();
00224         void closeEvent (QCloseEvent*);
00226         void trayIconActivated(QSystemTrayIcon::ActivationReason reason);
00227 };
00228 
00229 #endif

Generated on Wed Jan 2 20:39:34 2008 for Scythia by  doxygen 1.5.4