LCOV - code coverage report
Current view: top level - cui/source/inc - postdlg.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 23 0.0 %
Date: 2014-04-14 Functions: 0 9 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             : #ifndef INCLUDED_CUI_SOURCE_INC_POSTDLG_HXX
      20             : #define INCLUDED_CUI_SOURCE_INC_POSTDLG_HXX
      21             : 
      22             : #include <vcl/button.hxx>
      23             : #include <vcl/edit.hxx>
      24             : #include <vcl/group.hxx>
      25             : #include <vcl/layout.hxx>
      26             : #include <svtools/stdctrl.hxx>
      27             : #include <sfx2/basedlgs.hxx>
      28             : #include <svtools/svmedit.hxx>
      29             : 
      30             : // class SvxPostItDialog -------------------------------------------------
      31             : /*
      32             :     [Description]
      33             :     In this dialog a note can be created or edited. If the
      34             :     application holds a list of notes, it can be iterated
      35             :     over this list with links.
      36             : 
      37             :     [Items]
      38             :     <SvxPostitAuthorItem><SID_ATTR_POSTIT_AUTHOR>
      39             :     <SvxPostitDateItem><SID_ATTR_POSTIT_DATE>
      40             :     <SvxPostitTextItem><SID_ATTR_POSTIT_TEXT>
      41             : */
      42             : 
      43             : class SvxPostItDialog : public SfxModalDialog
      44             : {
      45             : public:
      46             :     SvxPostItDialog(Window* pParent, const SfxItemSet& rCoreSet,
      47             :                      bool bPrevNext = false);
      48             :     virtual ~SvxPostItDialog();
      49             : 
      50             :     static sal_uInt16*      GetRanges();
      51           0 :     const SfxItemSet*   GetOutputItemSet() const { return pOutSet; }
      52             : 
      53             :     Link                GetPrevHdl() const { return aPrevHdlLink; }
      54           0 :     void                SetPrevHdl( const Link& rLink )
      55           0 :                             { aPrevHdlLink = rLink; }
      56             :     Link                GetNextHdl() const { return aNextHdlLink; }
      57           0 :     void                SetNextHdl( const Link& rLink )
      58           0 :                             { aNextHdlLink = rLink; }
      59             : 
      60             :     void EnableTravel(sal_Bool bNext, sal_Bool bPrev);
      61           0 :     OUString GetNote()
      62             :     {
      63           0 :         return m_pEditED->GetText();
      64             :     }
      65           0 :     void SetNote(const OUString& rTxt)
      66             :     {
      67           0 :         m_pEditED->SetText(rTxt);
      68           0 :     }
      69             :     void ShowLastAuthor(const OUString& rAuthor, const OUString& rDate);
      70           0 :     void DontChangeAuthor()
      71             :     {
      72           0 :         m_pAuthorBtn->Enable(false);
      73           0 :     }
      74           0 :     void HideAuthor()
      75             :     {
      76           0 :         m_pInsertAuthor->Hide();
      77           0 :     }
      78           0 :     void SetReadonlyPostIt(bool bDisable)
      79             :     {
      80           0 :         m_pOKBtn->Enable( !bDisable );
      81           0 :         m_pEditED->SetReadOnly( bDisable );
      82           0 :         m_pAuthorBtn->Enable( !bDisable );
      83           0 :     }
      84           0 :     bool IsOkEnabled() const
      85             :     {
      86           0 :         return m_pOKBtn->IsEnabled();
      87             :     }
      88             : 
      89             : private:
      90             :     FixedText*          m_pLastEditFT;
      91             : 
      92             :     VclMultiLineEdit*   m_pEditED;
      93             : 
      94             :     VclContainer*       m_pInsertAuthor;
      95             :     PushButton*         m_pAuthorBtn;
      96             : 
      97             :     OKButton*           m_pOKBtn;
      98             : 
      99             :     PushButton*         m_pPrevBtn;
     100             :     PushButton*         m_pNextBtn;
     101             : 
     102             :     const SfxItemSet&   rSet;
     103             :     SfxItemSet*         pOutSet;
     104             : 
     105             :     Link                aPrevHdlLink;
     106             :     Link                aNextHdlLink;
     107             : 
     108             :     DECL_LINK(Stamp, void *);
     109             :     DECL_LINK(OKHdl, void *);
     110             :     DECL_LINK(PrevHdl, void *);
     111             :     DECL_LINK(NextHdl, void *);
     112             : };
     113             : 
     114             : #endif
     115             : 
     116             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10