LibreOffice Module svtools (master) 1
prnsetup.hxx
Go to the documentation of this file.
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#pragma once
21
22#include <svtools/svtdllapi.h>
23#include <vcl/print.hxx>
24#include <vcl/weld.hxx>
25#include <vcl/timer.hxx>
26
27class Printer;
28class QueueInfo;
29class VclSimpleEvent;
30
32{
33private:
34 std::unique_ptr<weld::ComboBox> m_xLbName;
35 std::unique_ptr<weld::Button> m_xBtnProperties;
36 std::unique_ptr<weld::Button> m_xBtnOptions;
37 std::unique_ptr<weld::Label> m_xFiStatus;
38 std::unique_ptr<weld::Label> m_xFiType;
39 std::unique_ptr<weld::Label> m_xFiLocation;
40 std::unique_ptr<weld::Label> m_xFiComment;
44
45 SVT_DLLPRIVATE void ImplSetInfo();
46
47 DECL_DLLPRIVATE_LINK( ImplPropertiesHdl, weld::Button&, void );
48 DECL_DLLPRIVATE_LINK( ImplChangePrinterHdl, weld::ComboBox&, void );
49 DECL_DLLPRIVATE_LINK( ImplGetFocusHdl, weld::Widget&, void );
50 DECL_DLLPRIVATE_LINK( ImplStatusHdl, Timer*, void );
51 DECL_DLLPRIVATE_LINK( ImplDataChangedHdl, VclSimpleEvent&, void);
52
53public:
55 virtual ~PrinterSetupDialog() override;
56
57 void SetPrinter( Printer* pNewPrinter ) { mpPrinter = pNewPrinter; }
58 Printer* GetPrinter() const { return mpPrinter; }
59
60 virtual short run() override;
61
62 weld::Window* GetFrameWeld() const { return m_xDialog.get(); }
63
64 void SetOptionsHdl( const Link<weld::Button&,void>& rLink );
65};
66
67
68#define IMPL_PRINTDLG_STATUS_UPDATE 15000
69
70void ImplFillPrnDlgListBox( const Printer* pPrinter,
71 weld::ComboBox* pBox, weld::Button* pPropBtn );
72void ImplFreePrnDlgListBox( weld::ComboBox* pBox, bool bClear = true );
74 Printer const * pPrinter, Printer* pTempPrinter );
75Printer* ImplPrnDlgUpdatePrinter( Printer const * pPrinter, Printer* pTempPrinter );
76void ImplPrnDlgUpdateQueueInfo( weld::ComboBox const * pBox, QueueInfo& rInfo );
77OUString ImplPrnDlgGetStatusText( const QueueInfo& rInfo );
78
79/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Reference< XExecutableDialog > m_xDialog
std::unique_ptr< weld::Label > m_xFiType
Definition: prnsetup.hxx:38
std::unique_ptr< weld::Label > m_xFiComment
Definition: prnsetup.hxx:40
DECL_DLLPRIVATE_LINK(ImplPropertiesHdl, weld::Button &, void)
std::unique_ptr< weld::Button > m_xBtnOptions
Definition: prnsetup.hxx:36
std::unique_ptr< weld::Label > m_xFiLocation
Definition: prnsetup.hxx:39
VclPtr< Printer > mpPrinter
Definition: prnsetup.hxx:42
std::unique_ptr< weld::ComboBox > m_xLbName
Definition: prnsetup.hxx:34
Printer * GetPrinter() const
Definition: prnsetup.hxx:58
weld::Window * GetFrameWeld() const
Definition: prnsetup.hxx:62
VclPtr< Printer > mpTempPrinter
Definition: prnsetup.hxx:43
std::unique_ptr< weld::Button > m_xBtnProperties
Definition: prnsetup.hxx:35
DECL_DLLPRIVATE_LINK(ImplGetFocusHdl, weld::Widget &, void)
AutoTimer maStatusTimer
Definition: prnsetup.hxx:41
std::unique_ptr< weld::Label > m_xFiStatus
Definition: prnsetup.hxx:37
DECL_DLLPRIVATE_LINK(ImplChangePrinterHdl, weld::ComboBox &, void)
void SetPrinter(Printer *pNewPrinter)
Definition: prnsetup.hxx:57
DECL_DLLPRIVATE_LINK(ImplStatusHdl, Timer *, void)
DECL_DLLPRIVATE_LINK(ImplDataChangedHdl, VclSimpleEvent &, void)
virtual short run()
OUString ImplPrnDlgGetStatusText(const QueueInfo &rInfo)
Definition: prnsetup.cxx:143
void ImplFillPrnDlgListBox(const Printer *pPrinter, weld::ComboBox *pBox, weld::Button *pPropBtn)
Definition: prnsetup.cxx:33
void ImplPrnDlgUpdateQueueInfo(weld::ComboBox const *pBox, QueueInfo &rInfo)
Definition: prnsetup.cxx:117
Printer * ImplPrnDlgUpdatePrinter(Printer const *pPrinter, Printer *pTempPrinter)
Definition: prnsetup.cxx:98
Printer * ImplPrnDlgListBoxSelect(weld::ComboBox const *pBox, weld::Button *pPropBtn, Printer const *pPrinter, Printer *pTempPrinter)
Definition: prnsetup.cxx:59
void ImplFreePrnDlgListBox(weld::ComboBox *pBox, bool bClear=true)
Definition: prnsetup.cxx:52
#define SVT_DLLPUBLIC
Definition: svtdllapi.h:27
#define SVT_DLLPRIVATE
Definition: svtdllapi.h:29