xref: /trunk/main/dbaccess/source/ui/inc/WCPage.hxx (revision 914d351e5f5b84e4342a86d6ab8d4aca7308b9bd)
1*2e2212a7SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*2e2212a7SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*2e2212a7SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*2e2212a7SAndrew Rist  * distributed with this work for additional information
6*2e2212a7SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*2e2212a7SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*2e2212a7SAndrew Rist  * "License"); you may not use this file except in compliance
9*2e2212a7SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*2e2212a7SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*2e2212a7SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*2e2212a7SAndrew Rist  * software distributed under the License is distributed on an
15*2e2212a7SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*2e2212a7SAndrew Rist  * KIND, either express or implied.  See the License for the
17*2e2212a7SAndrew Rist  * specific language governing permissions and limitations
18*2e2212a7SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*2e2212a7SAndrew Rist  *************************************************************/
21*2e2212a7SAndrew Rist 
22*2e2212a7SAndrew Rist 
23cdf0e10cSrcweir #ifndef DBAUI_WIZARD_CPAGE_HXX
24cdf0e10cSrcweir #define DBAUI_WIZARD_CPAGE_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include "WTabPage.hxx"
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #ifndef DBAUI_ENUMTYPES_HXX
29cdf0e10cSrcweir #include "QEnumTypes.hxx"
30cdf0e10cSrcweir #endif
31cdf0e10cSrcweir #ifndef _SV_FIXED_HXX
32cdf0e10cSrcweir #include <vcl/fixed.hxx>
33cdf0e10cSrcweir #endif
34cdf0e10cSrcweir #ifndef _SV_GROUP_HXX
35cdf0e10cSrcweir #include <vcl/group.hxx>
36cdf0e10cSrcweir #endif
37cdf0e10cSrcweir #ifndef _SV_FIXED_HXX
38cdf0e10cSrcweir #include <vcl/fixed.hxx>
39cdf0e10cSrcweir #endif
40cdf0e10cSrcweir #ifndef _SV_EDIT_HXX
41cdf0e10cSrcweir #include <vcl/edit.hxx>
42cdf0e10cSrcweir #endif
43cdf0e10cSrcweir #ifndef _SV_BUTTON_HXX
44cdf0e10cSrcweir #include <vcl/button.hxx>
45cdf0e10cSrcweir #endif
46cdf0e10cSrcweir 
47cdf0e10cSrcweir namespace dbaui
48cdf0e10cSrcweir {
49cdf0e10cSrcweir     class OWizColumnSelect;
50cdf0e10cSrcweir     class OWizNormalExtend;
51cdf0e10cSrcweir     //========================================================================
52cdf0e10cSrcweir     class OCopyTable : public OWizardPage
53cdf0e10cSrcweir     {
54cdf0e10cSrcweir     protected:
55cdf0e10cSrcweir         FixedText                               m_ftTableName;
56cdf0e10cSrcweir         Edit                                    m_edTableName;
57cdf0e10cSrcweir         FixedLine                               m_aFL_Options;
58cdf0e10cSrcweir         RadioButton                             m_aRB_DefData;
59cdf0e10cSrcweir         RadioButton                             m_aRB_Def;
60cdf0e10cSrcweir         RadioButton                             m_aRB_View;
61cdf0e10cSrcweir         RadioButton                             m_aRB_AppendData;
62cdf0e10cSrcweir         CheckBox                                m_aCB_UseHeaderLine;
63cdf0e10cSrcweir         CheckBox                                m_aCB_PrimaryColumn;
64cdf0e10cSrcweir         FixedText                               m_aFT_KeyName;
65cdf0e10cSrcweir         Edit                                    m_edKeyName;
66cdf0e10cSrcweir         sal_Int16                               m_nOldOperation;
67cdf0e10cSrcweir 
68cdf0e10cSrcweir         OWizColumnSelect*                       m_pPage2;
69cdf0e10cSrcweir         OWizNormalExtend*                       m_pPage3;
70cdf0e10cSrcweir 
71cdf0e10cSrcweir         sal_Bool                                    m_bPKeyAllowed;
72cdf0e10cSrcweir         sal_Bool                                    m_bUseHeaderAllowed;
73cdf0e10cSrcweir 
74cdf0e10cSrcweir 
75cdf0e10cSrcweir         DECL_LINK( AppendDataClickHdl, Button* );
76cdf0e10cSrcweir         DECL_LINK( RadioChangeHdl, Button* );
77cdf0e10cSrcweir         DECL_LINK( KeyClickHdl, Button* );
78cdf0e10cSrcweir 
79cdf0e10cSrcweir         sal_Bool checkAppendData();
80cdf0e10cSrcweir         //--------dyf add
81cdf0e10cSrcweir         void SetAppendDataRadio();
82cdf0e10cSrcweir         //--------add end
83cdf0e10cSrcweir 
84cdf0e10cSrcweir     public:
85cdf0e10cSrcweir         virtual void            Reset();
86cdf0e10cSrcweir         virtual void            ActivatePage();
87cdf0e10cSrcweir         virtual sal_Bool            LeavePage();
88cdf0e10cSrcweir         virtual String          GetTitle() const ;
89cdf0e10cSrcweir 
90cdf0e10cSrcweir         OCopyTable( Window * pParent );
91cdf0e10cSrcweir         virtual ~OCopyTable();
92cdf0e10cSrcweir 
IsOptionDefData() const93cdf0e10cSrcweir         inline sal_Bool IsOptionDefData()       const { return m_aRB_DefData.IsChecked(); }
IsOptionDef() const94cdf0e10cSrcweir         inline sal_Bool IsOptionDef()           const { return m_aRB_Def.IsChecked(); }
IsOptionAppendData() const95cdf0e10cSrcweir         inline sal_Bool IsOptionAppendData()    const { return m_aRB_AppendData.IsChecked(); }
IsOptionView() const96cdf0e10cSrcweir         inline sal_Bool IsOptionView()          const { return m_aRB_View.IsChecked(); }
UseHeaderLine() const97cdf0e10cSrcweir         inline sal_Bool UseHeaderLine()         const { return m_aCB_UseHeaderLine.IsChecked(); }
GetKeyName() const98cdf0e10cSrcweir         String      GetKeyName()            const { return m_edKeyName.GetText(); }
99cdf0e10cSrcweir 
100cdf0e10cSrcweir         void setCreateStyleAction();
disallowViews()101cdf0e10cSrcweir         inline void disallowViews()
102cdf0e10cSrcweir         {
103cdf0e10cSrcweir             m_aRB_View.Disable();
104cdf0e10cSrcweir         }
disallowUseHeaderLine()105cdf0e10cSrcweir         inline void disallowUseHeaderLine()
106cdf0e10cSrcweir         {
107cdf0e10cSrcweir             m_bUseHeaderAllowed = sal_False;
108cdf0e10cSrcweir             m_aCB_UseHeaderLine.Disable();
109cdf0e10cSrcweir         }
110cdf0e10cSrcweir 
111cdf0e10cSrcweir         void setCreatePrimaryKey( bool _bDoCreate, const ::rtl::OUString& _rSuggestedName );
112cdf0e10cSrcweir     };
113cdf0e10cSrcweir }
114cdf0e10cSrcweir #endif // DBAUI_WIZARD_CPAGE_HXX
115