Logo Search packages:      
Sourcecode: ultracopier version File versions  Download package


     Begin        : Sat May 3 2008 12:22 alpha_one_x86
     Project      : Ultracopier
     Email        : ultracopier@first-world.info
     Note         : See README for copyright and developer
     Target       : Define the class of the UIcon


#include <QSystemTrayIcon>
#include <QObject>
#include <QAction>
#include <QMenu>
#include <QTimer>
#include <QDir>
#include <QtNetwork/QLocalServer>
#include <QtNetwork/QLocalSocket>

#include "Mwindow.h"
#include "Options.h"
#include "helpdialog.h"
#include "structDef.h"

/** \brief The systray icon

This class provide a systray icon and it function
00034 class UIcon : public QObject
      // The destructor
      //save pointer to QApplication
      void saveApp(QApplication * app);
      //For for a delayed popup thread safe
      void showDelayedPopupThreadSafe(const QString& text);
      //For give to UIcon the application arguments
      void dispatchParam(QStringList argumentsUltracopier,QLocalSocket * client=NULL,quint32 copyId=0,quint32 protocolVersionOfThisQuery=0);
      //append the log
      void appendLog(QString htmlFormat);
        //return if the socket is listening
        bool is_listen();
      void OrderUpdateStyle();
      void RunTheCopy();
      void SignalPopup(QString);
00058       QSystemTrayIcon* sysTrayIcon;       ///< Pointer on the systray icon
00059       QMenu* systrayMenu;                 ///< Pointer on the menu
00060       QMenu* copyMenu;              ///< Pointer on the copy menu (move or copy)
00061       QAction* actionMenuQuit;            ///< Pointer on the Quit action
00062       QAction* actionMenuAbout;           ///< Pointer on the About action
00063       QAction* actionCopy;                ///< Pointer on the Copy action
00064       QAction* actionMove;                ///< Pointer on the Move action
00065       QAction* actionOptions;             ///< Pointer on the Options action
00066       QIcon* IconQuit;              ///< Pointer on the icon for quit
00067       QIcon* IconInfo;              ///< Pointer on the icon for info
00068       QIcon* IconAdd;                     ///< Pointer on the icon for add
00069       QIcon* IconOptions;                 ///< Pointer on the options
00070       QApplication* ThisApp;              ///< Pointer on the application
00071       optionsDialog* TheOptions;          ///< Pointer on the options dialog for keep only one instance opened
00072       bool iconActivBool;                 ///< Store the state of the systray icon, activated or not
00073       QTimer TimerForTheDelayedPopup;           ///< Timer for the delayed popup
00074       QString TextOfTheDelayedPopup;            ///< Text for the delayed popup
00075       QTimer TimerForDelayedAllocation;   ///< Timer for delayed allocation
00076       QTimer TimeOutQLocalSocket;         ///< Timer for detect time out on QLocalSocket
00077       QSystemTrayIcon::MessageIcon MessageIconTheDelayedPopup;///< Type of the popup
00078       bool UIconIsListen;                 ///< Store if it listen
00079       QLocalServer* localServer;          ///< For create a local server
00080       QList<QLocalSocket *> clients;            ///< For the local clients
00081       QList<composedData> listDataClient; ///< For compose data
00082       QList<Main_window *> theMainWindowCopyMove;///< Pointer on copy or move windows
00083       QList<composedCommandId> listCommand;     ///< List of command linked with window
00084       helpDialog* theHelpDialog;          ///< The help dialog
00085       bool windowIsPreloaded;             ///< True if the last theMainWindowCopyMove it's preload of window
      /// \brief parse the cleaned trame
      void parseTheCleanedTrame(QByteArray trame,QLocalSocket * client,quint32 copyId);
      /// \brief return what the order is finished
      void theOrderIsFinished(int index);
      /// \brief quint32* to quint32 with QDataStream
      quint32 QByteArrayToquint32(QByteArray temp);
private slots:
      //quit all the current application
      void QuitAction();
      //show about box
      void HelpAction();
      /// \brief Show about box
      void HelpText();
      //new copy window
      Main_window * CopyAction();
      //new move window
      Main_window * MoveAction();
      //show the options windows
      void OptiAction();
      //for catch an action on the window
      void CatchAction(QSystemTrayIcon::ActivationReason reason);
      //show the popup message
      void ShowPopupMessage();
      //update the style
      void UpdateStyle();
      //update the systray icon
      void UpdateSsystrayIcon();
      //after listen
      bool on_listen();
      //Data is incomming
      void dataincommingUI();
      //Deconnexion client
      void deconnectClientUI();
      //New connexion
      void newConnexionUI();
      //If error occured at socket
      void errorUI(QLocalSocket::LocalSocketError theErrorDefine);
      //Preload 1 instance
      void preloadOneInstance();
      //Destroy and reload the instance
      void DestroyAndReloadTheInstantce();
      //For for a delayed popup
      void showDelayedPopup(const QString& text,QSystemTrayIcon::MessageIcon icon=QSystemTrayIcon::Critical);
      //delete old windows
      void deleteClosedWindows();
      //set arguement for the main window
      void setArgumentMainWindow(Main_window *,QStringList,QLocalSocket *,quint32,quint32);
      //the time is done
      void timeoutDectectedQLocalSocket();
      //order Linked Windows Is Finish
      void orderLinkedWindowsIsFinish();


Generated by  Doxygen 1.6.0   Back to index