Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
5 : : * This Source Code Form is subject to the terms of the Mozilla Public
6 : : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
11 : : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : : * contributor license agreements. See the NOTICE file distributed
13 : : * with this work for additional information regarding copyright
14 : : * ownership. The ASF licenses this file to you under the Apache
15 : : * License, Version 2.0 (the "License"); you may not use this file
16 : : * except in compliance with the License. You may obtain a copy of
17 : : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : : */
19 : : #ifndef DBAUI_WIZARD_CPAGE_HXX
20 : : #define DBAUI_WIZARD_CPAGE_HXX
21 : :
22 : : #include "WTabPage.hxx"
23 : :
24 : : #include "QEnumTypes.hxx"
25 : : #include <vcl/fixed.hxx>
26 : : #include <vcl/group.hxx>
27 : : #include <vcl/edit.hxx>
28 : : #include <vcl/button.hxx>
29 : :
30 : : namespace dbaui
31 : : {
32 : : class OWizColumnSelect;
33 : : class OWizNormalExtend;
34 : : //========================================================================
35 : : class OCopyTable : public OWizardPage
36 : : {
37 : : protected:
38 : : FixedText m_ftTableName;
39 : : Edit m_edTableName;
40 : : FixedLine m_aFL_Options;
41 : : RadioButton m_aRB_DefData;
42 : : RadioButton m_aRB_Def;
43 : : RadioButton m_aRB_View;
44 : : RadioButton m_aRB_AppendData;
45 : : CheckBox m_aCB_UseHeaderLine;
46 : : CheckBox m_aCB_PrimaryColumn;
47 : : FixedText m_aFT_KeyName;
48 : : Edit m_edKeyName;
49 : : sal_Int16 m_nOldOperation;
50 : :
51 : : OWizColumnSelect* m_pPage2;
52 : : OWizNormalExtend* m_pPage3;
53 : :
54 : : sal_Bool m_bPKeyAllowed;
55 : : sal_Bool m_bUseHeaderAllowed;
56 : :
57 : :
58 : : DECL_LINK( AppendDataClickHdl, Button* );
59 : : DECL_LINK( RadioChangeHdl, Button* );
60 : : DECL_LINK( KeyClickHdl, Button* );
61 : :
62 : : sal_Bool checkAppendData();
63 : : void SetAppendDataRadio();
64 : :
65 : : public:
66 : : virtual void Reset();
67 : : virtual void ActivatePage();
68 : : virtual sal_Bool LeavePage();
69 : : virtual String GetTitle() const ;
70 : :
71 : : OCopyTable( Window * pParent );
72 : : virtual ~OCopyTable();
73 : :
74 : 0 : inline sal_Bool IsOptionDefData() const { return m_aRB_DefData.IsChecked(); }
75 : 0 : inline sal_Bool IsOptionDef() const { return m_aRB_Def.IsChecked(); }
76 : : inline sal_Bool IsOptionAppendData() const { return m_aRB_AppendData.IsChecked(); }
77 : 0 : inline sal_Bool IsOptionView() const { return m_aRB_View.IsChecked(); }
78 : : inline sal_Bool UseHeaderLine() const { return m_aCB_UseHeaderLine.IsChecked(); }
79 : 0 : String GetKeyName() const { return m_edKeyName.GetText(); }
80 : :
81 : : void setCreateStyleAction();
82 : 0 : inline void disallowViews()
83 : : {
84 : 0 : m_aRB_View.Disable();
85 : 0 : }
86 : 0 : inline void disallowUseHeaderLine()
87 : : {
88 : 0 : m_bUseHeaderAllowed = sal_False;
89 : 0 : m_aCB_UseHeaderLine.Disable();
90 : 0 : }
91 : :
92 : : void setCreatePrimaryKey( bool _bDoCreate, const ::rtl::OUString& _rSuggestedName );
93 : : };
94 : : }
95 : : #endif // DBAUI_WIZARD_CPAGE_HXX
96 : :
97 : :
98 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|