17
17
// #include <QStylePainter>
18
18
19
19
GroupBox::GroupBox ( QWidget *parent )
20
- : QGroupBox( parent ), m_collapsed( false )
20
+ : QGroupBox( parent ), m_collapsed( false )
21
21
{
22
- connect ( this , SIGNAL ( toggled ( bool ) ), this , SLOT ( setToggled ( bool ) ) );
22
+ connect ( this , SIGNAL ( toggled ( bool ) ), this , SLOT ( setToggled ( bool ) ) );
23
23
// setToggled( isChecked() );
24
24
}
25
25
26
26
GroupBox::GroupBox ( const QString &title, QWidget *parent )
27
- : QGroupBox(title, parent ), m_collapsed( false )
27
+ : QGroupBox( title, parent ), m_collapsed( false )
28
28
{}
29
29
30
30
bool GroupBox::isCollapsed () { return m_collapsed; }
31
31
32
32
// void GroupBox::mousePressEvent( QMouseEvent *e )
33
33
// {
34
34
// QgsDebugMsg("press event");
35
- // if( e->button() == Qt::LeftButton )
36
- // {
35
+ // if( e->button() == Qt::LeftButton )
36
+ // {
37
37
// QgsDebugMsg("left but");
38
- // QStyleOptionGroupBox option;
39
- // initStyleOption( &option );
40
- // QRect buttonArea( 0, 0, 16, 16 );
41
- // buttonArea.moveTopRight( option.rect.adjusted( 0, 0, -10, 0
38
+ // QStyleOptionGroupBox option;
39
+ // initStyleOption( &option );
40
+ // QRect buttonArea( 0, 0, 16, 16 );
41
+ // buttonArea.moveTopRight( option.rect.adjusted( 0, 0, -10, 0
42
42
// ).topRight() );
43
- // if( buttonArea.contains( e->pos() ) )
44
- // {
45
- // clickPos = e->pos();
46
- // return;
47
- // }
48
- // }
49
- // QGroupBox::mousePressEvent( e );
43
+ // if( buttonArea.contains( e->pos() ) )
44
+ // {
45
+ // clickPos = e->pos();
46
+ // return;
47
+ // }
48
+ // }
49
+ // QGroupBox::mousePressEvent( e );
50
50
// }
51
51
52
52
// void GroupBox::mouseReleaseEvent( QMouseEvent *e )
53
53
// {
54
54
// QgsDebugMsg("release");
55
- // if( e->button() == Qt::LeftButton && clickPos == e->pos() )
56
- // setCollapse( !isCollapsed() );
55
+ // if( e->button() == Qt::LeftButton && clickPos == e->pos() )
56
+ // setCollapse( !isCollapsed() );
57
57
// }
58
58
59
59
// void GroupBox::paintEvent( QPaintEvent * )
60
60
// {
61
61
// QgsDebugMsg("paint event");
62
62
63
63
// QStylePainter paint( this );
64
- // QStyleOptionGroupBox option;
65
- // initStyleOption( &option );
66
- // paint.drawComplexControl( QStyle::CC_GroupBox, option );
67
- // paint.drawItemPixmap(
68
- // option.rect.adjusted( 0, 0, -10, 0 ),
69
- // Qt::AlignTop | Qt::AlignRight,
70
- // QPixmap( m_collapsed ?
71
- // ":/images/images/navigate_down2_16x16.png" :
72
- // ":/images/images/navigate_up2_16x16.png" ) );
64
+ // QStyleOptionGroupBox option;
65
+ // initStyleOption( &option );
66
+ // paint.drawComplexControl( QStyle::CC_GroupBox, option );
67
+ // paint.drawItemPixmap(
68
+ // option.rect.adjusted( 0, 0, -10, 0 ),
69
+ // Qt::AlignTop | Qt::AlignRight,
70
+ // QPixmap( m_collapsed ?
71
+ // ":/images/images/navigate_down2_16x16.png" :
72
+ // ":/images/images/navigate_up2_16x16.png" ) );
73
73
// }
74
74
75
75
void GroupBox::showEvent ( QShowEvent * event )
@@ -86,13 +86,13 @@ void GroupBox::setCollapsed( bool collapse )
86
86
return ;
87
87
// QgsDebugMsg(QString("%1 setcollapse %2").arg(objectName()).arg(collapse));
88
88
89
- // minimize layout margins, restore later
89
+ // minimize layout margins, restore later
90
90
if ( collapse )
91
91
{
92
92
if ( layout () )
93
- {
93
+ {
94
94
margins = layout ()->contentsMargins ();
95
- layout ()->setContentsMargins (1 , 1 , 1 , 1 );
95
+ layout ()->setContentsMargins ( 1 , 1 , 1 , 1 );
96
96
}
97
97
}
98
98
else
@@ -103,9 +103,9 @@ void GroupBox::setCollapsed( bool collapse )
103
103
}
104
104
}
105
105
m_collapsed = collapse;
106
- foreach ( QWidget *widget, findChildren<QWidget*>() )
106
+ foreach ( QWidget *widget, findChildren<QWidget*>() )
107
107
widget->setHidden ( collapse );
108
-
108
+
109
109
if ( m_collapsed )
110
110
emit collapsed ( this );
111
111
else
@@ -193,7 +193,7 @@ QgsRasterLayerSaveAsDialog::QgsRasterLayerSaveAsDialog( QgsRasterLayer* rasterLa
193
193
194
194
// this should scroll down to make widget visible, but it's not happening
195
195
// (at least part of it is visible)...
196
- connect ( mCreateOptionsGroupBox , SIGNAL ( expanded ( QWidget* ) ),
196
+ connect ( mCreateOptionsGroupBox , SIGNAL ( expanded ( QWidget* ) ),
197
197
this , SLOT ( groupBoxExpanded ( QWidget* ) ) );
198
198
199
199
}
@@ -690,6 +690,8 @@ void QgsRasterLayerSaveAsDialog::addNoDataRow( double min, double max )
690
690
691
691
void QgsRasterLayerSaveAsDialog::noDataCellTextEdited ( const QString & text )
692
692
{
693
+ Q_UNUSED ( text );
694
+
693
695
QLineEdit *lineEdit = dynamic_cast <QLineEdit *>( sender () );
694
696
if ( !lineEdit ) return ;
695
697
int row = -1 ;
0 commit comments