LCOV - code coverage report
Current view: top level - gui/source - utilities.cpp (source / functions) Hit Total Coverage
Test: mcrl2_coverage.info.cleaned Lines: 0 5 0.0 %
Date: 2020-09-16 00:45:56 Functions: 0 2 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : // Author(s): Olav Bunte
       2             : // Copyright: see the accompanying file COPYING or copy at
       3             : // https://github.com/mCRL2org/mCRL2/blob/master/COPYING
       4             : //
       5             : // Distributed under the Boost Software License, Version 1.0.
       6             : // (See accompanying file LICENSE_1_0.txt or copy at
       7             : // http://www.boost.org/LICENSE_1_0.txt)
       8             : //
       9             : 
      10             : #include "mcrl2/gui/utilities.h"
      11             : 
      12           0 : bool mcrl2::gui::qt::hasLightBackground(QWidget* widget)
      13             : {
      14           0 :   return widget->palette().window().color().lightness() >= 128;
      15             : }
      16             : 
      17           0 : void mcrl2::gui::qt::setTextEditTextColor(QTextEdit* textEdit, QColor light,
      18             :                                           QColor dark)
      19             : {
      20           0 :   textEdit->setTextColor(mcrl2::gui::qt::hasLightBackground(textEdit) ? light
      21             :                                                                       : dark);
      22           0 : }

Generated by: LCOV version 1.13