title: how to find out if running from terminal or GUI
body: <p>I am trying to build a class that would behave is a different way if run using a shell or from a GUI.</p>
  
  <p>It could be included in both forms using #include "myclass.h"...</p>
  
  <p>However, in the constructor I would like to differentiate between Shell runs and GUI runs.</p>
  
  <p>I can easily achieve it using a parameter that would be passed to the constructor when declaring it but I want to explore my options.</p>
  
  <p>I am using C++ on ubuntu and my GUI is using Qt.</p>