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 INCLUDED_DBACCESS_SOURCE_UI_INC_WCPAGE_HXX
20 : #define INCLUDED_DBACCESS_SOURCE_UI_INC_WCPAGE_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 : class OCopyTable : public OWizardPage
35 : {
36 : protected:
37 : VclPtr<Edit> m_pEdTableName;
38 : VclPtr<RadioButton> m_pRB_DefData;
39 : VclPtr<RadioButton> m_pRB_Def;
40 : VclPtr<RadioButton> m_pRB_View;
41 : VclPtr<RadioButton> m_pRB_AppendData;
42 : VclPtr<CheckBox> m_pCB_UseHeaderLine;
43 : VclPtr<CheckBox> m_pCB_PrimaryColumn;
44 : VclPtr<FixedText> m_pFT_KeyName;
45 : VclPtr<Edit> m_pEdKeyName;
46 : sal_Int16 m_nOldOperation;
47 :
48 : VclPtr<OWizColumnSelect> m_pPage2;
49 : VclPtr<OWizNormalExtend> m_pPage3;
50 :
51 : bool m_bPKeyAllowed;
52 : bool m_bUseHeaderAllowed;
53 :
54 : DECL_LINK( AppendDataClickHdl, Button* );
55 : DECL_LINK( RadioChangeHdl, Button* );
56 : DECL_LINK( KeyClickHdl, Button* );
57 :
58 : bool checkAppendData();
59 : void SetAppendDataRadio();
60 :
61 : public:
62 : virtual void Reset() SAL_OVERRIDE;
63 : virtual void ActivatePage() SAL_OVERRIDE;
64 : virtual bool LeavePage() SAL_OVERRIDE;
65 : virtual OUString GetTitle() const SAL_OVERRIDE ;
66 :
67 : OCopyTable( vcl::Window * pParent );
68 : virtual ~OCopyTable();
69 : virtual void dispose() SAL_OVERRIDE;
70 :
71 0 : bool IsOptionDefData() const { return m_pRB_DefData->IsChecked(); }
72 0 : bool IsOptionDef() const { return m_pRB_Def->IsChecked(); }
73 : bool IsOptionAppendData() const { return m_pRB_AppendData->IsChecked(); }
74 0 : bool IsOptionView() const { return m_pRB_View->IsChecked(); }
75 : bool UseHeaderLine() const { return m_pCB_UseHeaderLine->IsChecked(); }
76 0 : OUString GetKeyName() const { return m_pEdKeyName->GetText(); }
77 :
78 : void setCreateStyleAction();
79 0 : inline void disallowViews()
80 : {
81 0 : m_pRB_View->Disable();
82 0 : }
83 0 : inline void disallowUseHeaderLine()
84 : {
85 0 : m_bUseHeaderAllowed = false;
86 0 : m_pCB_UseHeaderLine->Disable();
87 0 : }
88 :
89 : void setCreatePrimaryKey( bool _bDoCreate, const OUString& _rSuggestedName );
90 : };
91 : }
92 : #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_WCPAGE_HXX
93 :
94 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|