minor updates to mussa setup widget
authorDiane Trout <diane@caltech.edu>
Fri, 3 Aug 2007 01:35:01 +0000 (01:35 +0000)
committerDiane Trout <diane@caltech.edu>
Fri, 3 Aug 2007 01:35:01 +0000 (01:35 +0000)
I was trying to get mussa to build against qt 4.3.0 which and this component
had some display issues (which I wasn't able to resolve on OS X)
these updates remove the trailing blank space that was needed for qt 4.2.2
on windows (at least I think it was that version) and wrapped most
of the display strings in the tr() so we could localize mussa if we
wanted to.

qui/mussa_setup_dialog/MussaSetupWidget.cpp
qui/mussa_setup_dialog/SequenceSetupFrame.cpp
qui/mussa_setup_dialog/SequenceSetupWidget.cpp

index c116a9a2e12fc6e9983760a6f80f83906cd69961..85ad1cbdd8754e3d8ed9ad077af03eb2277e2ad3 100644 (file)
@@ -70,7 +70,7 @@ MussaSetupWidget::MussaSetupWidget(QWidget *parent)
   numOfSequencesSpinBox->setWhatsThis("Number of sequences to include in analysis. ");
 
   //Sequence setup frame
-  seqSetupFrame = new SequenceSetupFrame;
+  seqSetupFrame = new SequenceSetupFrame(this);
 
   connect(numOfSequencesSpinBox, SIGNAL(valueChanged(int)),
          seqSetupFrame, SLOT(changeSequenceCount(int)));
@@ -81,7 +81,7 @@ MussaSetupWidget::MussaSetupWidget(QWidget *parent)
   connect(createPushButton, SIGNAL(pressed()),
          this, SLOT(mussaCreatePushed()));
   
-  // Cancle Button
+  // Cancel Button
   connect(cancelPushButton, SIGNAL(pressed()),
          this, SLOT(mussaCancelPushed()));
 
index 15c34f192575179eda063f860bd0ca0533535c3f..4e1fb07f43dd0e5dc2d5de61368d0caff31a0978 100644 (file)
@@ -108,7 +108,7 @@ void SequenceSetupFrame::setupSequences(int newSeqCount)
     }
 
   }
-  
+  updateGeometry();  
 }
 
 std::list<SetupInfo *> SequenceSetupFrame::getSetupInfo()
