~ubuntu-branches/ubuntu/quantal/muse/quantal

« back to all changes in this revision

Viewing changes to muse/arranger/alayout.cpp

  • Committer: Package Import Robot
  • Author(s): Alessio Treglia
  • Date: 2012-07-18 16:07:06 UTC
  • mfrom: (1.1.12) (10.1.11 sid)
  • Revision ID: package-import@ubuntu.com-20120718160706-qy1lydijykeiqqmg
Tags: 2.0-1
* New stable release.
* debian/rules: Exclude muse/widgets/arrangercolumns.{cpp,h}~ from being
  deleted by dh_clean.
* Drop 0002-gcc_hardening.patch, applied upstream.
* Drop 0003-ftbfs_gcc47.patch, applied upstream.
* Refresh 1001-buildsystem.patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
      addItem(li[idx]);
42
42
      }
43
43
 
44
 
#if 0
 
44
#if 0 // DELETETHIS 36
45
45
//---------------------------------------------------------
46
46
//   TLLayoutIterator
47
47
//---------------------------------------------------------
48
48
 
49
 
class TLLayoutIterator // : public QGLayoutIterator ddskrjo
 
49
class TLLayoutIterator
50
50
      {
51
51
      int idx;
52
52
      QList<QLayoutItem*> list;
64
64
 
65
65
QLayoutIterator TLLayout::iterator()
66
66
      {
67
 
      return QLayoutIterator(0); //new TLLayoutIterator(&ilist)); ddskrjo
 
67
      return QLayoutIterator(0);
68
68
      }
69
69
 
70
70
void TLLayout::addItem(QLayoutItem *item)
99
99
 
100
100
void TLLayout::setGeometry(const QRect &rect)
101
101
      {
102
 
      //if(_inSetGeometry)  // p4.0.11 Tim
103
 
      //  return;
104
 
      //_inSetGeometry = true;
105
 
      
106
102
      int w = rect.width();
107
103
      int h = rect.height();
108
104
 
117
113
 
118
114
      QSize s1 = li[1]->sizeHint();
119
115
      QSize s2 = li[2]->sizeHint();
120
 
      //QSize s3 = li[3]->sizeHint();
 
116
      //QSize s3 = li[3]->sizeHint(); DELETETHIS huh?
121
117
      QSize s4 = li[4]->sizeHint();
122
118
      QSize s5 = li[5]->sizeHint();
123
119
 
136
132
      int range = s0.height() - y2;
137
133
      if (range < 0)
138
134
            range = 0;
139
 
      // Note this appears to cause a single recursive call to this function - jumps to beginning,
140
 
      //  because now the scroll bar wants to be put in the layout.
141
 
      // Moved below.   p4.0.44      
142
 
      ///sb->setVisible(range != 0);
 
135
 
143
136
      if (range)
144
137
            sb->setMaximum(range);
145
138
 
146
139
      if (widget) {
147
 
            //QSize r(s0.width(), y2);
148
140
            QSize r(s0.width(), y2 < s0.height() ? s0.height() : y2);   // p4.0.11 Tim
149
141
            widget->setGeometry(0, 0, r.width(), r.height()); 
150
142
            }
155
147
      li[4]->setGeometry(QRect(0,  y2,  w,        s4.height()));
156
148
      li[5]->setGeometry(QRect(3,  y3,  s5.width(), s5.height()));
157
149
      
158
 
      /// Fix for non-appearing scrollbar. Yes, we must allow the recursive call, but try it here, not above.    p4.0.44 Tim
 
150
      // Fix for non-appearing scrollbar. Yes, we must allow the recursive call, but try it here, not above.    p4.0.44 Tim
159
151
      sb->setVisible(range != 0);
160
 
      
161
 
      //_inSetGeometry = false;
162
152
      }
163
153
 
164
154
//---------------------------------------------------------
168
158
QSize TLLayout::sizeHint() const
169
159
      {
170
160
      return QSize(150, 100);
171
 
      // p4.0.11 Tim. 100 was allowing vertically shrunk trackinfo widgets. Nope, no help.
172
 
      //return minimumSize();
173
161
      }
174
162
 
175
163
//---------------------------------------------------------
182
170
      w += li[1]->sizeHint().width();
183
171
      
184
172
      return QSize(w, 50);
185
 
      // p4.0.11 Tim. 50 was allowing vertically shrunk trackinfo widgets. Nope, no help.
186
 
      //return QSize(w, stack->minimumSizeHint().height());  
187
173
      }
188
174
 
189
175
//---------------------------------------------------------