[qet] qet/qet: [4798] Minor: RichTextEditor : add action to Create superscript or subscript

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 4798
Author:   scorpio810
Date:     2016-12-04 04:50:12 +0100 (Sun, 04 Dec 2016)
Log Message:
-----------
Minor: RichTextEditor : add action to Create superscript or subscript
text or numbers

Modified Paths:
--------------
    trunk/qelectrotech.qrc
    trunk/sources/qeticons.cpp
    trunk/sources/qeticons.h
    trunk/sources/richtext/richtexteditor.cpp

Added Paths:
-----------
    trunk/ico/22x22/format-text-subscript.svg.png
    trunk/ico/22x22/format-text-superscript.svg.png

Added: trunk/ico/22x22/format-text-subscript.svg.png
===================================================================
(Binary files differ)

Index: trunk/ico/22x22/format-text-subscript.svg.png
===================================================================
--- trunk/ico/22x22/format-text-subscript.svg.png	2016-12-03 15:49:02 UTC (rev 4797)
+++ trunk/ico/22x22/format-text-subscript.svg.png	2016-12-04 03:50:12 UTC (rev 4798)

Property changes on: trunk/ico/22x22/format-text-subscript.svg.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/ico/22x22/format-text-superscript.svg.png
===================================================================
(Binary files differ)

Index: trunk/ico/22x22/format-text-superscript.svg.png
===================================================================
--- trunk/ico/22x22/format-text-superscript.svg.png	2016-12-03 15:49:02 UTC (rev 4797)
+++ trunk/ico/22x22/format-text-superscript.svg.png	2016-12-04 03:50:12 UTC (rev 4798)

Property changes on: trunk/ico/22x22/format-text-superscript.svg.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: trunk/qelectrotech.qrc
===================================================================
--- trunk/qelectrotech.qrc	2016-12-03 15:49:02 UTC (rev 4797)
+++ trunk/qelectrotech.qrc	2016-12-04 03:50:12 UTC (rev 4798)
@@ -253,5 +253,7 @@
         <file>ico/16x16/help-donate.svg</file>
         <file>ico/16x16/edit-download.svg</file>
         <file>ico/16x16/kdenlive-show-video.svg</file>
+        <file>ico/22x22/format-text-subscript.svg.png</file>
+        <file>ico/22x22/format-text-superscript.svg.png</file>
     </qresource>
 </RCC>

Modified: trunk/sources/qeticons.cpp
===================================================================
--- trunk/sources/qeticons.cpp	2016-12-03 15:49:02 UTC (rev 4797)
+++ trunk/sources/qeticons.cpp	2016-12-04 03:50:12 UTC (rev 4798)
@@ -190,6 +190,8 @@
 		QIcon QETDonate;
 		QIcon QETDownload;
 		QIcon QETVideo;
+		QIcon super;
+		QIcon sub;
 	}
 }
 
@@ -462,4 +464,6 @@
 	listDrawings        .addFile(":/ico/48x48/view-pim-journal.png");
 	AutoNum             .addFile(":/ico/128x128/plasmagik.png");
 	TerminalStrip       .addFile(":/ico/22x22/terminalstrip.png");
+	sub                 .addFile(":/ico/22x22/format-text-subscript.svg.png");
+	super               .addFile(":/ico/22x22/format-text-superscript.svg.png");
 }

Modified: trunk/sources/qeticons.h
===================================================================
--- trunk/sources/qeticons.h	2016-12-03 15:49:02 UTC (rev 4797)
+++ trunk/sources/qeticons.h	2016-12-04 03:50:12 UTC (rev 4798)
@@ -199,6 +199,8 @@
 		extern QIcon QETDonate;
 		extern QIcon QETDownload;
 		extern QIcon QETVideo;
+		extern QIcon super;
+		extern QIcon sub;
 	}
 }
 #endif

Modified: trunk/sources/richtext/richtexteditor.cpp
===================================================================
--- trunk/sources/richtext/richtexteditor.cpp	2016-12-03 15:49:02 UTC (rev 4797)
+++ trunk/sources/richtext/richtexteditor.cpp	2016-12-04 03:50:12 UTC (rev 4798)
@@ -503,19 +503,19 @@
     // Superscript and subscript buttons
 
     m_valign_sup_action = createCheckableAction(
-            QIcon(),
+            QIcon(":/ico/22x22/format-text-superscript.svg.png"),
             tr("Superscript"),
             this, SLOT(setVAlignSuper(bool)), this);
     addAction(m_valign_sup_action);
 
     m_valign_sub_action = createCheckableAction(
-            QIcon(),
+            QIcon(":/ico/22x22/format-text-subscript.svg.png"),
             tr("Subscript"),
             this, SLOT(setVAlignSub(bool)), this);
     addAction(m_valign_sub_action);
 	
-	m_valign_sup_action -> setVisible( false );
-	m_valign_sub_action -> setVisible( false );
+	m_valign_sup_action -> setVisible( true );
+	m_valign_sub_action -> setVisible( true );
 
     // Insert hyperlink and image buttons
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/