tdf#130857 qt weld: Implement QtInstanceWidget::get_text_height
[LibreOffice.git] / dbaccess / source / ui / inc / WCPage.hxx
blob69dc96f144e2089552f13b326ceb8e359a5eb362
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 #pragma once
21 #include "WTabPage.hxx"
23 namespace dbaui
25 class OWizColumnSelect;
26 class OWizNormalExtend;
27 class OCopyTable final : public OWizardPage
29 bool m_bPKeyAllowed;
30 bool m_bUseHeaderAllowed;
31 sal_Int16 m_nOldOperation;
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;
43 DECL_LINK( RadioChangeHdl, weld::Toggleable&, void );
44 DECL_LINK( KeyClickHdl, weld::Toggleable&, void );
46 bool checkAppendData();
47 void SetAppendDataRadio();
49 public:
50 virtual void Reset() override;
51 virtual void Activate() override;
52 virtual bool LeavePage() override;
53 virtual OUString GetTitle() const override ;
55 OCopyTable(weld::Container* pParent, OCopyTableWizard* pWizard);
56 virtual ~OCopyTable() override;
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(); }
63 void setCreateStyleAction();
64 void disallowViews()
66 m_xRB_View->set_sensitive(false);
68 void disallowUseHeaderLine()
70 m_bUseHeaderAllowed = false;
71 m_xCB_UseHeaderLine->set_sensitive(false);
74 void setCreatePrimaryKey( bool _bDoCreate, const OUString& _rSuggestedName );
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */