LCOV - code coverage report
Current view: top level - uui/source - logindlg.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 10 0.0 %
Date: 2015-06-13 12:38:46 Functions: 0 10 0.0 %
Legend: Lines: hit not hit

          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             : 
      20             : #ifndef INCLUDED_UUI_SOURCE_LOGINDLG_HXX
      21             : #define INCLUDED_UUI_SOURCE_LOGINDLG_HXX
      22             : 
      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>
      28             : 
      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 credentials"
      39             : 
      40             : 
      41             : 
      42             : 
      43             : 
      44             : class LoginDialog : public ModalDialog
      45             : {
      46             :     VclPtr<FixedText>      m_pErrorFT;
      47             :     VclPtr<FixedText>      m_pErrorInfo;
      48             :     VclPtr<FixedText>      m_pRequestInfo;
      49             :     VclPtr<FixedText>      m_pPathFT;
      50             :     VclPtr<Edit>           m_pPathED;
      51             :     VclPtr<PushButton>     m_pPathBtn;
      52             :     VclPtr<FixedText>      m_pNameFT;
      53             :     VclPtr<Edit>           m_pNameED;
      54             :     VclPtr<FixedText>      m_pPasswordFT;
      55             :     VclPtr<Edit>           m_pPasswordED;
      56             :     VclPtr<FixedText>      m_pAccountFT;
      57             :     VclPtr<Edit>           m_pAccountED;
      58             :     VclPtr<CheckBox>       m_pSavePasswdBtn;
      59             :     VclPtr<CheckBox>       m_pUseSysCredsCB;
      60             :     VclPtr<OKButton>       m_pOKBtn;
      61             : 
      62             :     void            HideControls_Impl( sal_uInt16 nFlags );
      63             :     void            EnableUseSysCredsControls_Impl( bool bUseSysCredsEnabled );
      64             : 
      65             :     DECL_LINK(OKHdl_Impl, void *);
      66             :     DECL_LINK(PathHdl_Impl, void *);
      67             :     DECL_LINK(UseSysCredsHdl_Impl, void *);
      68             : 
      69             : public:
      70             :     LoginDialog(vcl::Window* pParent, sal_uInt16 nFlags,
      71             :         const OUString& rServer, const OUString &rRealm);
      72             :     virtual ~LoginDialog();
      73             :     virtual void dispose() SAL_OVERRIDE;
      74             : 
      75             :     OUString        GetPath() const                             { return m_pPathED->GetText(); }
      76             :     void            SetPath( const OUString& rNewPath )           { m_pPathED->SetText( rNewPath ); }
      77           0 :     OUString        GetName() const                             { return m_pNameED->GetText(); }
      78           0 :     void            SetName( const OUString& rNewName )           { m_pNameED->SetText( rNewName ); }
      79           0 :     OUString        GetPassword() const                         { return m_pPasswordED->GetText(); }
      80           0 :     void            SetPassword( const OUString& rNew )           { m_pPasswordED->SetText( rNew ); }
      81           0 :     OUString        GetAccount() const                          { return m_pAccountED->GetText(); }
      82             :     void            SetAccount( const OUString& rNew )            { m_pAccountED->SetText( rNew ); }
      83           0 :     bool            IsSavePassword() const                      { return m_pSavePasswdBtn->IsChecked(); }
      84           0 :     void            SetSavePassword( bool bSave )               { m_pSavePasswdBtn->Check( bSave ); }
      85           0 :     void            SetSavePasswordText( const OUString& rTxt )   { m_pSavePasswdBtn->SetText( rTxt ); }
      86           0 :     bool        IsUseSystemCredentials() const              { return m_pUseSysCredsCB->IsChecked(); }
      87             :     void            SetUseSystemCredentials( bool bUse );
      88           0 :     void            SetErrorText( const OUString& rTxt )          { m_pErrorInfo->SetText( rTxt ); }
      89             :     void            SetLoginRequestText( const OUString& rTxt )   { m_pRequestInfo->SetText( rTxt ); }
      90             :     void            ClearPassword();
      91             :     void            ClearAccount();
      92             : };
      93             : 
      94             : 
      95             : 
      96             : 
      97             : 
      98             : 
      99             : 
     100             : #endif // INCLUDED_UUI_SOURCE_LOGINDLG_HXX
     101             : 
     102             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11