libyui-qt
 
Loading...
Searching...
No Matches
YQPartitionSplitter.h
1/*
2 Copyright (C) 2000-2012 Novell, Inc
3 This library is free software; you can redistribute it and/or modify
4 it under the terms of the GNU Lesser General Public License as
5 published by the Free Software Foundation; either version 2.1 of the
6 License, or (at your option) version 3.0 of the License. This library
7 is distributed in the hope that it will be useful, but WITHOUT ANY
8 WARRANTY; without even the implied warranty of MERCHANTABILITY or
9 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10 License for more details. You should have received a copy of the GNU
11 Lesser General Public License along with this library; if not, write
12 to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13 Floor, Boston, MA 02110-1301 USA
14*/
15
16
17/*-/
18
19 File: YQPartitionSplitter.h
20
21 Author: Stefan Hundhammer <shundhammer@suse.de>
22
23/-*/
24
25
26#ifndef YQPartitionSplitter_h
27#define YQPartitionSplitter_h
28
29#include "qwidget.h"
30#include <yui/YPartitionSplitter.h>
31
32class YLayoutBox;
33class YQBarGraph;
34class YQIntField;
35class YQSlider;
36
37
38class YQPartitionSplitter : public QWidget, public YPartitionSplitter
39{
40 Q_OBJECT
41
42public:
43
47 YQPartitionSplitter( YWidget * parent,
48 int usedSize,
49 int freeSize,
50 int newPartSize,
51 int minNewPartSize,
52 int minFreeSize,
53 const std::string & usedLabel,
54 const std::string & freeLabel,
55 const std::string & newPartLabel,
56 const std::string & freeFieldLabel,
57 const std::string & newPartFieldLabel );
58
63
69 virtual int value();
70
76 virtual void setValue( int newValue );
77
83 virtual void setEnabled( bool enabled );
84
90 virtual int preferredWidth();
91
97 virtual int preferredHeight();
98
104 virtual void setSize( int newWidth, int newHeight );
105
109 virtual bool setKeyboardFocus();
110
111
112public slots:
116 void setFreeSizeSlot( int newFreeSize );
117
121 void setNewPartSizeSlot( int newNewSize );
122
123
124protected:
125
126 enum
127 {
128 usedSegment = 0,
129 freeSegment = 1,
130 newPartSegment = 2
131 };
132
133
134 //
135 // Widgets
136 //
137
138 YLayoutBox * _vbox;
139 YQBarGraph * _barGraph;
140 YLayoutBox * _hbox;
141 YQSlider * _freeSizeSlider;
142 YQIntField * _newPartField;
143
144};
145
146
147#endif // YQPartitionSplitter_h
Definition YQBarGraph.h:38
Definition YQIntField.h:40
virtual bool setKeyboardFocus()
Definition YQPartitionSplitter.cc:205
virtual void setEnabled(bool enabled)
Definition YQPartitionSplitter.cc:126
virtual void setSize(int newWidth, int newHeight)
Definition YQPartitionSplitter.cc:147
void setFreeSizeSlot(int newFreeSize)
Definition YQPartitionSplitter.cc:185
YQPartitionSplitter(YWidget *parent, int usedSize, int freeSize, int newPartSize, int minNewPartSize, int minFreeSize, const std::string &usedLabel, const std::string &freeLabel, const std::string &newPartLabel, const std::string &freeFieldLabel, const std::string &newPartFieldLabel)
Definition YQPartitionSplitter.cc:44
virtual int value()
Definition YQPartitionSplitter.cc:154
void setNewPartSizeSlot(int newNewSize)
Definition YQPartitionSplitter.cc:196
~YQPartitionSplitter()
Definition YQPartitionSplitter.cc:120
virtual void setValue(int newValue)
Definition YQPartitionSplitter.cc:162
virtual int preferredHeight()
Definition YQPartitionSplitter.cc:141
virtual int preferredWidth()
Definition YQPartitionSplitter.cc:135
Definition YQSlider.h:37