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