LibreOffice Module vcl (master)  1
logger.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 
10 #ifndef INCLUDED_VCL_UITEST_LOGGER_HXX
11 #define INCLUDED_VCL_UITEST_LOGGER_HXX
12 
13 #include <sal/config.h>
14 
15 #include <string_view>
16 
17 #include <vcl/dllapi.h>
18 
19 #include <tools/stream.hxx>
20 #include <vcl/vclevent.hxx>
21 
22 namespace com::sun::star::beans
23 {
24 struct PropertyValue;
25 }
26 namespace com::sun::star::uno
27 {
28 template <class E> class Sequence;
29 }
30 struct EventDescription;
31 class Control;
32 class KeyEvent;
33 
35 {
36 private:
38 
39  bool mbValid;
40 
41  OUString app_name;
42 
43 public:
44  UITestLogger();
45 
46  void logCommand(const OUString& rAction,
47  const css::uno::Sequence<css::beans::PropertyValue>& rArgs);
48 
49  void logAction(VclPtr<Control> const& xUIElement, VclEventId nEvent);
50 
51  void logAction(vcl::Window* const& xUIWin, VclEventId nEvent);
52 
53  void log(std::u16string_view rString);
54 
55  void logKeyInput(VclPtr<vcl::Window> const& xUIElement, const KeyEvent& rEvent);
56 
57  void logEvent(const EventDescription& rDescription);
58 
59  static UITestLogger& getInstance();
60 
61  void setAppName(OUString name) { app_name = name; }
62 
63  OUString getAppName() const { return app_name; }
64 };
65 
66 #endif
67 
68 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
tuple log
void setAppName(OUString name)
Definition: logger.hxx:61
VclEventId
Definition: vclevent.hxx:37
SvFileStream maStream
Definition: logger.hxx:37
#define UITEST_DLLPUBLIC
Definition: dllapi.h:36
OUString app_name
Definition: logger.hxx:41
Definition: ctrl.hxx:33
OUString getAppName() const
Definition: logger.hxx:63
bool mbValid
Definition: logger.hxx:39