Add support for strikeout/strikethrough/linethrough text
Merge pull request #223 from Zahatric/CodeCleanup

Add support for strikeout/strikethrough/linethrough text
Fix: Revise HTML producing code to produce VALID html

HTLM Issues addressed:
* a stray, unopened </span> was being placed at start of body of HTML.
* use of XHTML <br /> instead of correct HTML <br> to force new lines
  in produced HTML text.
* empty lines were not being reproduced when copying from clipboard to
  HTML.
* previously produced HTML was being place all on one line, no line-feeds
  in HTML source - by changing the CSS "white-space" arguments they are now
  put into the produced HTML making it possible to edit it in a normal text
  editor but it should still render correctly.
* the data "type='text/css'" was missing from HTML <style> tags - this is a
  mandatory attribute for that type of tag under HTML 4.01 strict (although
  not for later HTML 5).
* the <title></title> tag-pair was missing from the <head> part of HTML
  documents produced - The <title> element is mandatory for HTML 4.01
  strict.  It is now created with data about the source of the HTML.
* the charset <meta> information was not as far as possible towards the
  start of the HTML <head> as it could have been - it is best practice to
  do this as a parser must restart parsing a document when it encounters
  this type of information that changes the encoding away from the default
  ISO-8859 form.
* the list of mono-spaced fonts in the header CSS data did not include, as
  the first entry, the font that was actually used for the source of the
  HTML data.
* no default font size or line spacing was set which makes different
  browsers behave differently, especially if zooming is used, the
  parameters used now should produce HTML that is as similar as possible
  when showing the same output on most modern GUI-type browsers.
* there was no indication as to Mudlet, being the source of the HTML, as
  the generator of the HTML - this now happens and includes the application
  version data.
* the "copy To HTML on the clipboard" code ( in
  TTextEdit::copySelectionToClipboardHTML() ) did not append the </body> &
  </html> tags to close the end of the document produced.
* the selection of only part of the first line of text onto the clip-board
  did not previously take account of the offset necessary for that line
  to line up with the following lines.
* the use of <span></span> tags requires them to be used inside another
  block element inside the <body></body> part of the HTML document but
  this was not being done. A <div></div> pair now meets that requirement.

Also:

When logging console output to a file the filename was being saved in a
local variable in TConsole::slot_toggleLogging() and not the class member
with the SAME name "mLogFileName" that was defined for the purpose.

The date-time format used for log file names has been changed
from: dd-MM-yyyy#hh-mm-ss
  to: yyyy-MM-dd#hh-mm-ss
so that an alphabetic sort of file-names will agree with a sort on the
file creation/last modified metadata.  This should make it easier to pick
out a wanted log file from a directory listing.

The tool-tip for the "record to log file" TConsole control button is now
synamically modified to reflect the current recording/not recording state.

With these changes the HTML that is produced should pass validation by
the W3C on-line or other HTML validators.

Note: to concatenate multiple log files they may be joined by cutting and
pasting at the <div> and </div> boundaries - possibly with an <hr> to
delimit the join so that they are arranged:
<!doc..><html(1)><head(1)></head(1)><body(1)>
           <div(1)>...</div(1)><hr>
           <div(2)>...</div(2)><hr>
                   ...         <hr>
           <div(n)>...</div(n)></body(n)></html(n)>

BUGFIX: A prior commit used the ANSI Escape sequence "CSI 28 m" to turn off
the recently introduced support for "strike-out" whereas it should have
been "CSI 29 m" - this commit fixes that and corrects a couple of embedded
documentation comments about ANSI Escape codes.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Update: format of modded code & +ed commentted support new text format opts

Adjust code layout for agreed formatting styles (mainly trail opening '{'
on same line as text for conditional code and enforce '{''}' use on single
code line blocks).

Another Pull-Request added one more additional text formatting option to
console text and this commit adds support for it (strikeout) and a couple
of others (overline & inverse) in commented out additional code.

Revised tool-tip message for profile preference "log in HTML" option, the
text was out of date as it referred to using the raw (non-HTML) log as
input to test the user's triggers - this functionality is now the separate
"Recording" function.  The tool-tip was not in the HTML form that auto-wrap
the text when displayed, instead it was a single unwrapped line across the
screen.  Add same HTML wrapper to logButton tooltips,

Removed TConsole::mLastBufferLogLine as it was only used by old commented
out logging code (also removed here) probably a remnant of what the
previous paragraph's old tool-tip referred to.

*** THE CODE PRESENT IN THIS BRANCH OF MY PUBLIC REPOSITORY HAS BEEN
RE-BASED TO FOLLOW CHANGES IN THE MAIN CENTRAL REPOSITORY "development"
BRANCH AFTER THE PREVIOUS COMMITS WERE PUBLISHED - THIS MIGHT MESS THINGS
UP - BUT I HOPE NOT! 8-(  ***

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
BugFix: Fix logging of long user input and other lines that get wrapped

Fixes the loss from log files of all but the last line of long lines of
user input and other text that gets automatically wrapped to fit on the
console display.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Enhance: more information available from TLuaInterpreter::startLogging()

Reformat error message to current proposed "standard" and make it capable
of being internationalised.

Now returns: a Boolean on success or failure to start or stop logging; an
(internationaliseable) message indicating what happened, if anything and
including the log file-name if applicable; the log file-name on its own
and finally a numeric code indicating the result (for script writers
working for an international audience once Mudlet goes multi-lingual!)

In light of the messages now available to the lua command the code has been
revised so it will no longer cause a logging starting/stopping system
message to appear on the main console - though using the button on the main
console will continue to do so.)

The existing log-to-file button used an icon that appears to have been an
old Oxygen "folder-downloads.png" icon image and the only way to tell if it
was active was a system dependent colouration that "on" widgets adopt.  I
have taken that icon and placed a red cross over it to indicate the state
of logging being active and that pressing the button will stop logging.
This "folder-downloads-red-cross.png", like any other icons I have produced
from the Oxygen icon set or otherwise, it is released under a GPLv2+
licence for use in Mudlet and anywhere else permitted.

Also added my details to copyrights of touched files from this and a
previous Pull-Req.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
BugFix: Add missing setIconSize to bottom-right console QToolButtons

The absence of these caused the default size to be used which is smaller
than the maximum in some cases on some platforms, with the result that the
icons were being automagically scaled down to a smaller size with loss of
detail in those cases.

*** THE CODE IN MY PUBLIC REPOSITORY FOR THIS BRANCH HAS BEEN RE-BASED
THIS MAY CONFUSE THINGS 8-/ ***

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Misc: Revert last commit, remove dup. lines, update tooltips

Have determined that the tool-bar buttons assume an icon size of 24x24 by
default (so that forcing them to 30x30 leaves too little space around the
graphics used), revert the previous commit to leave the size not explicitly
set.

Remove a pair of duplicated setFocusPolicy() calls on the
TConsole::mpBufferSearchUp & Down members, and a
TConsole::setAttribute( Qt::WA_OpaquePaintEvent ) call.

Corrected the tool-tips for the search up and down buttons - both had
"next result".  Also included "<html><head/><body><p>" and
"</p></body></html>" wrappers around all the tool tips because this causes
them to be wrapped to fit the display in an optimum manner.  Also pass them
through a call to tr() so they can be marked for translation.  I WOULD
URGE OTHER CODERS TO ENSURE THAT TOOL-TIPS IN AREAS THEY WORK ON - BOTH
IN .CPP CODE AND IN .UI FORMS - ARE REVISED TO USE THIS FORMAT.

*** THE CODE PRESENT IN THIS BRANCH OF MY PUBLIC REPOSITORY HAS BEEN
RE-BASED TO FOLLOW CHANGES IN THE MAIN CENTRAL REPOSITORY "development"
BRANCH AFTER THE PREVIOUS COMMITS WERE PUBLISHED - THIS MIGHT MESS THINGS
UP - BUT I HOPE NOT! 8-(  ***

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>