1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_WCPAGE_HXX
20 #define INCLUDED_DBACCESS_SOURCE_UI_INC_WCPAGE_HXX
22 #include "WTabPage.hxx"
24 #include "QEnumTypes.hxx"
25 #include <vcl/fixed.hxx>
26 #include <vcl/group.hxx>
27 #include <vcl/edit.hxx>
28 #include <vcl/button.hxx>
32 class OWizColumnSelect
;
33 class OWizNormalExtend
;
34 class OCopyTable
: public OWizardPage
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
;
48 VclPtr
<OWizColumnSelect
> m_pPage2
;
49 VclPtr
<OWizNormalExtend
> m_pPage3
;
52 bool m_bUseHeaderAllowed
;
54 DECL_LINK_TYPED( AppendDataClickHdl
, Button
*, void );
55 DECL_LINK_TYPED( RadioChangeHdl
, Button
*, void );
56 DECL_LINK_TYPED( KeyClickHdl
, Button
*, void );
58 bool checkAppendData();
59 void SetAppendDataRadio();
62 virtual void Reset() override
;
63 virtual void ActivatePage() override
;
64 virtual bool LeavePage() override
;
65 virtual OUString
GetTitle() const override
;
67 OCopyTable( vcl::Window
* pParent
);
68 virtual ~OCopyTable();
69 virtual void dispose() override
;
71 bool IsOptionDefData() const { return m_pRB_DefData
->IsChecked(); }
72 bool IsOptionDef() const { return m_pRB_Def
->IsChecked(); }
73 bool IsOptionView() const { return m_pRB_View
->IsChecked(); }
74 OUString
GetKeyName() const { return m_pEdKeyName
->GetText(); }
76 void setCreateStyleAction();
77 inline void disallowViews()
79 m_pRB_View
->Disable();
81 inline void disallowUseHeaderLine()
83 m_bUseHeaderAllowed
= false;
84 m_pCB_UseHeaderLine
->Disable();
87 void setCreatePrimaryKey( bool _bDoCreate
, const OUString
& _rSuggestedName
);
90 #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_WCPAGE_HXX
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */