xref: /aoo42x/main/padmin/source/progress.hxx (revision 23e9c6ca)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _PAD_PROGRESS_HXX_
25 #define _PAD_PROGRESS_HXX_
26 
27 #include "vcl/dialog.hxx"
28 #include "vcl/fixed.hxx"
29 #include "vcl/button.hxx"
30 
31 #include "svtools/prgsbar.hxx"
32 
33 namespace padmin {
34 
35 	class ProgressDialog : public ModelessDialog
36 	{
37 		FixedText						maOperation;
38 		FixedText						maFilename;
39 		FixedText						maProgressTxt;
40 		CancelButton					maCancelButton;
41 		ProgressBar			            maProgressBar;
42 
43 		int mnMax, mnMin;
44 		sal_Bool mbCanceled;
45 
46 	public:
47 		ProgressDialog( Window*, sal_Bool bCancelable = sal_True, int nMin = 0, int nMax = 100 );
48 		~ProgressDialog();
49 
50 		DECL_LINK( ClickBtnHdl, Button* );
51 
52 		void setValue( int nValue );
setRange(int nMin,int nMax)53 		void setRange( int nMin, int nMax ) { mnMin = nMin; mnMax = nMax; }
54 		void startOperation( const String& );
55 		void setFilename( const String& );
56 
isCanceled()57 		sal_Bool isCanceled() { return mbCanceled; }
58 	};
59 
60 } // namespace
61 
62 #endif
63