2008-08-06 18:36:30 +00:00
|
|
|
// This file is part of BOINC.
|
2005-04-04 06:02:36 +00:00
|
|
|
// http://boinc.berkeley.edu
|
2008-08-06 18:36:30 +00:00
|
|
|
// Copyright (C) 2008 University of California
|
2005-04-04 06:02:36 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC is free software; you can redistribute it and/or modify it
|
|
|
|
// under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation,
|
|
|
|
// either version 3 of the License, or (at your option) any later version.
|
2005-04-04 06:02:36 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC is distributed in the hope that it will be useful,
|
2005-04-04 06:02:36 +00:00
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
2005-04-04 06:02:36 +00:00
|
|
|
|
|
|
|
#ifndef _VIEWSTATISTICS_H_
|
|
|
|
#define _VIEWSTATISTICS_H_
|
|
|
|
|
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
|
|
|
#pragma interface "ViewStatistics.cpp"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#include "BOINCBaseView.h"
|
|
|
|
|
2006-12-01 20:51:37 +00:00
|
|
|
class CPaintStatistics : public wxWindow
|
2005-04-04 06:02:36 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
CPaintStatistics();
|
2006-03-23 01:17:07 +00:00
|
|
|
CPaintStatistics(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxT("panel"));
|
2006-01-20 22:57:32 +00:00
|
|
|
|
2006-12-01 20:51:37 +00:00
|
|
|
void DrawMainHead(wxDC &dc, const wxString head_name);
|
2006-01-20 22:57:32 +00:00
|
|
|
|
2007-04-20 03:26:12 +00:00
|
|
|
void DrawProjectHead(wxDC &dc, PROJECT* project1, const wxString head_name_last);
|
2006-11-03 19:33:53 +00:00
|
|
|
|
2007-04-20 03:26:12 +00:00
|
|
|
void DrawLegend(wxDC &dc, PROJECTS* proj, CMainDocument* pDoc, int SelProj, bool bColour, int &m_Legend_Shift);
|
2006-01-20 22:57:32 +00:00
|
|
|
|
2007-04-20 03:26:12 +00:00
|
|
|
void DrawAxis(wxDC &dc, const double max_val_y, const double min_val_y, const double max_val_x, const double min_val_x, wxColour pen_AxisColour, const double max_val_y_all, const double min_val_y_all);
|
2006-01-20 22:57:32 +00:00
|
|
|
|
2006-12-01 20:51:37 +00:00
|
|
|
void DrawGraph(wxDC &dc, std::vector<PROJECT*>::const_iterator &i, const wxColour graphColour, const int typePoint, const int m_SelectedStatistic);
|
|
|
|
|
|
|
|
void DrawMarker(wxDC &dc);
|
2006-11-03 19:33:53 +00:00
|
|
|
|
2006-12-01 20:51:37 +00:00
|
|
|
void getDrawColour(wxColour &graphColour, int number);
|
2006-11-03 19:33:53 +00:00
|
|
|
|
2006-12-01 20:51:37 +00:00
|
|
|
void ClearXY();
|
2007-04-20 03:26:12 +00:00
|
|
|
|
|
|
|
void ClearLegendXY();
|
2006-12-01 20:51:37 +00:00
|
|
|
|
|
|
|
void AB(const double x_coord1, const double y_coord1, const double x_coord2, const double y_coord2, const double x_val1, const double y_val1, const double x_val2, const double y_val2);
|
|
|
|
//--------------------------
|
|
|
|
void DrawAll(wxDC &dc);
|
|
|
|
//--------------------------
|
|
|
|
wxBitmap m_dc_bmp;
|
|
|
|
bool m_full_repaint;
|
|
|
|
bool m_bmp_OK;
|
|
|
|
//
|
|
|
|
int m_SelectedStatistic;
|
|
|
|
int m_ModeViewStatistic;
|
|
|
|
int m_NextProjectStatistic;
|
2007-01-09 20:43:21 +00:00
|
|
|
int m_ViewHideProjectStatistic;
|
|
|
|
std::set<wxString> m_HideProjectStatistic;
|
2006-12-01 20:51:37 +00:00
|
|
|
double m_Legend_dY;
|
|
|
|
// Marker
|
|
|
|
double m_GraphMarker_X1;
|
|
|
|
double m_GraphMarker_Y1;
|
|
|
|
bool m_GraphMarker1;
|
|
|
|
// Zoom
|
|
|
|
wxCoord m_GraphZoom_X1;
|
|
|
|
wxCoord m_GraphZoom_Y1;
|
|
|
|
wxCoord m_GraphZoom_X2;
|
|
|
|
wxCoord m_GraphZoom_Y2;
|
|
|
|
wxCoord m_GraphZoom_X2_old;
|
|
|
|
wxCoord m_GraphZoom_Y2_old;
|
2007-04-20 03:26:12 +00:00
|
|
|
bool m_GraphZoomStart;
|
|
|
|
|
|
|
|
wxCoord m_GraphMove_X1;
|
|
|
|
wxCoord m_GraphMove_Y1;
|
|
|
|
wxCoord m_GraphMove_X2;
|
|
|
|
wxCoord m_GraphMove_Y2;
|
|
|
|
bool m_GraphMoveStart;
|
|
|
|
bool m_GraphMoveGo;
|
2006-12-01 20:51:37 +00:00
|
|
|
|
|
|
|
double m_Zoom_max_val_X;
|
|
|
|
double m_Zoom_min_val_X;
|
|
|
|
double m_Zoom_max_val_Y;
|
|
|
|
double m_Zoom_min_val_Y;
|
|
|
|
bool m_Zoom_Auto;
|
|
|
|
// Shift Legend
|
|
|
|
int m_Legend_Shift_Mode1;
|
|
|
|
int m_Legend_Shift_Mode2;
|
2007-04-20 03:26:12 +00:00
|
|
|
bool m_LegendDraw;
|
2006-12-01 20:51:37 +00:00
|
|
|
// old
|
2006-01-20 22:57:32 +00:00
|
|
|
wxString heading;
|
2006-12-01 20:51:37 +00:00
|
|
|
// X'=AX+B; Y'=AY+B;
|
|
|
|
double m_Ax_ValToCoord;
|
|
|
|
double m_Bx_ValToCoord;
|
|
|
|
double m_Ay_ValToCoord;
|
|
|
|
double m_By_ValToCoord;
|
|
|
|
|
|
|
|
double m_Ax_CoordToVal;
|
|
|
|
double m_Bx_CoordToVal;
|
|
|
|
double m_Ay_CoordToVal;
|
|
|
|
double m_By_CoordToVal;
|
|
|
|
// XY
|
|
|
|
double m_WorkSpace_X_start;
|
|
|
|
double m_WorkSpace_X_end;
|
|
|
|
double m_WorkSpace_Y_start;
|
|
|
|
double m_WorkSpace_Y_end;
|
|
|
|
//
|
|
|
|
double m_main_X_start;
|
|
|
|
double m_main_X_end;
|
|
|
|
double m_main_Y_start;
|
|
|
|
double m_main_Y_end;
|
|
|
|
|
|
|
|
double m_Legend_X_start;
|
|
|
|
double m_Legend_X_end;
|
|
|
|
double m_Legend_Y_start;
|
|
|
|
double m_Legend_Y_end;
|
|
|
|
|
|
|
|
double m_Legend_select_X_start;
|
|
|
|
double m_Legend_select_X_end;
|
|
|
|
double m_Legend_select_Y_start;
|
|
|
|
double m_Legend_select_Y_end;
|
|
|
|
|
|
|
|
double m_Graph_X_start;
|
|
|
|
double m_Graph_X_end;
|
|
|
|
double m_Graph_Y_start;
|
|
|
|
double m_Graph_Y_end;
|
|
|
|
|
|
|
|
double m_Graph_draw_X_start;
|
|
|
|
double m_Graph_draw_X_end;
|
|
|
|
double m_Graph_draw_Y_start;
|
|
|
|
double m_Graph_draw_Y_end;
|
|
|
|
// View
|
|
|
|
int m_GraphLineWidth;
|
|
|
|
int m_GraphPointWidth;
|
2006-11-03 19:33:53 +00:00
|
|
|
|
|
|
|
wxFont m_font_standart;
|
2006-01-20 22:57:32 +00:00
|
|
|
wxFont m_font_bold;
|
2006-11-03 19:33:53 +00:00
|
|
|
wxFont m_font_standart_italic;
|
|
|
|
// colour
|
2006-12-01 20:51:37 +00:00
|
|
|
wxColour m_pen_MarkerLineColour;
|
|
|
|
wxColour m_pen_ZoomRectColour;
|
|
|
|
wxColour m_brush_ZoomRectColour;
|
|
|
|
|
|
|
|
wxColour m_brush_AxisColour;
|
2006-11-03 19:33:53 +00:00
|
|
|
wxColour m_pen_AxisColour;
|
2007-04-20 03:26:12 +00:00
|
|
|
wxColour m_pen_AxisColourAutoZoom;
|
|
|
|
wxColour m_pen_AxisColourZoom;
|
2006-11-03 19:33:53 +00:00
|
|
|
wxColour m_pen_AxisXColour;
|
|
|
|
wxColour m_pen_AxisYColour;
|
|
|
|
wxColour m_pen_AxisXTextColour;
|
|
|
|
wxColour m_pen_AxisYTextColour;
|
|
|
|
|
|
|
|
wxColour m_brush_LegendColour;
|
|
|
|
wxColour m_brush_LegendSelectColour;
|
|
|
|
wxColour m_pen_LegendSelectColour;
|
|
|
|
wxColour m_pen_LegendSelectTextColour;
|
|
|
|
wxColour m_pen_LegendColour;
|
|
|
|
wxColour m_pen_LegendTextColour;
|
|
|
|
|
|
|
|
wxColour m_brush_MainColour;
|
|
|
|
wxColour m_pen_MainColour;
|
|
|
|
|
|
|
|
wxColour m_pen_HeadTextColour;
|
|
|
|
wxColour m_pen_ProjectHeadTextColour;
|
|
|
|
|
|
|
|
wxColour m_pen_GraphTotalColour;
|
|
|
|
wxColour m_pen_GraphRACColour;
|
|
|
|
wxColour m_pen_GraphTotalHostColour;
|
|
|
|
wxColour m_pen_GraphRACHostColour;
|
|
|
|
|
|
|
|
wxColour m_pen_GraphColour00;
|
|
|
|
wxColour m_pen_GraphColour01;
|
|
|
|
wxColour m_pen_GraphColour02;
|
|
|
|
wxColour m_pen_GraphColour03;
|
|
|
|
wxColour m_pen_GraphColour04;
|
|
|
|
wxColour m_pen_GraphColour05;
|
|
|
|
wxColour m_pen_GraphColour06;
|
|
|
|
wxColour m_pen_GraphColour07;
|
|
|
|
wxColour m_pen_GraphColour08;
|
|
|
|
wxColour m_pen_GraphColour09;
|
2005-04-04 06:02:36 +00:00
|
|
|
protected:
|
2005-11-14 22:06:17 +00:00
|
|
|
void OnPaint(wxPaintEvent& event);
|
2006-12-01 20:51:37 +00:00
|
|
|
void OnEraseBackground(wxEraseEvent & /*event*/){};
|
2005-11-14 22:06:17 +00:00
|
|
|
void OnSize(wxSizeEvent& event);
|
2006-11-03 19:33:53 +00:00
|
|
|
void OnLeftMouseDown(wxMouseEvent& event);
|
2006-12-01 20:51:37 +00:00
|
|
|
void OnLeftMouseUp(wxMouseEvent& event);
|
2007-04-20 03:26:12 +00:00
|
|
|
void OnLeftMouseDoubleClick(wxMouseEvent& event);
|
2006-12-01 20:51:37 +00:00
|
|
|
void OnMouseMotion(wxMouseEvent& event);
|
|
|
|
void OnRightMouseDown(wxMouseEvent& event);
|
2007-04-20 03:26:12 +00:00
|
|
|
void OnRightMouseUp(wxMouseEvent& event);
|
2006-12-01 20:51:37 +00:00
|
|
|
void OnMouseLeaveWindows(wxMouseEvent& event);
|
2005-04-04 06:02:36 +00:00
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
|
|
|
class CViewStatistics : public CBOINCBaseView
|
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS( CViewStatistics )
|
2007-04-04 21:20:53 +00:00
|
|
|
DECLARE_EVENT_TABLE()
|
2005-04-04 06:02:36 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
CViewStatistics();
|
|
|
|
CViewStatistics(wxNotebook* pNotebook);
|
|
|
|
|
|
|
|
~CViewStatistics();
|
|
|
|
|
2005-09-02 21:03:36 +00:00
|
|
|
virtual wxString& GetViewName();
|
- fixes #207 - HTML entities in BOINC Manager have to be decoded
BOINC Manager can now properly decode HTML entites for the
following elements:
Projects Tab:
Project Name
User Name
Team Name
Work Tab:
Project Name
Application Name
Transfers Tab:
Project Name
Messages Tab:
Project Name
Disk Tab:
Project Name
- fixes #212 - Info in columns misaligned on switching views
- Properly restore which tab view the user left from when going
to the advanced view from the simple view
- Fix the problem that caused the manager to wait for 7 seconds
to display anything on initial startup.
- Store the various Grid/List persisted data seperately so that
the different header sizes don't cause problems.
clientgui/
AdvancedFrame.cpp
BOINCBaseView.cpp, .h
BOINCGridCtrl.cpp
ViewMessages.cpp, .h
ViewMessagesGrid.cpp, .h
ViewProjects.cpp, .h
ViewProjectsGrid.cpp, .h
ViewResources.cpp, .h
ViewStatistics.cpp, .h
ViewTransfers.cpp, .h
ViewTransfersGrid.cpp, .h
ViewWork.cpp, .h
ViewWorkGrid.cpp, .h
lib/
gui_rpc_client_ops.C
svn path=/trunk/boinc/; revision=12761
2007-05-29 05:07:35 +00:00
|
|
|
virtual wxString& GetViewDisplayName();
|
2006-02-16 18:01:46 +00:00
|
|
|
virtual const char** GetViewIcon();
|
2006-12-29 16:35:33 +00:00
|
|
|
virtual const int GetViewRefreshRate();
|
2009-12-22 01:22:11 +00:00
|
|
|
virtual const int GetViewCurrentViewPage();
|
2005-04-04 06:02:36 +00:00
|
|
|
|
2005-04-21 06:04:26 +00:00
|
|
|
void OnStatisticsUserTotal( wxCommandEvent& event );
|
|
|
|
void OnStatisticsUserAverage( wxCommandEvent& event );
|
|
|
|
void OnStatisticsHostTotal( wxCommandEvent& event );
|
|
|
|
void OnStatisticsHostAverage( wxCommandEvent& event );
|
2005-11-28 06:28:55 +00:00
|
|
|
void OnStatisticsNextProject( wxCommandEvent& event );
|
2006-01-20 22:57:32 +00:00
|
|
|
void OnStatisticsPrevProject( wxCommandEvent& event );
|
|
|
|
void OnStatisticsModeView0( wxCommandEvent& event );
|
|
|
|
void OnStatisticsModeView1( wxCommandEvent& event );
|
|
|
|
void OnStatisticsModeView2( wxCommandEvent& event );
|
2005-04-04 06:02:36 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
2009-11-25 12:43:22 +00:00
|
|
|
CPaintStatistics* m_PaintStatistics;
|
|
|
|
|
|
|
|
#ifdef __WXMAC__
|
|
|
|
void SetupMacAccessibilitySupport();
|
|
|
|
void RemoveMacAccessibilitySupport();
|
|
|
|
|
|
|
|
EventHandlerRef m_pStatisticsAccessibilityEventHandlerRef;
|
|
|
|
#endif
|
2005-04-04 06:02:36 +00:00
|
|
|
|
2005-04-21 06:04:26 +00:00
|
|
|
virtual bool OnSaveState( wxConfigBase* pConfig );
|
|
|
|
virtual bool OnRestoreState( wxConfigBase* pConfig );
|
2005-04-04 06:02:36 +00:00
|
|
|
|
2005-04-21 06:04:26 +00:00
|
|
|
virtual void OnListRender( wxTimerEvent& event );
|
2005-04-04 06:02:36 +00:00
|
|
|
|
|
|
|
virtual void UpdateSelection();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|