@@ -63,7 +63,8 @@ void QgsAppScreenShots::saveScreenshot( const QString &name, QWidget *widget, Gr
63
63
}
64
64
if ( !widget || mode != GrabWidget )
65
65
{
66
- pix = scr->grabWindow ( 0 , x, y, w, h );
66
+ WId wid = widget ? widget->winId () : 0 ;
67
+ pix = scr->grabWindow ( wid, x, y, w, h );
67
68
}
68
69
69
70
const QString &fileName = mSaveDirectory + " /" + name + " .png" ;
@@ -94,6 +95,7 @@ void QgsAppScreenShots::moveWidgetTo( QWidget *widget, Qt::Corner corner, Refere
94
95
case Qt::BottomRightCorner:
95
96
case Qt::TopRightCorner:
96
97
case Qt::TopLeftCorner:
98
+ // TODO
97
99
return ;
98
100
}
99
101
}
@@ -118,10 +120,13 @@ void QgsAppScreenShots::takeScreenshots( Categories categories )
118
120
takeVectorLayerProperties ();
119
121
}
120
122
123
+
124
+ // ----------------------
121
125
// !!!!! SCREENSHOTS !!!!
122
126
123
127
void QgsAppScreenShots::takeVectorLayerProperties ()
124
128
{
129
+ QString rootName = QLatin1String ( " vectorlayerproperties_" );
125
130
QgsVectorLayerProperties *dlg = new QgsVectorLayerProperties ( mVectorLayer , QgisApp::instance () );
126
131
dlg->show ();
127
132
// ----------------
@@ -133,7 +138,7 @@ void QgsAppScreenShots::takeVectorLayerProperties()
133
138
QCoreApplication::processEvents ();
134
139
QString name = dlg->mOptionsListWidget ->item ( row )[0 ].text ().toLower ();
135
140
name.replace ( " " , " _" );
136
- // saveScreenshot( name, dlg );
141
+ saveScreenshot ( rootName + name, dlg );
137
142
}
138
143
// ------------------
139
144
// style menu clicked
@@ -143,7 +148,7 @@ void QgsAppScreenShots::takeVectorLayerProperties()
143
148
QCoreApplication::processEvents ();
144
149
dlg->mBtnStyle ->click ();
145
150
QCoreApplication::processEvents ();
146
- saveScreenshot ( " style " , dlg );
151
+ saveScreenshot ( rootName + " style_menu " , dlg );
147
152
QCoreApplication::processEvents ();
148
153
dlg->mBtnStyle ->menu ()->hide ();
149
154
QCoreApplication::processEvents ();
0 commit comments