Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

/home/vlg/develop/gwavmerger/src/LoadProgress.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 //------------------------------------------------------------------------------
00003 //                              LoadProgress.cpp
00004 //------------------------------------------------------------------------------
00005 // $Id: LoadProgress.h,v 1.4 2003/02/07 05:15:09 vlg Exp $
00006 //------------------------------------------------------------------------------
00007 //  Copyright (c) 2002 by Vladislav Grinchenko
00008 //
00009 //  This program is free software; you can redistribute it and/or
00010 //  modify it under the terms of the GNU General Public License
00011 //  as published by the Free Software Foundation; either version
00012 //  2 of the License, or (at your option) any later version.
00013 //------------------------------------------------------------------------------
00014 #ifndef _LOADPROGRESS_H
00015 #define _LOADPROGRESS_H
00016 
00017 #include <dirent.h>
00018 #include <stdlib.h>
00019 
00020 #include <gtkmm/messagedialog.h>
00021 #include <gtkmm/button.h>
00022 #include <gtkmm/label.h>
00023 #include <gtkmm/progressbar.h>
00024 
00025 #include <vector>
00026 #include <string>
00027 using std::vector;
00028 using std::string;
00029 
00030 #include "gWavMerger-main.h"
00031 
00032 class Config;
00033 
00034 class LoadProgress : public Gtk::Dialog
00035 {  
00036 public:
00037     LoadProgress ();
00038 
00039     int run_load (const string&   subdir_,
00040                   const string&   prefix_,
00041                   const string&   proj_path_,
00042                   vector<string>& file_list_);
00043 
00044     void on_cancel_clicked ();
00045     void dump (void) const;
00046 
00047 private:
00048     int init (const string& subdir_, 
00049               const string& prefix_,
00050               const string& proj_path_);
00051     
00052     bool process_file (void);
00053 
00054 private:
00055     Gtk::Dialog* m_dialog;
00056     Gtk::Label* Message;
00057     Gtk::ProgressBar*   Progress;
00058 
00059 private:
00060     DIR* m_dp;
00061     int  m_max_val;
00062     vector<string>  m_file_list; // result of scanning directory is valid
00063                                  // file list
00064     string m_dir;
00065     string m_prefix;
00066     uint   m_entries;       // Files found in the directory
00067     uint   m_count;     // Files processed so far
00068 };
00069 
00070 inline void 
00071 
00072 LoadProgress::on_cancel_clicked ()
00073 {    
00074     trace ("LoadProgress::on_cancel_clicked");
00075 }
00076 
00077 #endif /* _LOADPROGRESS_H */

Generated on Tue Feb 11 23:05:19 2003 for gwavmerger by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002