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 : Edit* m_pEdTableName;
38 : RadioButton* m_pRB_DefData;
39 : RadioButton* m_pRB_Def;
40 : RadioButton* m_pRB_View;
41 : RadioButton* m_pRB_AppendData;
42 : CheckBox* m_pCB_UseHeaderLine;
43 : CheckBox* m_pCB_PrimaryColumn;
44 : FixedText* m_pFT_KeyName;
45 : Edit* m_pEdKeyName;
46 : sal_Int16 m_nOldOperation;
47 :
48 : OWizColumnSelect* m_pPage2;
49 : 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 :
70 0 : bool IsOptionDefData() const { return m_pRB_DefData->IsChecked(); }
71 0 : bool IsOptionDef() const { return m_pRB_Def->IsChecked(); }
72 : bool IsOptionAppendData() const { return m_pRB_AppendData->IsChecked(); }
73 0 : bool IsOptionView() const { return m_pRB_View->IsChecked(); }
74 : bool UseHeaderLine() const { return m_pCB_UseHeaderLine->IsChecked(); }
75 0 : OUString GetKeyName() const { return m_pEdKeyName->GetText(); }
76 :
77 : void setCreateStyleAction();
78 0 : inline void disallowViews()
79 : {
80 0 : m_pRB_View->Disable();
81 0 : }
82 0 : inline void disallowUseHeaderLine()
83 : {
84 0 : m_bUseHeaderAllowed = false;
85 0 : m_pCB_UseHeaderLine->Disable();
86 0 : }
87 :
88 : void setCreatePrimaryKey( bool _bDoCreate, const OUString& _rSuggestedName );
89 : };
90 : }
91 : #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_WCPAGE_HXX
92 :
93 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|