source: flair-dev/trunk/include/FlairCore/Label.h@ 8

Last change on this file since 8 was 2, checked in by Sanahuja Guillaume, 8 years ago

initial commit flaircore

File size: 1.5 KB
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5/*!
6 * \file Label.h
7 * \brief Class displaying a QLabel on the ground station
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2012/08/17
10 * \version 4.0
11 */
12
13#ifndef LABEL_H
14#define LABEL_H
15
16#include <Widget.h>
17
18namespace flair
19{
20namespace gui
21{
22
23 class LayoutPosition;
24
25 /*! \class Label
26 *
27 * \brief Class displaying a QLabel on the ground station
28 *
29 */
30 class Label:public Widget
31 {
32 public:
33 /*!
34 * \brief Constructor
35 *
36 * Construct a QLabel at given position. \n
37 * The Label will automatically be child of position->getLayout() Layout. After calling this constructor,
38 * position will be deleted as it is no longer usefull.
39 *
40 * \param parent parent
41 * \param name name
42 * \param buf_size size of the text buffer
43 */
44 Label(const LayoutPosition* position,std::string name,size_t buf_size=255);
45
46 /*!
47 * \brief Destructor
48 *
49 */
50 ~Label();
51
52 /*!
53 * \brief Set text
54 *
55 * \param format text string to display, see standard printf
56 */
57 void SetText(const char * format, ...);
58
59 private:
60 char* printf_buffer;
61 };
62
63} // end namespace gui
64} // end namespace flair
65
66#endif // LABEL_H
Note: See TracBrowser for help on using the repository browser.