From f6e6b5f271be9d34ca2814029c0c97173c274109 Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Tue, 24 Oct 2006 21:38:47 +0000 Subject: [PATCH] tagged release_1.0_rc3 --- qui/MussaWindow.cpp | 9 +++-- qui/test/TestColorSharing.cpp | 31 ++-------------- qui/test/TestSequenceBrowser.cpp | 50 ++------------------------ qui/test/TestSequenceDescription.cpp | 48 +------------------------ qui/test/TestSequenceLocationModel.cpp | 39 ++------------------ 5 files changed, 13 insertions(+), 164 deletions(-) diff --git a/qui/MussaWindow.cpp b/qui/MussaWindow.cpp index 72829c9..1a7c355 100644 --- a/qui/MussaWindow.cpp +++ b/qui/MussaWindow.cpp @@ -130,10 +130,11 @@ void MussaWindow::setupActions() connect(closeAction, SIGNAL(triggered()), this, SLOT(close())); closeAction->setIcon(QIcon(":/icons/exit.png")); - createNewAnalysisAction = new QAction(tr("Create Analysis"), this); + createNewAnalysisAction = new QAction(tr("Create &New Analysis"), this); connect(createNewAnalysisAction, SIGNAL(triggered()), this, SLOT(createNewAnalysis())); createNewAnalysisAction->setIcon(QIcon(":/icons/filenew.png")); + createNewAnalysisAction->setShortcut(Qt::CTRL | Qt::Key_N); createSubAnalysisAction = new QAction(tr("Add to Subanalysis"), this); connect(createSubAnalysisAction, SIGNAL(triggered()), @@ -143,6 +144,7 @@ void MussaWindow::setupActions() connect(saveAnalysisAction, SIGNAL(triggered()), this, SLOT(saveAnalysis())); saveAnalysisAction->setIcon(QIcon(":/icons/filesave.png")); + saveAnalysisAction->setShortcut(Qt::CTRL | Qt::Key_S); saveAnalysisAsAction = new QAction(tr("Save Analysis &As"), this); connect(saveAnalysisAsAction, SIGNAL(triggered()), @@ -152,7 +154,7 @@ void MussaWindow::setupActions() editMotifsAction = new QAction(tr("Edit Motifs"), this);; connect(editMotifsAction, SIGNAL(triggered()), this, SLOT(editMotifs())); - loadMotifListAction = new QAction(tr("Load Motif List"), this); + loadMotifListAction = new QAction(tr("Open Motif List"), this); connect(loadMotifListAction, SIGNAL(triggered()), this, SLOT(loadMotifList())); loadMotifListAction->setIcon(QIcon(":/icons/fileopen.png")); @@ -162,10 +164,11 @@ void MussaWindow::setupActions() this, SLOT(loadMupa())); loadMupaAction->setIcon(QIcon(":/icons/fileopen.png")); - loadSavedAnalysisAction = new QAction(tr("Load Existing &Analysis"), this); + loadSavedAnalysisAction = new QAction(tr("&Open Existing &Analysis"), this); connect(loadSavedAnalysisAction, SIGNAL(triggered()), this, SLOT(loadSavedAnalysis())); loadSavedAnalysisAction->setIcon(QIcon(":/icons/fileopen.png")); + loadSavedAnalysisAction->setShortcut(Qt::CTRL | Qt::Key_O); mussaManualAssistantAction = new QAction(tr("Mussagl Manual..."), this); mussaManualAssistantAction->setIcon(QIcon(":/icons/contents.png")); diff --git a/qui/test/TestColorSharing.cpp b/qui/test/TestColorSharing.cpp index 5730aca..6f61d59 100644 --- a/qui/test/TestColorSharing.cpp +++ b/qui/test/TestColorSharing.cpp @@ -1,30 +1,3 @@ -#include -#include +#include "TestColorSharing.hpp" -#include "alg/mussa.hpp" -#include "alg/color.hpp" -#include "qui/MussaWindow.hpp" - -//! do our colors get shared correctly between different windows? -class TestColorSharing : public QObject -{ - Q_OBJECT - -private slots: - - void simple2sequence() { - Color green(0.0, 1.0, 0.0); - Mussa m; - m.append_sequence("AAGGCCTT"); - m.append_sequence("GGTTCCAA"); - m.set_window(2); - m.set_threshold(2); - m.analyze(); - - //MussaWindow mw(&m); - m.add_motif("GG", green); - } -}; - -QTEST_MAIN(TestColorSharing) -#include "moc_TestColorSharing.cxx" +QTEST_APPLESS_MAIN(TestColorSharing) diff --git a/qui/test/TestSequenceBrowser.cpp b/qui/test/TestSequenceBrowser.cpp index eb09d6a..e549db8 100644 --- a/qui/test/TestSequenceBrowser.cpp +++ b/qui/test/TestSequenceBrowser.cpp @@ -1,50 +1,4 @@ -#include -#include - -#include "alg/sequence.hpp" -#include "qui/seqbrowser/SequenceBrowser.hpp" - -#include -#include -#include - -#include -#include -using namespace boost::assign; - - -class TestSequenceBrowser : public QObject -{ - Q_OBJECT - -private slots: - - void testSimplePushSequence() { - boost::shared_ptr seq1(new Sequence("AAGGCCTT")); - boost::shared_ptr seq2(new Sequence("GGCCTTAA")); - - SequenceBrowser browser; - QVERIFY(browser.sequences().size() == 0); - browser.push_sequence(seq1); - browser.push_sequence(seq2); - QVERIFY(browser.sequences().size() == 2); - browser.clear(); - QVERIFY(browser.sequences().size() == 0); - } - - void testSelect() { - boost::shared_ptr seq1(new Sequence("AAGGCCTT")); - boost::shared_ptr seq2(new Sequence("GGCCTTAA")); - - SequenceBrowser browser; - browser.push_sequence(seq1); - browser.push_sequence(seq2); - std::vector path; path += 1,1; - std::vector rc; rc += false, false; - browser.link(path, rc, 2); - - } -}; +#include "TestSequenceBrowser.hpp" QTEST_MAIN(TestSequenceBrowser) -#include "moc_TestSequenceBrowser.cxx" + diff --git a/qui/test/TestSequenceDescription.cpp b/qui/test/TestSequenceDescription.cpp index 81be6dc..72840b6 100644 --- a/qui/test/TestSequenceDescription.cpp +++ b/qui/test/TestSequenceDescription.cpp @@ -1,49 +1,3 @@ -#include -#include - -#include "alg/sequence.hpp" -#include "alg/glsequence.hpp" -#include "alg/annotation_colors.hpp" -#include "qui/seqbrowser/SequenceDescription.hpp" - -#include -#include -#include - -class TestSequenceDescription : public QObject -{ - Q_OBJECT - -private slots: - void testSimple() { - boost::shared_ptr seq1(new Sequence("AAGGCCTT")); - seq1->set_species("foo"); - boost::shared_ptr cm(new AnnotationColors); - boost::shared_ptr glseq1(new GlSequence(seq1, cm)); - - SequenceDescription sd(glseq1, 0); - QVERIFY(sd.glsequence() == glseq1); - QVERIFY(sd.glsequence()->sequence()->get_species() == seq1->get_species()); - sd.setName(std::string("bar")); - QVERIFY(sd.glsequence()->sequence()->get_species() == seq1->get_species()); - QVERIFY(seq1->get_species() == "bar"); - } - void testDeletedPointer() { - SequenceDescription sd; - - { - boost::shared_ptr seq1(new Sequence("AAGGCCTT")); - Sequence m("AAGG"); - seq1->find_motif(m); - seq1->set_species("foo"); - boost::shared_ptr cm(new AnnotationColors); - boost::shared_ptr glseq1(new GlSequence(seq1, cm)); - sd.setGlSequence(glseq1); - } - - QVERIFY(sd.name() == "foo"); - } -}; +#include "TestSequenceDescription.hpp" QTEST_MAIN(TestSequenceDescription) -#include "moc_TestSequenceDescription.cxx" diff --git a/qui/test/TestSequenceLocationModel.cpp b/qui/test/TestSequenceLocationModel.cpp index 6a05b50..31cc92c 100644 --- a/qui/test/TestSequenceLocationModel.cpp +++ b/qui/test/TestSequenceLocationModel.cpp @@ -1,38 +1,3 @@ -#include "qui/SequenceLocationModel.hpp" -#include "alg/sequence_location.hpp" -#include "alg/sequence.hpp" +#include "TestSequenceLocationModel.hpp" -#include - -class TestSequenceLocationModel : public QObject -{ - Q_OBJECT - -private slots: - - void testAddSequences() { - Sequence seq1("AAGGCCTT"); - Sequence seq2("GGCCTTAA"); - - SequenceLocation loc1(seq1, 0, 2); - SequenceLocation loc2(seq2, 3, 3); - - SequenceLocationModel slm; - QVERIFY(slm.size() == 0); - slm.push_back(loc1); - slm.push_back(loc2); - - QVERIFY(slm.rowCount() == 2); - QVERIFY(slm.rowCount() == slm.size()); - - } - - void testColumn() { - SequenceLocationModel slm; - QVERIFY(slm.columnCount() == 3); - } -}; - - -QTEST_MAIN(TestSequenceLocationModel) -#include "moc_TestSequenceLocationModel.cxx" +QTEST_APPLESS_MAIN(TestSequenceLocationModel) -- 2.30.2