~ubuntu-branches/ubuntu/oneiric/valkyrie/oneiric

« back to all changes in this revision

Viewing changes to valkyrie/tool_views/cachegrind_view.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Hai Zaar
  • Date: 2009-05-06 14:48:00 UTC
  • Revision ID: james.westby@ubuntu.com-20090506144800-vw617m4d4qa2pam3
Tags: upstream-1.4.0
ImportĀ upstreamĀ versionĀ 1.4.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ---------------------------------------------------------------------
 
2
 * Implementation of CachegrindView                  cachegrind_view.cpp
 
3
 * Cachegrind's personal window
 
4
 * ---------------------------------------------------------------------
 
5
 * This file is part of Valkyrie, a front-end for Valgrind
 
6
 * Copyright (C) 2000-2008, OpenWorks LLP <info@open-works.co.uk>
 
7
 * This program is released under the terms of the GNU GPL v.2
 
8
 * See the file COPYING for the full license details.
 
9
 */
 
10
 
 
11
#include "cachegrind_view.h"
 
12
 
 
13
#include <qcursor.h>
 
14
#include <qlayout.h>
 
15
#include <qlabel.h>
 
16
 
 
17
 
 
18
/* class CachegrindView ------------------------------------------------ */
 
19
CachegrindView::~CachegrindView() 
 
20
{ }
 
21
 
 
22
 
 
23
CachegrindView::CachegrindView( QWidget* parent, const char* name )
 
24
   : ToolView( parent, name )
 
25
{
 
26
   mkToolBar();
 
27
 
 
28
   QVBoxLayout* vLayout = new QVBoxLayout( central );
 
29
 
 
30
   /* create the listview */
 
31
   QLabel* lbl = new QLabel( "Cachegrind", central, "cachegrind label" );
 
32
   lbl->setAlignment( AlignCenter );
 
33
   vLayout->addWidget( lbl );
 
34
}
 
35
 
 
36
 
 
37
/* called by cachegrind: set state for buttons; set cursor state */
 
38
void CachegrindView::setState( bool run )
 
39
 
40
   if ( run ) {       /* startup */
 
41
      setCursor( QCursor(Qt::WaitCursor) );
 
42
   } else {           /* finished */
 
43
      unsetCursor();
 
44
   }
 
45
}
 
46
 
 
47
 
 
48
/* slot: connected to MainWindow::toggleToolbarLabels(). 
 
49
   called when user toggles 'show-butt-text' in Options page */
 
50
void CachegrindView::toggleToolbarLabels( bool /*state*/ )
 
51
{  }
 
52
 
 
53
 
 
54
void CachegrindView::mkToolBar( )
 
55
{
 
56
}