File: progressmeter.h

package info (click to toggle)
apt 0.3.10slink11
  • links: PTS
  • area: main
  • in suites: slink
  • size: 2,136 kB
  • ctags: 2,891
  • sloc: cpp: 22,235; sh: 1,656; makefile: 338; perl: 209
file content (53 lines) | stat: -rw-r--r-- 1,230 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// -*- mode: cpp; mode: fold -*-
// Description								/*{{{*/
// $Id: progressmeter.h,v 1.1 1998/08/23 03:52:37 jgg Exp $
/* ######################################################################

   Progress Meter - Graphical progress meter from the package library's 
                    progress meter class
   
   ##################################################################### */
									/*}}}*/
#ifndef PROGRESSMETER_H
#define PROGRESSMETER_H

#include <apt-pkg/progress.h>
#include <deity/window.h>
#include <deity/progress.h>
#include <deity/textwidg.h>

class ProgressWindow : public GUIWindow
{
   protected:
   
   Progress *Meter;
   TextWidget *Operation;
   TextWidget *SubOp;
   Separator *Divider;
   
   virtual void Realize();
   
   public:
   
   void SetOp(string Op) {Operation->Text(Op);};
   void SetSubOp(string Op) {SubOp->Text(Op);};
   void Percent(double Per) {Meter->Percent(Per);};
   
   ProgressWindow(string Title,Widget *Parent);
   virtual ~ProgressWindow();
};

class ProgressMeter : public OpProgress
{
   virtual void Update();
   ProgressWindow *Win;
   
   public:

   virtual void Done();
   
   ProgressMeter(string Title,Widget *Parent);
   virtual ~ProgressMeter();
};

#endif