Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / uui / source / logindlg.hxx
blob2c3fc64888bd7ad0aa7eafd936441e7dc50ed72e
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 .
20 #ifndef UUI_LOGINDLG_HXX
21 #define UUI_LOGINDLG_HXX
23 #include <svtools/stdctrl.hxx>
24 #include <vcl/button.hxx>
25 #include <vcl/dialog.hxx>
26 #include <vcl/edit.hxx>
27 #include <vcl/fixed.hxx>
29 //============================================================================
30 #define LF_NO_PATH 0x0001 // hide "path"
31 #define LF_NO_USERNAME 0x0002 // hide "name"
32 #define LF_NO_PASSWORD 0x0004 // hide "password"
33 #define LF_NO_SAVEPASSWORD 0x0008 // hide "save password"
34 #define LF_NO_ERRORTEXT 0x0010 // hide message
35 #define LF_PATH_READONLY 0x0020 // "path" readonly
36 #define LF_USERNAME_READONLY 0x0040 // "name" readonly
37 #define LF_NO_ACCOUNT 0x0080 // hide "account"
38 #define LF_NO_USESYSCREDS 0x0100 // hide "use system cedentials"
40 //............................................................................
41 //............................................................................
43 //============================================================================
44 class LoginDialog : public ModalDialog
46 FixedText aErrorFT;
47 FixedInfo aErrorInfo;
48 FixedLine aLogin1FL;
49 FixedInfo aRequestInfo;
50 FixedLine aLogin2FL;
51 FixedText aPathFT;
52 Edit aPathED;
53 PushButton aPathBtn;
54 FixedText aNameFT;
55 Edit aNameED;
56 FixedText aPasswordFT;
57 Edit aPasswordED;
58 FixedText aAccountFT;
59 Edit aAccountED;
60 CheckBox aSavePasswdBtn;
61 CheckBox aUseSysCredsCB;
62 FixedLine aButtonsFL;
63 OKButton aOKBtn;
64 CancelButton aCancelBtn;
65 HelpButton aHelpBtn;
67 void HideControls_Impl( sal_uInt16 nFlags );
68 void EnableUseSysCredsControls_Impl( sal_Bool bUseSysCredsEnabled );
70 DECL_LINK(OKHdl_Impl, void *);
71 DECL_LINK(PathHdl_Impl, void *);
72 DECL_LINK(UseSysCredsHdl_Impl, void *);
74 public:
75 LoginDialog( Window* pParent, sal_uInt16 nFlags,
76 const rtl::OUString& rServer, const rtl::OUString &rRealm,
77 ResMgr * pResMgr );
78 virtual ~LoginDialog();
80 String GetPath() const { return aPathED.GetText(); }
81 void SetPath( const String& rNewPath ) { aPathED.SetText( rNewPath ); }
82 String GetName() const { return aNameED.GetText(); }
83 void SetName( const String& rNewName ) { aNameED.SetText( rNewName ); }
84 String GetPassword() const { return aPasswordED.GetText(); }
85 void SetPassword( const String& rNew ) { aPasswordED.SetText( rNew ); }
86 String GetAccount() const { return aAccountED.GetText(); }
87 void SetAccount( const String& rNew ) { aAccountED.SetText( rNew ); }
88 sal_Bool IsSavePassword() const { return aSavePasswdBtn.IsChecked(); }
89 void SetSavePassword( sal_Bool bSave ) { aSavePasswdBtn.Check( bSave ); }
90 void SetSavePasswordText( const String& rTxt ) { aSavePasswdBtn.SetText( rTxt ); }
91 sal_Bool IsUseSystemCredentials() const { return aUseSysCredsCB.IsChecked(); }
92 void SetUseSystemCredentials( sal_Bool bUse );
93 void SetErrorText( const String& rTxt ) { aErrorInfo.SetText( rTxt ); }
94 void SetLoginRequestText( const String& rTxt ) { aRequestInfo.SetText( rTxt ); }
95 void ClearPassword();
96 void ClearAccount();
99 // -----------------------------------------------------------------------
102 //............................................................................
103 //............................................................................
105 #endif // UUI_LOGINDLG_HXX
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */