~ubuntu-branches/ubuntu/precise/openwalnut/precise

« back to all changes in this revision

Viewing changes to src/qt4gui/qt4/controlPanel/WPropertyFilenameWidget.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Eichelbaum
  • Date: 2011-06-21 10:26:54 UTC
  • Revision ID: james.westby@ubuntu.com-20110621102654-rq0zf436q949biih
Tags: upstream-1.2.5
ImportĀ upstreamĀ versionĀ 1.2.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//---------------------------------------------------------------------------
 
2
//
 
3
// Project: OpenWalnut ( http://www.openwalnut.org )
 
4
//
 
5
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
 
6
// For more information see http://www.openwalnut.org/copying
 
7
//
 
8
// This file is part of OpenWalnut.
 
9
//
 
10
// OpenWalnut is free software: you can redistribute it and/or modify
 
11
// it under the terms of the GNU Lesser General Public License as published by
 
12
// the Free Software Foundation, either version 3 of the License, or
 
13
// (at your option) any later version.
 
14
//
 
15
// OpenWalnut is distributed in the hope that it will be useful,
 
16
// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
18
// GNU Lesser General Public License for more details.
 
19
//
 
20
// You should have received a copy of the GNU Lesser General Public License
 
21
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
 
22
//
 
23
//---------------------------------------------------------------------------
 
24
 
 
25
#ifndef WPROPERTYFILENAMEWIDGET_H
 
26
#define WPROPERTYFILENAMEWIDGET_H
 
27
 
 
28
#include <string>
 
29
 
 
30
#include <QtGui/QPushButton>
 
31
#include <QtGui/QHBoxLayout>
 
32
 
 
33
#include "WPropertyWidget.h"
 
34
 
 
35
/**
 
36
 * Implements a property widget for WPropColor.
 
37
 */
 
38
class WPropertyFilenameWidget: public WPropertyWidget
 
39
{
 
40
    Q_OBJECT
 
41
public:
 
42
 
 
43
    /**
 
44
     * Constructor. Creates a new widget appropriate for the specified property.
 
45
     *
 
46
     * \param property the property to handle
 
47
     * \param parent the parent widget.
 
48
     * \param propertyGrid the grid used to layout the labels and property widgets
 
49
     */
 
50
    WPropertyFilenameWidget( WPropFilename property, QGridLayout* propertyGrid, QWidget* parent = 0 );
 
51
 
 
52
    /**
 
53
     * Destructor.
 
54
     */
 
55
    virtual ~WPropertyFilenameWidget();
 
56
 
 
57
protected:
 
58
 
 
59
    /**
 
60
     * Called whenever the widget should update.
 
61
     */
 
62
    virtual void update();
 
63
 
 
64
    /**
 
65
     * The filename property represented by this widget.
 
66
     */
 
67
    WPropFilename m_fnProperty;
 
68
 
 
69
    /**
 
70
     * The button field showing the value
 
71
     */
 
72
    QPushButton m_button;
 
73
 
 
74
    /**
 
75
     * Layout used to position the label and the checkbox
 
76
     */
 
77
    QHBoxLayout m_layout;
 
78
 
 
79
    /**
 
80
     * Used to show the property as text.
 
81
     */
 
82
    QLabel m_asText;
 
83
 
 
84
    /**
 
85
     * The layout used for the pure output (information properties)
 
86
     */
 
87
    QHBoxLayout m_infoLayout;
 
88
 
 
89
private:
 
90
 
 
91
public slots:
 
92
 
 
93
    /**
 
94
     * Called when the m_button was pressed.
 
95
     */
 
96
    void buttonReleased();
 
97
};
 
98
 
 
99
#endif  // WPROPERTYFILENAMEWIDGET_H
 
100