~ubuntu-branches/ubuntu/natty/boinc/natty

« back to all changes in this revision

Viewing changes to clientgui/DlgItemProperties.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Hahler
  • Date: 2010-07-13 03:59:26 UTC
  • mfrom: (1.1.15 upstream)
  • Revision ID: james.westby@ubuntu.com-20100713035926-8jun0z3d3yfl27k3
Tags: 6.10.58-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// This file is part of BOINC.
2
 
// http://boinc.berkeley.edu
3
 
// Copyright (C) 2008 University of California
4
 
//
5
 
// BOINC is free software; you can redistribute it and/or modify it
6
 
// under the terms of the GNU Lesser General Public License
7
 
// as published by the Free Software Foundation,
8
 
// either version 3 of the License, or (at your option) any later version.
9
 
//
10
 
// BOINC 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
 
// You should have received a copy of the GNU Lesser General Public License
16
 
// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
17
 
//
18
 
#ifndef _DLGITEMPROPERTIES_H_
19
 
#define _DLGITEMPROPERTIES_H_
20
 
 
21
 
#if defined(__GNUG__) && !defined(__APPLE__)
22
 
#pragma interface "DlgItemProperties.cpp"
23
 
#endif
24
 
 
25
 
#include <wx/intl.h>
26
 
 
27
 
#include <wx/gdicmn.h>
28
 
#include <wx/gbsizer.h>
29
 
#include <wx/sizer.h>
30
 
#include <wx/scrolwin.h>
31
 
#include <wx/font.h>
32
 
#include <wx/colour.h>
33
 
#include <wx/settings.h>
34
 
#include <wx/string.h>
35
 
#include <wx/button.h>
36
 
#include <wx/dialog.h>
37
 
 
38
 
#include "MainDocument.h"
39
 
 
40
 
class CDlgItemProperties : public wxDialog {
41
 
        DECLARE_DYNAMIC_CLASS( CDlgItemProperties )
42
 
public:
43
 
        CDlgItemProperties(wxWindow* parent=NULL);//to act as standard constructor set a default value
44
 
        virtual ~CDlgItemProperties();
45
 
        //
46
 
        void renderInfos(PROJECT* project);
47
 
        void renderInfos(RESULT* result);
48
 
private:
49
 
        int m_current_row;
50
 
        //formatting methods
51
 
        wxString FormatDiskSpace(double bytes);
52
 
        wxString FormatApplicationName(RESULT* result );
53
 
        wxString FormatStatus(RESULT* result);
54
 
        wxString FormatTime(float fBuffer);
55
 
        //generic layout methods
56
 
        void addSection(const wxString& title);
57
 
        void addProperty(const wxString& name, const wxString& value);
58
 
protected:
59
 
        wxBoxSizer* m_bSizer1;
60
 
        wxScrolledWindow* m_scrolledWindow;
61
 
        wxGridBagSizer* m_gbSizer;
62
 
        wxButton* m_btnClose;
63
 
};
64
 
 
65
 
#endif // _DLGITEMPROPERTIES_H_
66
 
 
 
1
// This file is part of BOINC.
 
2
// http://boinc.berkeley.edu
 
3
// Copyright (C) 2008 University of California
 
4
//
 
5
// BOINC is free software; you can redistribute it and/or modify it
 
6
// under the terms of the GNU Lesser General Public License
 
7
// as published by the Free Software Foundation,
 
8
// either version 3 of the License, or (at your option) any later version.
 
9
//
 
10
// BOINC 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
// You should have received a copy of the GNU Lesser General Public License
 
16
// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
 
17
//
 
18
#ifndef _DLGITEMPROPERTIES_H_
 
19
#define _DLGITEMPROPERTIES_H_
 
20
 
 
21
#if defined(__GNUG__) && !defined(__APPLE__)
 
22
#pragma interface "DlgItemProperties.cpp"
 
23
#endif
 
24
 
 
25
#include <wx/intl.h>
 
26
 
 
27
#include <wx/gdicmn.h>
 
28
#include <wx/gbsizer.h>
 
29
#include <wx/sizer.h>
 
30
#include <wx/scrolwin.h>
 
31
#include <wx/font.h>
 
32
#include <wx/colour.h>
 
33
#include <wx/settings.h>
 
34
#include <wx/string.h>
 
35
#include <wx/button.h>
 
36
#include <wx/dialog.h>
 
37
 
 
38
#include "MainDocument.h"
 
39
 
 
40
class CDlgItemProperties : public wxDialog {
 
41
        DECLARE_DYNAMIC_CLASS( CDlgItemProperties )
 
42
    DECLARE_EVENT_TABLE()
 
43
public:
 
44
        CDlgItemProperties(wxWindow* parent=NULL);//to act as standard constructor set a default value
 
45
        virtual ~CDlgItemProperties();
 
46
    //
 
47
        void renderInfos(PROJECT* project);
 
48
        void renderInfos(RESULT* result);
 
49
private:
 
50
        int m_current_row;
 
51
        //formatting methods
 
52
        wxString FormatDiskSpace(double bytes);
 
53
        wxString FormatApplicationName(RESULT* result );
 
54
        wxString FormatStatus(RESULT* result);
 
55
        wxString FormatTime(float fBuffer);
 
56
        //generic layout methods
 
57
    bool SaveState();
 
58
    bool RestoreState();
 
59
        void addSection(const wxString& title);
 
60
        void addProperty(const wxString& name, const wxString& value);
 
61
protected:
 
62
        wxBoxSizer* m_bSizer1;
 
63
        wxScrolledWindow* m_scrolledWindow;
 
64
        wxGridBagSizer* m_gbSizer;
 
65
        wxButton* m_btnClose;
 
66
        wxString m_strBaseConfigLocation;
 
67
};
 
68
 
 
69
#endif // _DLGITEMPROPERTIES_H_
 
70