index 7128c4f51ddc230d2518a1b6a2ffaaca03cbafa2..d1464dd17e0fdafac3f43dbba09bffe02f516429 100644 (file)
@@ -24,73 +24,74 @@ SequenceSetupWidget::SequenceSetupWidget(SequenceSetupFrame *setupFrame_,
   // we really need the setupFrame, so lets declair that requirement
   assert(setupFrame != 0);
 
-  sequenceNameEdit = new QLineEdit;
-  sequenceNameEdit->setWhatsThis("Name of input sequence ");
-  QLabel *sequenceNameLabel = new QLabel(tr("Sequence name:"));
+  // Name line
+  sequenceNameEdit = new QLineEdit(this);
+  sequenceNameEdit->setWhatsThis(tr("Name of input sequence"));
+  QLabel *sequenceNameLabel = new QLabel(tr("Sequence name:"), this);
   sequenceNameLabel->setBuddy(sequenceNameEdit);
-  sequenceNameLabel->setWhatsThis("Name of input sequence ");
+  sequenceNameLabel->setWhatsThis(tr("Name of input sequence"));
 
-  // Sequence row
-  sequenceLineEdit = new QLineEdit;
-  sequenceLineEdit->setWhatsThis("File path to input sequence ");
+  // Sequence file location line
+  sequenceLineEdit = new QLineEdit(this);
+  sequenceLineEdit->setWhatsThis(tr("File path to input sequence"));
   //const IsFileValidator *fileValidator = new IsFileValidator(this);
   //sequenceLineEdit->setValidator(fileValidator);
-  QLabel *sequenceLabel = new QLabel("Sequence Filename:");
+  QLabel *sequenceLabel = new QLabel("Sequence Filename:", this);
   sequenceLabel->setBuddy(sequenceLineEdit);
-  sequenceLabel->setWhatsThis("File path to input sequence ");
+  sequenceLabel->setWhatsThis(tr("File path to input sequence"));
   
-  QPushButton *sequenceButton = new QPushButton("Browse...");
-  sequenceButton->setWhatsThis("Browse for input sequence ");
+  QPushButton *sequenceButton = new QPushButton(tr("Browse..."), this);
+  sequenceButton->setWhatsThis(tr("Browse for input sequence"));
   connect(sequenceButton, SIGNAL(clicked()), 
          this, SLOT(promptForFastaFile()));
 
   // Annotation row
-  annotLineEdit = new QLineEdit;
-  annotLineEdit->setWhatsThis("Annotation file path for above input sequence ");
+  annotLineEdit = new QLineEdit(this);
+  annotLineEdit->setWhatsThis(tr("Annotation file path for above input sequence"));
   //const IsFileValidator *fileValidator2 = new IsFileValidator(this);
   //annotLineEdit->setValidator(fileValidator2);
-  QLabel *annotLabel = new QLabel("Annotation Filename:");
+  QLabel *annotLabel = new QLabel(tr("Annotation Filename:"), this);
   annotLabel->setBuddy(annotLineEdit);
-  annotLabel->setWhatsThis("Annotation file path for above input sequence ");
+  annotLabel->setWhatsThis(tr("Annotation file path for above input sequence"));
 
-  QPushButton *annotButton = new QPushButton("Browse...");
-  annotButton->setWhatsThis("Browse for annotation file for above input sequence ");
+  QPushButton *annotButton = new QPushButton(tr("Browse..."), this);
+  annotButton->setWhatsThis(tr("Browse for annotation file for above input sequence"));
   connect(annotButton, SIGNAL(clicked()),
          this, SLOT(promptForAnnotFile()));
 
   // Index row
-  fastaIndexLineEdit = new QLineEdit;
-  fastaIndexLineEdit->setWhatsThis("When a FASTA file contains more then one FASTA record, provide a 1 based index (first record is index 1) to select which one to use. ");
+  fastaIndexLineEdit = new QLineEdit(this);
+  fastaIndexLineEdit->setWhatsThis(tr("When a FASTA file contains more then one FASTA record, provide a 1 based index (first record is index 1) to select which one to use."));
   //fastaIndexLineEdit->setMaximumWidth(100);
 
-  QLabel *fastaIndexLabel = new QLabel("Fasta Index:");
+  QLabel *fastaIndexLabel = new QLabel(tr("Fasta Index:"), this);
   fastaIndexLabel->setBuddy(fastaIndexLineEdit);
-  fastaIndexLabel->setWhatsThis("When a FASTA file contains more then one FASTA record, provide a 1 based index (first record is index 1) to select which one to use. ");
+  fastaIndexLabel->setWhatsThis(tr("When a FASTA file contains more then one FASTA record, provide a 1 based index (first record is index 1) to select which one to use."));
 
-  seqStartLineEdit = new QLineEdit;
-  seqStartLineEdit->setWhatsThis("Start base pair in input sequence (0 based: 1st base pair is 0) ");
+  seqStartLineEdit = new QLineEdit(this);
+  seqStartLineEdit->setWhatsThis(tr("Start base pair in input sequence (0 based: 1st base pair is 0)"));
   //seqStartLineEdit->setMinimumWidth(60);
   //seqStartLineEdit->setMaximumWidth(80);
 
-  QLabel *seqStartLabel = new QLabel("Sequence Start:");
-  seqStartLabel->setWhatsThis("Start base pair in input sequence (0 based: 1st base pair is 0) ");
+  QLabel *seqStartLabel = new QLabel(tr("Sequence Start:"), this);
+  seqStartLabel->setWhatsThis(tr("Start base pair in input sequence (0 based: 1st base pair is 0)"));
   seqStartLabel->setBuddy(seqStartLineEdit);
   
-  seqStopLineEdit = new QLineEdit;
-  seqStopLineEdit->setWhatsThis("Stop base pair in input sequence (0 based: 1st base pair is 0) 0 means all of remaining sequence. ");
+  seqStopLineEdit = new QLineEdit(this);
+  seqStopLineEdit->setWhatsThis(tr("Stop base pair in input sequence (0 based: 1st base pair is 0) 0 means all of remaining sequence."));
   //seqStopLineEdit->setMinimumWidth(40);
   //seqStopLineEdit->setMaximumWidth(60);
 
-  QLabel *seqStopLabel = new QLabel("Sequence Stop:");
-  seqStopLabel->setWhatsThis("Stop base pair in input sequence (0 based: 1st base pair is 0) 0 means all of remaining sequence. ");
+  QLabel *seqStopLabel = new QLabel(tr("Sequence Stop:"));
+  seqStopLabel->setWhatsThis(tr("Stop base pair in input sequence (0 based: 1st base pair is 0) 0 means all of remaining sequence."));
   seqStopLabel->setBuddy(seqStopLineEdit);
 
   // Layout
+  QVBoxLayout *mainLayout = new QVBoxLayout;
   QHBoxLayout *sequenceNameLayout = new QHBoxLayout;
   QHBoxLayout *sequenceRowLayout = new QHBoxLayout;
   QHBoxLayout *annotRowLayout = new QHBoxLayout;
   QHBoxLayout *indexRowLayout = new QHBoxLayout;
-  QVBoxLayout *mainLayout = new QVBoxLayout;
 
   sequenceNameLayout->addWidget(sequenceNameLabel);
   sequenceNameLayout->addWidget(sequenceNameEdit);