Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / uui / source / logindlg.hxx
blobbd533f157a52ec45f6d7265015e80a597f29a08d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef UUI_LOGINDLG_HXX
30 #define UUI_LOGINDLG_HXX
32 #include <svtools/stdctrl.hxx>
33 #include <vcl/button.hxx>
34 #include <vcl/dialog.hxx>
35 #include <vcl/edit.hxx>
36 #include <vcl/fixed.hxx>
38 //============================================================================
39 #define LF_NO_PATH 0x0001 // hide "path"
40 #define LF_NO_USERNAME 0x0002 // hide "name"
41 #define LF_NO_PASSWORD 0x0004 // hide "password"
42 #define LF_NO_SAVEPASSWORD 0x0008 // hide "save password"
43 #define LF_NO_ERRORTEXT 0x0010 // hide message
44 #define LF_PATH_READONLY 0x0020 // "path" readonly
45 #define LF_USERNAME_READONLY 0x0040 // "name" readonly
46 #define LF_NO_ACCOUNT 0x0080 // hide "account"
47 #define LF_NO_USESYSCREDS 0x0100 // hide "use system cedentials"
49 //............................................................................
50 //............................................................................
52 //============================================================================
53 class LoginDialog : public ModalDialog
55 FixedText aErrorFT;
56 FixedInfo aErrorInfo;
57 FixedLine aLogin1FL;
58 FixedInfo aRequestInfo;
59 FixedLine aLogin2FL;
60 FixedText aPathFT;
61 Edit aPathED;
62 PushButton aPathBtn;
63 FixedText aNameFT;
64 Edit aNameED;
65 FixedText aPasswordFT;
66 Edit aPasswordED;
67 FixedText aAccountFT;
68 Edit aAccountED;
69 CheckBox aSavePasswdBtn;
70 CheckBox aUseSysCredsCB;
71 FixedLine aButtonsFL;
72 OKButton aOKBtn;
73 CancelButton aCancelBtn;
74 HelpButton aHelpBtn;
76 void HideControls_Impl( sal_uInt16 nFlags );
77 void EnableUseSysCredsControls_Impl( sal_Bool bUseSysCredsEnabled );
79 DECL_LINK(OKHdl_Impl, void *);
80 DECL_LINK(PathHdl_Impl, void *);
81 DECL_LINK(UseSysCredsHdl_Impl, void *);
83 public:
84 LoginDialog( Window* pParent, sal_uInt16 nFlags,
85 const rtl::OUString& rServer, const rtl::OUString &rRealm,
86 ResMgr * pResMgr );
87 virtual ~LoginDialog();
89 String GetPath() const { return aPathED.GetText(); }
90 void SetPath( const String& rNewPath ) { aPathED.SetText( rNewPath ); }
91 String GetName() const { return aNameED.GetText(); }
92 void SetName( const String& rNewName ) { aNameED.SetText( rNewName ); }
93 String GetPassword() const { return aPasswordED.GetText(); }
94 void SetPassword( const String& rNew ) { aPasswordED.SetText( rNew ); }
95 String GetAccount() const { return aAccountED.GetText(); }
96 void SetAccount( const String& rNew ) { aAccountED.SetText( rNew ); }
97 sal_Bool IsSavePassword() const { return aSavePasswdBtn.IsChecked(); }
98 void SetSavePassword( sal_Bool bSave ) { aSavePasswdBtn.Check( bSave ); }
99 void SetSavePasswordText( const String& rTxt ) { aSavePasswdBtn.SetText( rTxt ); }
100 sal_Bool IsUseSystemCredentials() const { return aUseSysCredsCB.IsChecked(); }
101 void SetUseSystemCredentials( sal_Bool bUse );
102 void SetErrorText( const String& rTxt ) { aErrorInfo.SetText( rTxt ); }
103 void SetLoginRequestText( const String& rTxt ) { aRequestInfo.SetText( rTxt ); }
104 void ClearPassword();
105 void ClearAccount();
108 // -----------------------------------------------------------------------
111 //............................................................................
112 //............................................................................
114 #endif // UUI_LOGINDLG_HXX
116 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */