#include "Panel_about.h"

#include "Main_window.h"
#include "Path.h"
#include "Program_title.h"
#include "Program_version.h"
#include "Program_copyright.h"

//#include "Path.h"

namespace MM
{

Panel_about::
Panel_about ()
:
    QDialog (Main_window::singleton())
{
    setupUi (this);

#ifdef ASCALAPH
    label_Left->setPixmap (QPixmap (Path::images() + "About_Asc.png"));
#else
    label_Left->setPixmap (QPixmap (Path::images() + "About.png"));
#endif

    Text title      = program_title ();
    Text subtitle   = program_subtitle ();
    Text version    = program_version ();
    Text copyright  = program_copyright ();

    Text text;
    text +=
        "<table border=\"0\" style=\"border: 3px; border-style: double; "
        "border-color: #f4f5ef;\" align=\"center\" "
        "cellpadding=\"6\">\n"
          "<tbody>\n"
            "<tr>\n"
              //"<td><img style=\"width: 264px; height: 451px;\" "
              //"src=\"images/Picture.png\"></td>\n"

              "<td width=\"100%\" height=\"100%\">\n"
	  	        "<table style=\"border: 3px; border-style: double; "
                "border-color: #dddddd; background-color: #ffffff;\" "
                "align=\"center\" width=\"100%\" height=\"100%\">\n"
			        "<tr height=\"90%\">\n"
				        "<td align=\"center\" valign=\"middle\">\n"

                        "<br>\n"
				        "<h1><font color=\"#d79b3d\" style=\"font-family: Helvetica;\">\n"

                        "<b><u>"
                        + title + 
                        "</u></b></font></h1>\n"
        		
				        "<h3><font color=\"#ac7620\" face=\"Verdana\">\n"
				        + subtitle +
				        "</font></h3>\n"
        		        
				        "<h4><font color=\"#3a7874\" face=\"Verdana\">\n"
				        + version +
				        "</font></h4>\n"
        		
                        "<p align=\"center\"><font color=\"#316663\">\n"
                        "<br>\n"

                        "<br>\n"
                        + copyright +
                        "</font></p>\n"
        				
				        "</td>\n"

				        "<td>&nbsp;</td>\n"
			        "</tr>\n"
			        //"<tr height=\"10%\">\n"
				       // "<td COLSPAN=2 align=\"right\"><img style=\"margin: 20px 20px;\" "
           //             "src=\""
           //             
           //             + Path::images() + "Oxadiazole-light.png\"" +  
           //             
           //             "></td>\n"
			        //"</tr>\n"
		        "</table>\n"
	          "</td>\n"
            "</tr>\n"

          "</tbody>\n"
        "</table>\n"
        ;


    textBrowser->insertHtml (text);
}

}//MM
