[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdeedu/keduca/keduca
From:       Javier Campos <javi () asyris ! org>
Date:       2003-04-30 17:35:41
[Download RAW message or body]

CVS commit by campos: 

Initial information when loads document


  M +55 -3     keducaview.cpp   1.18
  M +2 -0      keducaview.h   1.10


--- kdeedu/keduca/keduca/keducaview.cpp  #1.17:1.18
@@ -50,4 +50,5 @@ KEducaView::~KEducaView()
 void KEducaView::init()
 {
+    QString infoStart = "";
     QVBoxLayout *vbox = new QVBoxLayout( this );
     vbox->setSpacing( 6 );
@@ -61,7 +62,9 @@ void KEducaView::init()
     _buttonGroup->setRadioButtonExclusive( TRUE );
     _vbox2->addWidget( _split );
+    _questionText->hide();
+    _split->hide();
 
     _viewResults = new QTextView(this);
-    _viewResults->hide();
+//    _viewResults->hide();
     vbox->addWidget( _viewResults );
 
@@ -82,4 +85,48 @@ void KEducaView::init()
     connect( _buttonNext, SIGNAL( clicked() ), SLOT( slotButtonNext() ) );
     vbox->addWidget( _buttonNext );
+
+    if( !_keducaFile->getHeader("startupinfo").isEmpty() )
+      {
+        infoStart += "<FONT COLOR=#333366><B>"
+              + i18n("Additional Information")
+              + "</B></FONT><HR>"
+              + _keducaFile->getHeader("startupinfo")
+              + "<P>";
+      }
+
+    infoStart += "<FONT COLOR=#333366><B>"
+              + i18n("Document Information")
+              + "</B></FONT><HR>"
+
+              + "<TABLE WIDTH=100% BORDER=0>"
+
+              + "<TR><TD ALIGN=RIGHT>"
+              + i18n("Title") + " : "
+              + "</TD><TD><B>"
+              + _keducaFile->getHeader("title")
+              + "</B></TD></TR>"
+
+              + "<TR><TD ALIGN=RIGHT>"
+              + i18n("Category") + " : "
+              + "</TD><TD>"
+              + _keducaFile->getHeader("category")
+              + "</TD></TR>"
+
+              + "<TR><TD ALIGN=RIGHT>"
+              + i18n("Type") + " : "
+              + "</TD><TD>"
+              + _keducaFile->getHeader("type")
+              + "</TD></TR>"
+
+              + "<TR><TD ALIGN=RIGHT>"
+              + i18n("Language") + " : "
+              + "</TD><TD>"
+              + _keducaFile->getHeader("language")
+              + "</TD></TR>"
+
+              + "</TABLE>";
+    _isInit = true;
+
+    _viewResults->setText( infoStart );
 }
 
@@ -103,5 +150,9 @@ void KEducaView::slotButtonNext()
     else
     {
+        if( _isInit )
+          _isInit = false;
+          else
         _keducaFile->recordNext();
+          
         if( !showRecord() )
         {
@@ -178,4 +229,5 @@ bool KEducaView::showRecord()
         _viewResults->hide();
         _buttonSave->hide();
+        _questionText->show();
         _split->show();
     }
@@ -343,5 +395,5 @@ bool KEducaView::openURL( const KURL &ur
     init();
     configRead();
-    showRecord();
+//    showRecord();
 
     return true;

--- kdeedu/keduca/keduca/keducaview.h  #1.9:1.10
@@ -106,4 +106,6 @@ private:
     /** Show results when finish? */
     bool _showResultFinish;
+    /** If is init window */
+    bool _isInit;
     QTimer *_timeoutTimer;
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic