Example #1
0
NucleotideDisplay::NucleotideDisplay(UiVariables* gui, GLWidget* gl)
{	
	glWidget = gl;
	ui = gui;
	string* seq = new string("AATCGATCGTACGCTACGATCGCTACGCAGCTAGGACGGATTAATCGATCGTACGCTACGATCGCTACGCAGCTAGGACGGATTAATCGATCGTACGCTACGATCGCTACGCAGCTAGGACGGATTAATCGATCGTACGCTACGATCGCTACGCAGCTAGGACGGATT");	
	sequence = seq;
	
	textureBuffer = NULL;
	settingsTab = NULL;
	toggleButton = NULL;	
	hidden = false;
	
	nucleotide_start = 1;
	scale = 1;
	changeWidth(ui->getWidth());
	changeSize(ui->getSize());
	upToDate = false;
	
	invert = false;
	C = true;
	G = true;
	A = true;
	T = true;
	
	actionLabel = string("Nucleotide Display");
	actionTooltip = string("Nucleotides as Colors");
	actionData = actionLabel; 
	display_object = 0;
}
Example #2
0
MainWindow::MainWindow()
{
    QMenu *fileMenu = new QMenu(tr("&File"));

    QAction *quitAction = fileMenu->addAction(tr("E&xit"));
    quitAction->setShortcut(tr("Ctrl+Q"));

    QMenu *tableMenu = new QMenu(tr("&Table"));

    QAction *tableWidthAction = tableMenu->addAction(tr("Change Table &Width"));
    QAction *tableHeightAction = tableMenu->addAction(tr("Change Table &Height"));

    menuBar()->addMenu(fileMenu);
    menuBar()->addMenu(tableMenu);

//! [0]
    tableWidget = new QTableWidget(this);
//! [0]
    tableWidget->setSelectionMode(QAbstractItemView::ExtendedSelection);

    connect(quitAction, SIGNAL(triggered()), this, SLOT(close()));
    connect(tableWidthAction, SIGNAL(triggered()), this, SLOT(changeWidth()));
    connect(tableHeightAction, SIGNAL(triggered()), this, SLOT(changeHeight()));

    setupTableItems();

    setCentralWidget(tableWidget);
    setWindowTitle(tr("Table Widget Resizing"));
}
Example #3
0
 /**
  * Sets the min/max and updates the scale.
  * 
  * @param min 
  * @param max 
  */
 void BinaryStretch::setMinMax(double min, double max) {
   QStretch::setMinMax(min, max);
   p_scale = 255.0/(max-min);
   changeStart(p_startSlider->value());
   changeWidth(p_widthSlider->value());
 }