1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 INCLUDED_SVTOOLS_PRNSETUP_HXX
21 #define INCLUDED_SVTOOLS_PRNSETUP_HXX
23 #include <svtools/svtdllapi.h>
25 #include <vcl/dialog.hxx>
26 #include <vcl/fixed.hxx>
27 #include <vcl/button.hxx>
28 #include <vcl/group.hxx>
29 #include <vcl/lstbox.hxx>
30 #include <vcl/timer.hxx>
36 class SVT_DLLPUBLIC PrinterSetupDialog
: public ModalDialog
39 VclPtr
<ListBox
> m_pLbName
;
40 VclPtr
<PushButton
> m_pBtnProperties
;
41 VclPtr
<PushButton
> m_pBtnOptions
;
42 VclPtr
<FixedText
> m_pFiStatus
;
43 VclPtr
<FixedText
> m_pFiType
;
44 VclPtr
<FixedText
> m_pFiLocation
;
45 VclPtr
<FixedText
> m_pFiComment
;
46 AutoTimer maStatusTimer
;
47 VclPtr
<Printer
> mpPrinter
;
48 VclPtr
<Printer
> mpTempPrinter
;
50 SVT_DLLPRIVATE
void ImplSetInfo();
52 DECL_DLLPRIVATE_LINK( ImplPropertiesHdl
, Button
*, void );
53 DECL_DLLPRIVATE_LINK( ImplChangePrinterHdl
, ListBox
&, void );
54 DECL_DLLPRIVATE_LINK( ImplStatusHdl
, Timer
*, void );
57 PrinterSetupDialog( vcl::Window
* pWindow
);
58 virtual ~PrinterSetupDialog() override
;
59 virtual void dispose() override
;
61 void SetPrinter( Printer
* pNewPrinter
) { mpPrinter
= pNewPrinter
; }
62 Printer
* GetPrinter() const { return mpPrinter
; }
64 virtual void DataChanged( const DataChangedEvent
& rDCEvt
) override
;
65 virtual bool EventNotify( NotifyEvent
& rNEvt
) override
;
67 virtual short Execute() override
;
69 void SetOptionsHdl( const Link
<Button
*,void>& rLink
);
73 #define IMPL_PRINTDLG_STATUS_UPDATE 15000
75 void ImplFillPrnDlgListBox( const Printer
* pPrinter
,
76 ListBox
* pBox
, PushButton
* pPropBtn
);
77 void ImplFreePrnDlgListBox( ListBox
* pBox
, bool bClear
= true );
78 Printer
* ImplPrnDlgListBoxSelect( ListBox
* pBox
, PushButton
* pPropBtn
,
79 Printer
* pPrinter
, Printer
* pTempPrinter
);
80 Printer
* ImplPrnDlgUpdatePrinter( Printer
* pPrinter
, Printer
* pTempPrinter
);
81 void ImplPrnDlgUpdateQueueInfo( ListBox
* pBox
, QueueInfo
& rInfo
);
82 OUString
ImplPrnDlgGetStatusText( const QueueInfo
& rInfo
);
84 #endif // INCLUDED_SVTOOLS_PRNSETUP_HXX
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */