LibreOffice Module dbaccess (master) 1
WCPage.hxx
Go to the documentation of this file.
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#pragma once
20
21#include "WTabPage.hxx"
22
23namespace dbaui
24{
25 class OWizColumnSelect;
26 class OWizNormalExtend;
27 class OCopyTable final : public OWizardPage
28 {
31 sal_Int16 m_nOldOperation;
32
33 std::unique_ptr<weld::Entry> m_xEdTableName;
34 std::unique_ptr<weld::RadioButton> m_xRB_DefData;
35 std::unique_ptr<weld::RadioButton> m_xRB_Def;
36 std::unique_ptr<weld::RadioButton> m_xRB_View;
37 std::unique_ptr<weld::RadioButton> m_xRB_AppendData;
38 std::unique_ptr<weld::CheckButton> m_xCB_UseHeaderLine;
39 std::unique_ptr<weld::CheckButton> m_xCB_PrimaryColumn;
40 std::unique_ptr<weld::Label> m_xFT_KeyName;
41 std::unique_ptr<weld::Entry> m_xEdKeyName;
42
43 DECL_LINK( RadioChangeHdl, weld::Toggleable&, void );
44 DECL_LINK( KeyClickHdl, weld::Toggleable&, void );
45
46 bool checkAppendData();
47 void SetAppendDataRadio();
48
49 public:
50 virtual void Reset() override;
51 virtual void Activate() override;
52 virtual bool LeavePage() override;
53 virtual OUString GetTitle() const override ;
54
56 virtual ~OCopyTable() override;
57
58 bool IsOptionDefData() const { return m_xRB_DefData->get_active(); }
59 bool IsOptionDef() const { return m_xRB_Def->get_active(); }
60 bool IsOptionView() const { return m_xRB_View->get_active(); }
61 OUString GetKeyName() const { return m_xEdKeyName->get_text(); }
62
65 {
66 m_xRB_View->set_sensitive(false);
67 }
69 {
70 m_bUseHeaderAllowed = false;
71 m_xCB_UseHeaderLine->set_sensitive(false);
72 }
73
74 void setCreatePrimaryKey( bool _bDoCreate, const OUString& _rSuggestedName );
75 };
76}
77
78/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::RadioButton > m_xRB_AppendData
Definition: WCPage.hxx:37
void disallowViews()
Definition: WCPage.hxx:64
OUString GetKeyName() const
Definition: WCPage.hxx:61
virtual ~OCopyTable() override
Definition: WCPage.cxx:87
bool m_bUseHeaderAllowed
Definition: WCPage.hxx:30
sal_Int16 m_nOldOperation
Definition: WCPage.hxx:31
std::unique_ptr< weld::RadioButton > m_xRB_View
Definition: WCPage.hxx:36
virtual bool LeavePage() override
Definition: WCPage.cxx:131
std::unique_ptr< weld::Entry > m_xEdTableName
Definition: WCPage.hxx:33
bool IsOptionDefData() const
Definition: WCPage.hxx:58
bool m_bPKeyAllowed
Definition: WCPage.hxx:29
std::unique_ptr< weld::CheckButton > m_xCB_UseHeaderLine
Definition: WCPage.hxx:38
void setCreateStyleAction()
Definition: WCPage.cxx:294
bool checkAppendData()
Definition: WCPage.cxx:232
void SetAppendDataRadio()
Definition: WCPage.cxx:91
std::unique_ptr< weld::Label > m_xFT_KeyName
Definition: WCPage.hxx:40
virtual void Activate() override
Definition: WCPage.cxx:211
void disallowUseHeaderLine()
Definition: WCPage.hxx:68
DECL_LINK(KeyClickHdl, weld::Toggleable &, void)
std::unique_ptr< weld::RadioButton > m_xRB_Def
Definition: WCPage.hxx:35
bool IsOptionDef() const
Definition: WCPage.hxx:59
virtual void Reset() override
Definition: WCPage.cxx:224
DECL_LINK(RadioChangeHdl, weld::Toggleable &, void)
void setCreatePrimaryKey(bool _bDoCreate, const OUString &_rSuggestedName)
Definition: WCPage.cxx:284
std::unique_ptr< weld::RadioButton > m_xRB_DefData
Definition: WCPage.hxx:34
bool IsOptionView() const
Definition: WCPage.hxx:60
std::unique_ptr< weld::Entry > m_xEdKeyName
Definition: WCPage.hxx:41
std::unique_ptr< weld::CheckButton > m_xCB_PrimaryColumn
Definition: WCPage.hxx:39
virtual OUString GetTitle() const override
Definition: WCPage.cxx:219
OCopyTable(weld::Container *pParent, OCopyTableWizard *pWizard)
Definition: WCPage.cxx:44