ARC Graphical Clients: /home/jonas/Development/arc-gui-clients/src/common/arctools.h Source File

- Main Page
- Classes
- Files

- File List

# /home/jonas/Development/arc-gui-clients/src/common/arctools.h

    00001 #ifndef ARCTOOLS_H
    00002 #define ARCTOOLS_H
    00003
    00004 #include <QObject>
    00005 #include <QMutex>
    00006
    00007 #include <arc/UserConfig.h>
    00008
    00009 #include "arcproxy-utils.h"
    00010 #include "helpwindow.h"
    00011
    00012
    00013 class ARCTools : public QObject
    00014 {
    00015     Q_OBJECT
    00016 private:
    00017     Arc::UserConfig* m_userConfig;
    00018     ArcProxyController* m_proxyController;
    00019     QString m_jobListFile;
    00020     HelpWindow* m_helpWindow;
    00021 public:
    00022     static ARCTools* instance()
    00023     {
    00024         static QMutex mutex;
    00025         if (!m_instance)
    00026         {
    00027             mutex.lock();
    00028
    00029             if (!m_instance)
    00030                 m_instance = new ARCTools;
    00031
    00032             mutex.unlock();
    00033         }
    00034
    00035         return m_instance;
    00036     }
    00037
    00038     static void drop()
    00039     {
    00040         static QMutex mutex;
    00041         mutex.lock();
    00042         delete m_instance;
    00043         m_instance = 0;
    00044         mutex.unlock();
    00045     }
    00046
    00047     bool initUserConfig();
    00048     Arc::UserConfig* currentUserConfig();
    00049     bool hasValidProxy();
    00050
    00051     void setJobListFile(QString filename);
    00052     QString jobListFile();
    00053
    00054     void proxyCertificateTool();
    00055     void certConversionTool();
    00056     void jobManagerTool();
    00057     void submissionTool();
    00058     void storageTool();
    00059
    00060     void showHelpWindow(QMainWindow* window);
    00061     void closeHelpWindow();
    00062
    00063 private:
    00064
    00065     ARCTools();
    00066
    00067     /*
    00068     ARCTools(const ARCTools &); // hide copy constructor
    00069     ARCTools& operator=(const ARCTools &); // hide assign op
    00070     // we leave just the declarations, so the compiler will warn us
    00071     // if we try to use those two functions by accident
    00072     */
    00073
    00074     static ARCTools* m_instance;
    00075 };
    00076
    00077 #endif // ARCTOOLS_H

All Classes Functions Variables