~ubuntu-branches/ubuntu/precise/boinc/precise

« back to all changes in this revision

Viewing changes to clientgui/ViewProjectsBase.h

Tags: 6.12.8+dfsg-1
* New upstream release.
* Simplified debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// Berkeley Open Infrastructure for Network Computing
2
 
// http://boinc.berkeley.edu
3
 
// Copyright (C) 2005 University of California
4
 
//
5
 
// This is free software; you can redistribute it and/or
6
 
// modify it under the terms of the GNU Lesser General Public
7
 
// License as published by the Free Software Foundation;
8
 
// either version 2.1 of the License, or (at your option) any later version.
9
 
//
10
 
// This software is distributed in the hope that it will be useful,
11
 
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
 
// See the GNU Lesser General Public License for more details.
14
 
//
15
 
// To view the GNU Lesser General Public License visit
16
 
// http://www.gnu.org/copyleft/lesser.html
17
 
// or write to the Free Software Foundation, Inc.,
18
 
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
19
 
 
20
 
#ifndef _VIEWPROJECTS_H_
21
 
#define _VIEWPROJECTS_H_
22
 
 
23
 
#if defined(__GNUG__) && !defined(__APPLE__)
24
 
#pragma interface "ViewProjects.cpp"
25
 
#endif
26
 
 
27
 
 
28
 
#include "BOINCBaseView.h"
29
 
 
30
 
 
31
 
class CProject : public wxObject
32
 
{
33
 
public:
34
 
        CProject();
35
 
        ~CProject();
36
 
 
37
 
    wxString m_strProjectName;
38
 
    wxString m_strAccountName;
39
 
    wxString m_strTeamName;
40
 
    wxString m_strTotalCredit;
41
 
    wxString m_strAVGCredit;
42
 
    wxString m_strResourceShare;
43
 
    wxString m_strStatus;
44
 
};
45
 
 
46
 
 
47
 
class CViewProjects : public CBOINCBaseView
48
 
{
49
 
    DECLARE_DYNAMIC_CLASS( CViewProjects )
50
 
 
51
 
public:
52
 
    CViewProjects();
53
 
    CViewProjects(wxNotebook* pNotebook);
54
 
 
55
 
    ~CViewProjects();
56
 
 
57
 
    virtual wxString&       GetViewName();
58
 
    virtual wxString&       GetViewDisplayName();
59
 
    virtual const char**    GetViewIcon();
60
 
 
61
 
    void                    OnProjectUpdate( wxCommandEvent& event );
62
 
    void                    OnProjectSuspend( wxCommandEvent& event );
63
 
    void                    OnProjectNoNewWork( wxCommandEvent& event );
64
 
    void                    OnProjectReset( wxCommandEvent& event );
65
 
    void                    OnProjectDetach( wxCommandEvent& event );
66
 
 
67
 
    void                    OnProjectWebsiteClicked( wxEvent& event );
68
 
 
69
 
protected:
70
 
    std::vector<CProject*>  m_ProjectCache;
71
 
 
72
 
    virtual wxInt32         GetDocCount();
73
 
 
74
 
    virtual wxString        OnListGetItemText( long item, long column ) const;
75
 
 
76
 
    virtual wxString        OnDocGetItemText( long item, long column ) const;
77
 
 
78
 
    virtual wxInt32         AddCacheElement();
79
 
    virtual wxInt32         EmptyCache();
80
 
    virtual wxInt32         GetCacheCount();
81
 
    virtual wxInt32         RemoveCacheElement();
82
 
    virtual wxInt32         UpdateCache( long item, long column, wxString& strNewData );
83
 
 
84
 
    virtual void            UpdateSelection();
85
 
 
86
 
    wxInt32                 FormatProjectName( wxInt32 item, wxString& strBuffer ) const;
87
 
    wxInt32                 FormatAccountName( wxInt32 item, wxString& strBuffer ) const;
88
 
    wxInt32                 FormatTeamName( wxInt32 item, wxString& strBuffer ) const;
89
 
    wxInt32                 FormatTotalCredit( wxInt32 item, wxString& strBuffer ) const;
90
 
    wxInt32                 FormatAVGCredit( wxInt32 item, wxString& strBuffer ) const;
91
 
    wxInt32                 FormatResourceShare( wxInt32 item, wxString& strBuffer ) const;
92
 
    wxInt32                 FormatStatus( wxInt32 item, wxString& strBuffer ) const;
93
 
 
94
 
    bool                    IsWebsiteLink( const wxString& strLink );
95
 
    wxInt32                 ConvertWebsiteIndexToLink( wxInt32 iProjectIndex, wxInt32 iWebsiteIndex, wxString& strLink );
96
 
    wxInt32                 ConvertLinkToWebsiteIndex( const wxString& strLink, wxInt32& iProjectIndex, wxInt32& iWebsiteIndex );
97
 
 
98
 
    DECLARE_EVENT_TABLE()
99
 
};
100
 
 
101
 
 
102
 
#endif
103