egami
C++ Image Processing program
/homes/esi30/DCS339/coursework/src/progress.cpp
Go to the documentation of this file.
00001 #include <utility>
00002 
00003 #include <gtkmm/main.h>
00004 #include <gtkmm/dialog.h>
00005 #include <gtkmm/enums.h>
00006 #include <gtkmm/progressbar.h>
00007 
00008 #include "progress.hpp"
00009 
00010 Progress::Progress(): Gtk::Dialog() {
00011     set_resizable(false);
00012     get_vbox()->pack_start(pb);
00013     show_all_children();
00014     present();
00015 }
00016 
00017 void Progress::advance(double val){
00018     if(val<last+0.01)
00019         return;
00020     else
00021         last=val;
00022     pb.set_fraction(val);
00023     while(Gtk::Main::events_pending())
00024         Gtk::Main::iteration();
00025 }
00026 
00027 Progress::~Progress(){
00028     response(Gtk::RESPONSE_DELETE_EVENT);
00029 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends