@@ -99,58 +99,51 @@ namespace hal
99
99
GateLibraryTabGeneral::GateLibraryTabGeneral (QWidget* parent) : GateLibraryTabInterface(parent)
100
100
{
101
101
QVBoxLayout* topLayout = new QVBoxLayout (this );
102
+ QScrollArea* scroll = new QScrollArea (this ); // add scrollbar if needed
102
103
103
- // QScrollArea* scroll = new QScrollArea(this); // add scrollbar if needed
104
- // QVBoxLayout* layout = new QVBoxLayout(scroll );
104
+ QFrame* content = new QFrame (scroll);
105
+ QVBoxLayout* layout = new QVBoxLayout (content );
105
106
106
- QScrollArea* scroll = new QScrollArea ();
107
- QVBoxLayout* layout = new QVBoxLayout ();
108
- QFrame* content = new QFrame ();
109
-
110
-
111
- mGeneralFrame = new GatelibraryFrameGeneral (this );
107
+ mGeneralFrame = new GatelibraryFrameGeneral (content);
112
108
layout->addWidget (mGeneralFrame );
113
109
114
- mFlipflopFrame = new GatelibraryFrameFF (this );
110
+ mFlipflopFrame = new GatelibraryFrameFF (content );
115
111
layout->addWidget (mFlipflopFrame );
116
112
mFlipflopFrame ->hide ();
117
113
118
- mStateFrame = new GatelibraryFrameState (this );
114
+ mStateFrame = new GatelibraryFrameState (content );
119
115
layout->addWidget (mStateFrame );
120
116
mStateFrame ->hide ();
121
117
122
- mLutFrame = new GatelibraryFrameLut (this );
118
+ mLutFrame = new GatelibraryFrameLut (content );
123
119
layout->addWidget (mLutFrame );
124
120
mLutFrame ->hide ();
125
121
126
- mInitFrame = new GatelibraryFrameInit (this );
122
+ mInitFrame = new GatelibraryFrameInit (content );
127
123
layout->addWidget (mInitFrame );
128
124
mInitFrame ->hide ();
129
125
130
- mBooleanFrame = new GatelibraryFrameBoolean (this );
126
+ mBooleanFrame = new GatelibraryFrameBoolean (content );
131
127
layout->addWidget (mBooleanFrame );
132
128
mBooleanFrame ->hide ();
133
129
134
- mLatchFrame = new GateLibraryFrameLatch (this );
130
+ mLatchFrame = new GateLibraryFrameLatch (content );
135
131
layout->addWidget (mLatchFrame );
136
132
mLatchFrame ->hide ();
137
133
138
- mRAMFrame = new GateLibraryFrameRAM (this );
134
+ mRAMFrame = new GateLibraryFrameRAM (content );
139
135
layout->addWidget (mRAMFrame );
140
136
mRAMFrame ->hide ();
141
137
142
- mRAMPortFrame = new GateLibraryFrameRAMPort (this );
138
+ mRAMPortFrame = new GateLibraryFrameRAMPort (content );
143
139
layout->addWidget (mRAMPortFrame );
144
140
mRAMPortFrame ->hide ();
145
141
142
+ scroll->setWidget (content);
146
143
scroll->setWidgetResizable (true );
147
144
148
145
content->setLayout (layout);
149
146
topLayout->addWidget (scroll);
150
- scroll->setWidget (content);
151
-
152
-
153
- // topLayout->addWidget(scroll);
154
147
}
155
148
156
149
void GateLibraryTabGeneral::update (GateType* gt)
0 commit comments