Using qgis 2.18.x you can set al layer as 'read only'.

Go to project > project properties (or Ctrl+Shift+P).  In the tab 'identify layers' you can check 'read only'.  

Then the pencil (toggle editing) will be greyd out.