WhatsThis update
[mussa.git] / qui / seqbrowser / SequenceDescription.cpp
index 4b2f66bf6da1546bf66627e1fafd843db5219afe..d1165047793badac57ed778b77db476858b9756d 100644 (file)
@@ -4,14 +4,14 @@ using namespace std;
 
 SequenceDescription::SequenceDescription(QWidget *parent)
   : QFrame(parent),
-    layout(new QVBoxLayout), 
-    name_label(new QLineEdit),
-    position_label(new QLabel),
-    length_label(new QLabel),
+    layout(0),
+    name_label(0),
+    position_label(0),
+    length_label(0),
     pos(-1) // set pos to an invalid value so the setPos function will call
             // setText
 {
-  createWidget();
+  setupWidgets();
 }
 
 SequenceDescription::SequenceDescription(
@@ -19,13 +19,28 @@ SequenceDescription::SequenceDescription(
     QWidget *parent
 ) : QFrame(parent) 
 {
+  setupWidgets();
   setGlSequence(glseq);  
 }
 
-void SequenceDescription::createWidget()
+void SequenceDescription::setupWidgets()
 {
+  layout = new QVBoxLayout;
+  name_label = new QLineEdit;
+  position_label = new QLabel;
+  length_label = new QLabel;
+  
   setFrameStyle(QFrame::Panel | QFrame::Sunken);
   setLineWidth(1);
+
+  // What's this feature descriptions
+  // FIXME: The '*' is added because for some reason
+  // Qt's whatsthis feature is chopping off the last word
+  // If the '*' eventually shows up in a whatsthis pop-up
+  // then the '*' should be removed.
+  name_label->setWhatsThis("Name of sequence *");
+  position_label->setWhatsThis("Edge of viewport base pair position *");
+  length_label->setWhatsThis("Total length of sequence *");
   
   layout->addWidget(name_label);
   layout->addWidget(position_label);