You can use PyQGIS code (I know that you use Ubuntu) at the Python Console of QGIS. To test my sugestion, I used the next code where a QgsExpression object has your class 1 values:
layer = iface.activeLayer()
expression = QgsExpression( u'"values" >= 30 AND "values" <= 50' )
idx = [ feat.attributes()[0] for feat in layer.getFeatures()
if expression.evaluate( feat ) ]
feats = [ feat for feat in layer.getFeatures()
if expression.evaluate( feat )]
for feat in feats:
area = feat.geometry().area()
print u"area{:.0f} = {:.2f}".format(idx[feats.index(feat)], area)
crs = layer.crs()
epsg = crs.postgisSrid()
uri = "Polygon?crs=epsg:" + str(epsg) + "&field=id:integer""&field=area&index=yes"
new_layer = QgsVectorLayer(uri,
'class1',
'memory')
QgsMapLayerRegistry.instance().addMapLayer(new_layer)
prov = new_layer.dataProvider()
n = len(feats)
for i in range(n):
feats[i].setAttributes([i, feats[i].geometry().area()])
prov.addFeatures(feats)
I ran this code with the polygon vector layer of next image; where you can observe a 'values' field at the attributes table.
Result was a new memory layer (blue color) with the features that match the query for your class.
Areas were calculated for two different methods for corroborating this approach (features were selected as I expected).