xref: /aoo42x/main/dbaccess/source/ui/inc/WCPage.hxx (revision 2e2212a7)
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 #ifndef DBAUI_WIZARD_CPAGE_HXX
24 #define DBAUI_WIZARD_CPAGE_HXX
25 
26 #include "WTabPage.hxx"
27 
28 #ifndef DBAUI_ENUMTYPES_HXX
29 #include "QEnumTypes.hxx"
30 #endif
31 #ifndef _SV_FIXED_HXX
32 #include <vcl/fixed.hxx>
33 #endif
34 #ifndef _SV_GROUP_HXX
35 #include <vcl/group.hxx>
36 #endif
37 #ifndef _SV_FIXED_HXX
38 #include <vcl/fixed.hxx>
39 #endif
40 #ifndef _SV_EDIT_HXX
41 #include <vcl/edit.hxx>
42 #endif
43 #ifndef _SV_BUTTON_HXX
44 #include <vcl/button.hxx>
45 #endif
46 
47 namespace dbaui
48 {
49 	class OWizColumnSelect;
50 	class OWizNormalExtend;
51 	//========================================================================
52 	class OCopyTable : public OWizardPage
53 	{
54 	protected:
55 		FixedText								m_ftTableName;
56 		Edit									m_edTableName;
57         FixedLine                               m_aFL_Options;
58 		RadioButton								m_aRB_DefData;
59 		RadioButton								m_aRB_Def;
60 		RadioButton								m_aRB_View;
61 		RadioButton								m_aRB_AppendData;
62         CheckBox								m_aCB_UseHeaderLine;
63 		CheckBox								m_aCB_PrimaryColumn;
64 		FixedText								m_aFT_KeyName;
65 		Edit									m_edKeyName;
66 		sal_Int16                               m_nOldOperation;
67 
68 		OWizColumnSelect*						m_pPage2;
69 		OWizNormalExtend*						m_pPage3;
70 
71 		sal_Bool									m_bPKeyAllowed;
72         sal_Bool                                    m_bUseHeaderAllowed;
73 
74 
75 		DECL_LINK( AppendDataClickHdl, Button* );
76 		DECL_LINK( RadioChangeHdl, Button* );
77 		DECL_LINK( KeyClickHdl, Button* );
78 
79 		sal_Bool checkAppendData();
80 		//--------dyf add
81 		void SetAppendDataRadio();
82 		//--------add end
83 
84 	public:
85 		virtual	void			Reset();
86 		virtual void			ActivatePage();
87 		virtual sal_Bool			LeavePage();
88 		virtual String			GetTitle() const ;
89 
90 		OCopyTable( Window * pParent );
91 		virtual ~OCopyTable();
92 
IsOptionDefData() const93 		inline sal_Bool IsOptionDefData()		const { return m_aRB_DefData.IsChecked(); }
IsOptionDef() const94 		inline sal_Bool IsOptionDef()			const { return m_aRB_Def.IsChecked(); }
IsOptionAppendData() const95 		inline sal_Bool IsOptionAppendData()	const { return m_aRB_AppendData.IsChecked(); }
IsOptionView() const96 		inline sal_Bool IsOptionView()			const { return m_aRB_View.IsChecked(); }
UseHeaderLine() const97         inline sal_Bool UseHeaderLine()			const { return m_aCB_UseHeaderLine.IsChecked(); }
GetKeyName() const98         String      GetKeyName()            const { return m_edKeyName.GetText(); }
99 
100 		void setCreateStyleAction();
disallowViews()101         inline void disallowViews()
102         {
103             m_aRB_View.Disable();
104         }
disallowUseHeaderLine()105         inline void disallowUseHeaderLine()
106         {
107             m_bUseHeaderAllowed = sal_False;
108             m_aCB_UseHeaderLine.Disable();
109         }
110 
111         void setCreatePrimaryKey( bool _bDoCreate, const ::rtl::OUString& _rSuggestedName );
112 	};
113 }
114 #endif // DBAUI_WIZARD_CPAGE_HXX
115 
116 
117