// ------------------------------------------------------------------------
QWidget * MainWindow::createLayout()
{
	QWidget * leftWidget = new QWidget(this);
	QVBoxLayout * leftLayout = new QVBoxLayout();

	// on the left we have the image list and the buttons
	QWidget * viewWidget = createImageViewer();

	leftLayout->addWidget(createImageList());
	leftLayout->addWidget(createImageTypeControls());
	leftLayout->addWidget(createLineList());
	leftLayout->addWidget(createImageControls());
	leftLayout->addWidget(createButtonGroup());
	leftWidget->setLayout(leftLayout);
	leftWidget->setMaximumWidth(400);


	QWidget * rightWidget = new QWidget(this);
	QVBoxLayout * rightLayout = new QVBoxLayout;
	rightLayout->addWidget(viewWidget);
	rightLayout->addWidget(createInfoPane());
	rightWidget->setLayout(rightLayout);


	QHBoxLayout * mainLayout = new QHBoxLayout;
	mainLayout->addWidget(leftWidget);
	mainLayout->addWidget(rightWidget);


	QWidget * widget = new QWidget(this);
	widget->setLayout(mainLayout);

	return widget;

}
Beispiel #2
0
void addLine (struct line *lineList, unsigned short newLine) {
  struct line **dp = &(lineList->next);
  while (*dp != NULL) { 
    dp = &((*dp)->next);
  }
  *dp = (createLineList(newLine));
}
Beispiel #3
0
/***
Creates a new adjList with the node as the element node, time as the element time and a lineList with line as the element connections.
\param node The node element of the new adjList.
\param time The time element of the new adjList.
\param line The line element of the new adjList.
\return Nothing.

*/
struct adjList * createAdjList(struct node * node, unsigned short time, unsigned short line) {
  struct adjList *c = malloc(sizeof (struct adjList));
  c->node = node;
  c->time = time;
  c->lines = createLineList(line);
  c->next = NULL;
  return c;
}