示例#1
0
/**
 * Sets given model to edit widget.
 */
void TopologyWidget::setModel(TopologyEditModel* model){
	this->model = model;
    npw->setModel(model);

    //clears widget when NULL pointer given
	if(model == NULL){
		ui->itemName->setText(QString());
		clearView();
    }
    //fills view with model data
    else{
		bool saved = model->isSaved();
		ui->itemName->setText(model->name());
		clearView();
		makeView();
		connect(
			model, SIGNAL(changed(ChangeType)),
			this, SLOT(modelChanged(ChangeType)),
			Qt::UniqueConnection
		);
        if(model->selectedLayer() >= 0 && model->selectedLayer() < layerEditList.length()){
            layerEditList[model->selectedLayer()]->setSelected(true);
            widgetPressed(layerEditList[model->selectedLayer()]);
        }
        else if(layerEditList.length() > 0){
            model->setSelectedLayer(layerEditList.length()-1);
            layerEditList[model->selectedLayer()]->setSelected(true);
            widgetPressed(layerEditList[model->selectedLayer()]);
        }
		model->setSaved(saved);
	}
}
示例#2
0
void KFileView::clear()
{
    m_itemList.clear();
    filesNumber = 0;
    dirsNumber = 0;
    clearView();
}
示例#3
0
DropSiteWindow::DropSiteWindow(const QApplication &app)
{
    dropArea = new DropArea;
    Ui_Form imageViewerUi;
    imageViewerUi.setupUi(this);

    connect( imageViewerUi.pushButton_5, SIGNAL(clicked()), this, SLOT(zoomInView()) );
    connect( imageViewerUi.pushButton, SIGNAL(clicked()), this, SLOT(zoomOutView()) );
    connect( imageViewerUi.pushButton_10, SIGNAL(clicked()), this, SLOT(panLeftView()) );
    connect( imageViewerUi.pushButton_8, SIGNAL(clicked()), this, SLOT(panRightView()) );
    connect( imageViewerUi.pushButton_3, SIGNAL(clicked()), this, SLOT(panUpView()) );
    connect( imageViewerUi.pushButton_7, SIGNAL(clicked()), this, SLOT(panDownView()) );
    connect( imageViewerUi.pushButton_4, SIGNAL(clicked()), this, SLOT(rotateAntiClockwiseView()) );
    connect( imageViewerUi.pushButton_6, SIGNAL(clicked()), this, SLOT(rotateClockWiseView()) );
    connect( imageViewerUi.pushButton_2, SIGNAL(clicked()), &app, SLOT(quit()));
    connect( imageViewerUi.pushButton_9, SIGNAL(clicked()), dropArea, SLOT(clearView()));
    connect(imageViewerUi.pushButton_11, SIGNAL(clicked()), this, SLOT(openFile()));


    abstractLabel = new QLabel(tr("Drop an Image below"));
    abstractLabel->setMaximumHeight(20);
    abstractLabel->setFrameStyle(QFrame::Panel | QFrame::Sunken);

    imageViewerUi.verticalLayout_2->addWidget(abstractLabel);
    imageViewerUi.verticalLayout_2->addWidget(dropArea);

    setWindowTitle(tr("Drop Site"));
    setMinimumSize(350, 500);
}
示例#4
0
/**
 * Removes layer, redraws view and emmits modelChanged signal.
 */
void TopologyWidget::removeLayer(LayerEditWidget* widget){
	int layer = layerEditList.indexOf(widget)-1;
	model->removeLayer(layer);
	clearView();
	makeView();
	model->modelChanged(TopologyChange);
}
示例#5
0
  /* \brief Visual update. Create visualizations and add them to the viewer
   *
   */
  void update()
  {
    //remove existing shapes from visualizer
    clearView();

    //prevent the display of too many cubes
    bool displayCubeLegend = displayCubes && static_cast<int> (displayCloud->points.size ()) <= MAX_DISPLAYED_CUBES;

    showLegend(displayCubeLegend);

    if (displayCubeLegend)
    {
      //show octree as cubes
      showCubes(sqrt(octree.getVoxelSquaredSideLen(displayedDepth)));
      if (showPointsWithCubes)
      {
        //add original cloud in visualizer
        pcl::visualization::PointCloudColorHandlerGenericField<pcl::PointXYZ> color_handler(cloud, "z");
        viz.addPointCloud(cloud, color_handler, "cloud");
      }
    }
    else
    {
      //add current cloud in visualizer
      pcl::visualization::PointCloudColorHandlerGenericField<pcl::PointXYZ> color_handler(displayCloud,"z");
      viz.addPointCloud(displayCloud, color_handler, "cloud");
    }
  }
示例#6
0
/**
 * Removes selected layer, redraws view and emmits modelChanged signal.
 */
void TopologyWidget::removeSelected(){
	int layer = selectedLayer();
	if(layer == -2) return;
	model->removeLayer(layer);
	clearView();
	makeView();
	model->modelChanged(TopologyChange);
}
void KFileInfoContents::clear()
{
    sorted_length = 0;
    delete nameList;
    nameList = 0;
    clearView();
    filesNumber = 0;
    dirsNumber = 0;
}
示例#8
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    this->chatTimeout = true;
    this->connected = false;
    this->currColorId = 2; // czarny
    this->lastColorButton = ui->blackPushButton;
    this->graphicsScene = new QGraphicsScene();
    ui->graphicsView->setScene(graphicsScene);
    this->currentPen.setColor(QColor("black"));


    connect(ui->graphicsView,SIGNAL(drawPoint(QPoint)),this,SLOT(drawPoint(QPoint)));
    connect(ui->graphicsView,SIGNAL(drawLineTo(QPoint)),this,SLOT(drawLineTo(QPoint)));

    connect(ui->clearPushButton,SIGNAL(clicked()),this,SLOT(clearView()));
    connect(ui->redPushButton,SIGNAL(clicked()),this,SLOT(switchColor()));
    connect(ui->greenPushButton,SIGNAL(clicked()),this,SLOT(switchColor()));
    connect(ui->blackPushButton,SIGNAL(clicked()),this,SLOT(switchColor()));
    connect(ui->sendMessagePushButton,SIGNAL(clicked()),this,SLOT(sendMessage()));
    connect(ui->chatLineEdit,SIGNAL(returnPressed()),this,SLOT(sendMessage()));

    this->socket = new KalSocket();
    this->chatTimer = new QTimer();

    connect(socket,SIGNAL(connected()),this,SLOT(connectionSuccess()));
    connect(socket,SIGNAL(error(QAbstractSocket::SocketError)),
            this,SLOT(displayError(QAbstractSocket::SocketError)));
    connect(socket,SIGNAL(pointsReceived(int,int,int,KalSocket::DrawType)),
            this,SLOT(pointsReceived(int,int,int,KalSocket::DrawType)));
    connect(socket,SIGNAL(clear()),graphicsScene,SLOT(clear()));
    connect(socket,SIGNAL(someoneLoggedIn(QString)),this,SLOT(someoneLoggedIn(QString)));
    connect(socket,SIGNAL(chatMessage(QString,QString)),this,SLOT(addMessage(QString,QString)));
    connect(socket,SIGNAL(nicknames(QList<QString>)),this,SLOT(getNicknames(QList<QString>)));
    connect(socket,SIGNAL(logout(QString)),this,SLOT(someoneLoggedOut(QString)));
    connect(socket,SIGNAL(drawStart(QString)),this,SLOT(drawStart(QString)));
    connect(socket,SIGNAL(gotSettings(ServerSettings)),this,SLOT(getSettings(ServerSettings)));
    connect(socket,SIGNAL(errorMessage(QString)),this,SLOT(showMessage(QString)));

    connect(ui->wantDrawCheckBox,SIGNAL(toggled(bool)),this,SLOT(wantDrawToggled(bool)));

    // actiony z menu: Polaczenie
    connect(ui->actionPo_cz,SIGNAL(triggered()),this,SLOT(connectWindowExec())); // laczymy sie
    connect(ui->actionRoz_cz,SIGNAL(triggered()),this,SLOT(disconnect())); // rozlaczamy sie
    connect(ui->actionZako_cz,SIGNAL(triggered()),this,SLOT(close())); // koniec programu

    // timer
    connect(chatTimer,SIGNAL(timeout()),this,SLOT(timeout()));
    connect(ui->progressBar,SIGNAL(full()),this,SLOT(drawTimeout()));

    // inne
    this->disableActions(false); // Polacz - aktywne, Rozlacz - nieaktywne
}
示例#9
0
 void GLScene::draw(GLRect winrect)
 {
     view.apply(winrect,perspective);
     if ((color.r or color.g or color.b) and color.a)
         clearView(color);
     glPushMatrix();
     for (unsigned int i=0; i<objects.size(); ++i)
     {
         objects[i]->drawEx(data[i].offset,data[i].rotation,data[i].scale,false);
     }
     glPopMatrix();
 }
示例#10
0
void PropertyEditor::slotSorting(bool sort)
{
    if (sort == m_sorting)
        return;

    storeExpansionState();
    m_sorting = sort;
    collapseAll();
    {
        UpdateBlocker ub(this);
        clearView();
        m_treeBrowser->setRootIsDecorated(sort);
        fillView();
        applyExpansionState();
        applyFilter();
    }
    updateActionsState();
}
示例#11
0
void FastWorldDrawer::Draw() {

    clearView();

    configureCamera();

    paintGround();
    paintDecorations();
    paintCorpses();
    paintProjectiles();
    paintMonsters();
    paintHeroes();

    paintEffects();

    paintCursor();

}
示例#12
0
void PropertyEditor::slotViewTriggered(QAction *action)
{
    storeExpansionState();
    collapseAll();
    {
        UpdateBlocker ub(this);
        clearView();
        int idx = 0;
        if (action == m_treeAction) {
            m_currentBrowser = m_treeBrowser;
            idx = m_treeIndex;
        } else if (action == m_buttonAction) {
            m_currentBrowser = m_buttonBrowser;
            idx = m_buttonIndex;
        }
        fillView();
        m_stackedWidget->setCurrentIndex(idx);
        applyExpansionState();
        applyFilter();
    }
    updateActionsState();
}
示例#13
0
void KFileInfoContents::setSorting(QDir::SortSpec new_sort)
{
    QDir::SortSpec old_sort = 
	static_cast<QDir::SortSpec>(sorting() & QDir::SortByMask);
    QDir::SortSpec sortflags = 
	static_cast<QDir::SortSpec>(sorting() & (~QDir::SortByMask));
    
    if (mySortMode == Switching) {
	if (new_sort == old_sort)
	    reversed = !reversed;
	else
	    reversed = false;
    } else 
	reversed = (mySortMode == Decreasing);
    
    mySorting = static_cast<QDir::SortSpec>(new_sort | sortflags);
   
    if (count() <= 1) // nothing to do in this case
	return;

    if ( mySorting & QDir::DirsFirst )
        keepDirsFirst = true;
    else
        keepDirsFirst = false;

    setAutoUpdate(false);
    clearView();

    debugC("qsort %ld", time(0));
    QuickSort(sortedArray, 0, sorted_length - 1);
    debugC("qsort %ld", time(0));
    for (uint i = 0; i < sorted_length; i++)
	insertItem(sortedArray[i], -1);
    debugC("qsort %ld", time(0));
    setAutoUpdate(true);
    repaint(true);
}
示例#14
0
void GUIAttrEdit::handleMsg( ZMsg *msg ) {
	float lineH = getLineH();

	int scroll = getAttrI( "scroll" );

	float x = zmsgF(localX);
	float y = zmsgF(localY);

	if( zmsgIs(type,Key) && zmsgIs(which,wheelforward) ) {
		if( contains(x,y) ) {
			scroll-=2;
			scroll = max( -10, scroll );
			scroll = min( view.count-5, scroll );
			setAttrI( "scroll", scroll );
			mouseOver = (int)( (myH-y) / lineH );
			mouseOver += scroll;
			mouseOver = selected > view.count-1 ? view.count-1 : mouseOver;
			zMsgUsed();
		}
	}
	else if( zmsgIs(type,Key) && zmsgIs(which,wheelbackward) ) {
		if( contains(x,y) ) {
			scroll+=2;
			scroll = max( -10, scroll );
			scroll = min( view.count-5, scroll );
			setAttrI( "scroll", scroll );
			mouseOver = (int)( (myH-y) / lineH );
			mouseOver += scroll;
			mouseOver = selected > view.count-1 ? view.count-1 : mouseOver;
			zMsgUsed();
		}
	}
	else if( zmsgIs(type,MouseMove) ) {
		mouseOver = (int)( (myH-y) / lineH );
		mouseOver += scroll;
		mouseOver = selected > view.count-1 ? view.count-1 : mouseOver;
	}

	else if( zmsgIs(type,MouseClickOn) && zmsgIs(dir,D) && zmsgI(ctrl) && zmsgI(shift) ) {
		//ADJUST the linIncrement
		if( zmsgIs(which,L) ) {
			linIncrement *= 2.f;
		}
		else if( zmsgIs(which,R) ) {
			linIncrement /= 2.f;
		}
	}
	else if( zmsgIs(type,MouseClickOn) && zmsgIs(dir,D) && zmsgIs(which,L) ) {
		selected = (int)( (myH-y) / lineH );
		selected += scroll;
		selected = selected > view.count-1 ? view.count-1 : selected;

		ZHashTable *hash = (ZHashTable *)getAttrp( "hashPtr" );
		if( !hash ) return;
		char *val = hash->getS( view[selected] );

		char *end;
		double valD = strtod( val, &end );
		if( end != val ) {
			// This is a number that can be manipulated

//			if( zmsgI(shift) && !zmsgI(ctrl) ) {
//				linMode = 0;
//				zMsgQueue( "type=GUIAttrEdit_CreateOptionMenu key=%s val=%lf toGUI=%s", selectVarPtr->name, selectVarPtr->getDouble(), getAttrS("name") );
//			}
//			else {
				if( zmsgI(ctrl) && !zmsgI(shift) ) {
					linMode = 1;
				}
				else {
					linMode = 0;
				}
				selectX = x;
				selectY = y;
				mouseX = x;
				mouseY = y;
				startVal = valD;
				requestExclusiveMouse( 1, 1 );
//			}
		}
		else {
			selected = -1;
		}


/*
		ZVarPtr *selectVarPtr = getSelectedVar( selected );
		if( selectVarPtr ) {
			if( zmsgI(shift) && !zmsgI(ctrl) ) {
				linMode = 0;
				zMsgQueue( "type=GUIAttrEdit_CreateOptionMenu key=%s val=%lf toGUI=%s", selectVarPtr->name, selectVarPtr->getDouble(), getAttrS("name") );
			}
			else {
				if( zmsgI(ctrl) && !zmsgI(shift) ) {
					linMode = 1;
				}
				else {
					linMode = 0;
				}
				selectX = x;
				selectY = y;
				mouseX = x;
				mouseY = y;
				switch( selectVarPtr->type ) {
					case zVarTypeINT:    startVal = (double)*(int    *)selectVarPtr->ptr + 0.4; break;
					case zVarTypeSHORT:  startVal = (double)*(short  *)selectVarPtr->ptr + 0.4; break;
					case zVarTypeFLOAT:  startVal = (double)*(float  *)selectVarPtr->ptr; break;
					case zVarTypeDOUBLE: startVal = (double)*(double *)selectVarPtr->ptr; break;
				}
				requestExclusiveMouse( 1, 1 );
			}
		}
*/
		zMsgUsed();
		return;
	}
	else if( zmsgIs(type,MouseReleaseDrag) ) {
		if( selected >= 0 ) {
//			ZVarPtr *selectVarPtr = getSelectedVar( selected );
//			if( selectVarPtr ) {
//				zMsgQueue( "type=GUIAttrEdit_VarDoneChange key=%s val=%lf", selectVarPtr->name, selectVarPtr->getDouble() );
//			}
		}

		requestExclusiveMouse( 1, 0 );
		selected = -1;
		zMsgUsed();
		return;
	}
	else if( zmsgIs(type,MouseDrag) && zmsgI(l) ) {
		int last = -1;
		int count = 0;
		//while( count++ != selected+1 && zVarsEnum( last, selectVarPtr, regExp ) );

		ZHashTable *hash = (ZHashTable *)getAttrp( "hashPtr" );
		double val = hash->getD( view[selected] );
		mouseX = x;
		mouseY = y;
		if( linMode ) {
			val = startVal + (mouseY-selectY) * linIncrement;
		}
		else{
			val = startVal * exp( (mouseY-selectY) / 50.0 );
		}
		hash->putS( view[selected], ZTmpStr("%4.3le",val) );
	}
	else if( zmsgIs(type,MouseClickOn) && zmsgIs(dir,D) && zmsgIs(which,R) ) {
		selectX = x;
		selectY = y;
		startScroll = scroll;
		requestExclusiveMouse( 1, 1 );
		zMsgUsed();
		return;
	}
	else if( zmsgIs(type,MouseDrag) && zmsgI(r) ) {
		scroll = (int)( startScroll + ( y - selectY ) / lineH );
		scroll = max( -10, scroll );
		scroll = min( view.count-5, scroll );
		setAttrI( "scroll", scroll );
	}
	else if( zmsgIs(type,GUIAttrEdit_Clear) ) {
		clearView();
	}
//	else if( zmsgIs(type,GUIAttrEdit_Add) ) {
//		if( zmsgHas(regexp) ) {
//			addVarsByRegExp( zmsgS(regexp) );
//		}
//		else if( zmsgHas(name) ) {
//			addVar( zmsgS(name) );
//		}
//	}
	else if( zmsgIs(type,GUIAttrEdit_Sort) ) {
		if( zmsgIs(which,name) ) {
			sortViewByName();
		}
//		else if( zmsgIs(which,order) ) {
//			sortViewByDeclOrder();
//		}
	}
	else if( zmsgIs(type,GUIAttrEdit_CreateOptionMenu) ) {
		ZHashTable hash;
		hash.putS( "who", getAttrS("name") );
		hash.putS( "key", zmsgS(key) );
		hash.putS( "val", ZTmpStr("%1.2e", zmsgF(val)) );
		createOptionMenu( &hash );
		optMenuUp = 1;
		zMsgQueue( "type=GUILayout toGUI=varEditOptMenu" );
		zMsgQueue( "type=GUIMoveNear who=%s where=T x=4 y=%f toGUI=varEditOptMenu", getAttrS("name"), -(mouseOver-scroll)*lineH );
		zMsgQueue( "type=GUISetModal val=1 toGUI=varEditOptMenu" );
	}
	else if( zmsgIs(type,GUIAttrEdit_CreateOptionMenuDone) ) {
		optMenuUp = 0;
		selected = -1;
	}
	else if( zmsgIs(type,GUIAttrEdit_CreateOptionMenuDirectEntry) ) {
		GUIObject *obj = guiFind( zmsgS(fromGUI) );
		if( obj ) {
			zMsgQueue( "type=SetVar key=%s val=%f", zmsgS(key), atof(obj->getAttrS("text")) );
		}
	}
//	else if( zmsgIs(type,GUIAttrEdit_ResetAll) ) {
//		for( int i=0; i<view.count; i++ ) {
//			ZVarPtr *v = zVarsLookup( varsView.vec[i] );
//			v->resetDefault();
//		}
//	}
	else if( zmsgIs(type,GUIAttrEdit_Clear) ) {
		clearView();
	}
	else if( zmsgIs(type,GUIAttrEdit_Add) ) {
		addVar( zmsgS(key) );
	}
	else if( zmsgIs(type,GUIAttrEdit_ViewAll) ) {
		if( zmsgI(clear) ) {
			clearView();
		}
		addAllVars();
	}
	GUIPanel::handleMsg( msg );
}
示例#15
0
void WorkspacePresenter::workspacesCleared() {
  auto view = lockView();
  view->clearView();
}
示例#16
0
void ReportTableContig::defineView(void)
{
  // clear view
  clearView();

  // auxiliary object for column type holding
  ReportColumnTypeString        *auxS;
  ReportColumnTypeImageOnDemand *auxI;
  ReportColumnTypeBox           *auxB;

  ///////////////////////////////////////////////////////////////////////////////
  // View for contig list
  ////////////////////////////////////////
  // Table colTypes has the following structure:

  // colTypes[0] -> (CTstring) Contig index
  auxS = new ReportColumnTypeString();
  auxS->columnLabel  = "Contig<br>Index";
  auxS->text         = "<0>"; //"«0»";
  m_colTypes.push_back(auxS);

  // colTypes[1] -> (CTstring) Number of spectra
  auxS = new ReportColumnTypeString();
  auxS->columnLabel  = "Spectra";
  auxS->text         = "<2>";
  m_colTypes.push_back(auxS);

  // colTypes[2] -> (CTIOD) Contig image
  auxI = new ReportColumnTypeImageOnDemand();
  auxI->link              = "contig.<0>.0.html";
  auxI->columnLabel       = "Contig";
  auxI->iconRenderer      = "contplot";

  auxI->files.push_back( ReportParamsFiles(1,   SPS_FILE_ABRUIJN, "",   ""    ) );
  auxI->files.push_back( ReportParamsFiles(2,   SPS_FILE_STARS,   "",   ""    ) );
  auxI->files.push_back( ReportParamsFiles(3,   SPS_FILE_SEQS,    "",   ""    ) );

  auxI->iconParams.push_back( ReportParamsOption("--aa",              "<aas_file>",                               "<aas_file>" ) );
  auxI->iconParams.push_back( ReportParamsOption("--contig",          "<0>",                                      "<0>" ) );
  auxI->iconParams.push_back( ReportParamsOption("--reference",       "<20>",                                     "<20>" ) );
  auxI->iconParams.push_back( ReportParamsOption("--homolog",         "<19>",                                     "<19>" ) );
  auxI->iconParams.push_back( ReportParamsOption("--denovo",          "<5>",                                      "<5>" ) );
  auxI->iconParams.push_back( ReportParamsOption("--user",            "<6>",                                      "<6>" ) );
  auxI->iconParams.push_back( ReportParamsOption("--mass-reference",  "<10>",                                     "<10>") );
  auxI->iconParams.push_back( ReportParamsOption("--mass-homolog",    "<11>",                                     "<11>") );
  auxI->iconParams.push_back( ReportParamsOption("--offset-reference","<12>",                                     "<12>") );
  auxI->iconParams.push_back( ReportParamsOption("--offset-homolog",  "<13>",                                     "<13>") );
  auxI->iconParams.push_back( ReportParamsOption("--reverse",         "",                                         "<14>") );
  auxI->iconParams.push_back( ReportParamsOption("--image-stretch-height",  "-1",                                 ""    ) );
  auxI->iconParams.push_back( ReportParamsOption("--image-stretch-width",   "300",                                ""    ) );
  auxI->iconParams.push_back( ReportParamsOption("--target",          "internal",                                 ""    ) );
  auxI->iconParams.push_back( ReportParamsOption("--encoding",        "uu64",                                     ""    ) );
  auxI->iconParams.push_back( ReportParamsOption("--notitle",         "",                                         ""    ) );
  auxI->iconParams.push_back( ReportParamsOption("--zoom",            "0.4",                                      ""    ) );
  m_colTypes.push_back(auxI);


  // colTypes[2] -> (CTseqsBox)
  auxB = new ReportColumnTypeBox();
  auxB->columnLabel  = "Contig sequence";

  auxI = new ReportColumnTypeImageOnDemand();
  auxI->columnLabel  = "Reference";
  auxI->label        = "<3>";
  auxI->validator    = "<3>";
  auxI->splitLabel   = true;
  //auxI->renderer     = "contplot";
  //auxI->params       = "--projectdir <projectdir> --p <paramsfile> --spectrumscan <0> --<12> <1> --peptide <4> --target cout";
  auxB->sequences.push_back(auxI);

  auxI = new ReportColumnTypeImageOnDemand();
  auxI->columnLabel  = "Homolog";
  auxI->label        = "<4>";
  auxI->validator    = "<4>";
  auxI->splitLabel   = true;
  //auxI->renderer     = "contplot";
  //auxI->params       = "--projectdir <projectdir> --p <paramsfile> --spectrumscan <0> --<12> <1> --peptide <5> --target cout";
  auxB->sequences.push_back(auxI);

  auxI = new ReportColumnTypeImageOnDemand();
  auxI->columnLabel  = "de Novo";
  auxI->label        = "<5>";
  auxI->validator    = "<5>";
  auxI->splitLabel   = true;
  //auxI->renderer     = "contplot";
  //auxI->params       = "--projectdir <projectdir> --p <paramsfile> --spectrumscan <0> --<12> <1> --peptide <6> --target cout";
  auxB->sequences.push_back(auxI);

  auxI = new ReportColumnTypeImageOnDemand();
  auxI->dynamic      = true;
  auxI->columnLabel  = "User";
  auxI->label        = "<6>";
  auxI->splitLabel   = true;
  //auxI->renderer     = "contplot";
  //auxI->params       = "--projectdir <projectdir> --p <paramsfile> --spectrumscan <0> --<12> <1> --peptide <6> --target cout";
  auxB->sequences.push_back(auxI);

  auxS = new ReportColumnTypeString();
  auxS->isInput      = true;
  auxS->dynamic      = true;
  auxS->id           = "input_contig_<row>_<col>";
  auxB->sequences.push_back(auxS);

  auxS = new ReportColumnTypeString();
  auxS->isButton     = true;
  auxS->dynamic      = true;
  auxS->text         = "Update";
  auxS->link         = "--update <0> --column 6 --data <7>";
  auxS->onClick      = "javascript:DoOnCick(\"input_contig_<row>_<col>\", n, 6);";
  auxB->sequences.push_back(auxS);

  m_colTypes.push_back(auxB);

  // colTypes[3] -> (CTstring) protein
  auxS = new ReportColumnTypeString();
  auxS->columnLabel  = "Protein";
  auxS->text         = "<7><br><br><8>";
  auxS->link         = "protein.<1>.0.html";
  m_colTypes.push_back(auxS);

  // colTypes[1] -> (CTstring) Number of spectra
  auxS = new ReportColumnTypeString();
  auxS->columnLabel  = "Tool";
  auxS->text         = "<18>";
  m_colTypes.push_back(auxS);
}
示例#17
0
void ReportTableContig::defineViewImages(void)
{
  // clear view
  clearView();

  // auxiliary object for column type holding
  ReportColumnTypeString        *auxS;
  ReportColumnTypeImageOnDemand *auxI;
  ReportColumnTypeBox           *auxB;


  // the image
  auxI = new ReportColumnTypeImageOnDemand();
  auxI->id                = "c<0>";
  auxI->columnLabel       = "";
  auxI->iconRenderer      = "contplot";

  auxI->files.push_back( ReportParamsFiles(1,   SPS_FILE_ABRUIJN, "",   ""    ) );
  auxI->files.push_back( ReportParamsFiles(2,   SPS_FILE_STARS,   "",   ""    ) );
  auxI->files.push_back( ReportParamsFiles(3,   SPS_FILE_SEQS,    "",   ""    ) );

  auxI->iconParams.push_back( ReportParamsOption("--aa",                    "<aas_file>",                         "<aas_file>" ) );
  auxI->iconParams.push_back( ReportParamsOption("--title",                 "Contig <0>",                         ""    ) );
  auxI->iconParams.push_back( ReportParamsOption("--contig",                "<0>",                                "<0>" ) );
  auxI->iconParams.push_back( ReportParamsOption("--reference",             "<20>",                               "<20>" ) );
  auxI->iconParams.push_back( ReportParamsOption("--homolog",               "<19>",                               "<19>" ) );
  auxI->iconParams.push_back( ReportParamsOption("--denovo",                "<5>",                                "<5>" ) );
  auxI->iconParams.push_back( ReportParamsOption("--user",                  "<6>",                                "<6>" ) );
  auxI->iconParams.push_back( ReportParamsOption("--mass-reference",        "<10>",                               "<10>") );
  auxI->iconParams.push_back( ReportParamsOption("--mass-homolog",          "<11>",                               "<11>") );
  auxI->iconParams.push_back( ReportParamsOption("--offset-reference",      "<12>",                               "<12>") );
  auxI->iconParams.push_back( ReportParamsOption("--offset-homolog",        "<13>",                               "<13>") );
  auxI->iconParams.push_back( ReportParamsOption("--reverse",               "",                                   "<14>") );
  auxI->iconParams.push_back( ReportParamsOption("--image-stretch-height",  "-1",                                 ""    ) );
  auxI->iconParams.push_back( ReportParamsOption("--image-stretch-width",   "-1",                                 ""    ) );
  auxI->iconParams.push_back( ReportParamsOption("--target",                "internal",                           ""    ) );
  auxI->iconParams.push_back( ReportParamsOption("--encoding",              "uu64",                               ""    ) );

  m_colTypes.push_back(auxI);


  // colTypes[1] -> (CTIOD) Contig image
  auxI = new ReportColumnTypeImageOnDemand();
  auxI->id                = "cs<0>";
  auxI->columnLabel       = "";
  auxI->iconRenderer      = "contplot";

  auxI->files.push_back( ReportParamsFiles(1,   SPS_FILE_ABRUIJN, "",   ""    ) );
  auxI->files.push_back( ReportParamsFiles(2,   SPS_FILE_STARS,   "",   ""    ) );
  auxI->files.push_back( ReportParamsFiles(3,   SPS_FILE_SEQS,    "",   ""    ) );

  auxI->iconParams.push_back( ReportParamsOption("--aa",              "<aas_file>",                               "<aas_file>" ) );
  auxI->iconParams.push_back( ReportParamsOption("--contig",          "<0>",                                      "<0>" ) );
  auxI->iconParams.push_back( ReportParamsOption("--reference",       "<20>",                                     "<20>" ) );
  auxI->iconParams.push_back( ReportParamsOption("--homolog",         "<19>",                                     "<19>" ) );
  auxI->iconParams.push_back( ReportParamsOption("--denovo",          "<5>",                                      "<5>" ) );
  auxI->iconParams.push_back( ReportParamsOption("--user",            "<6>",                                      "<6>" ) );
  auxI->iconParams.push_back( ReportParamsOption("--mass-reference",  "<10>",                                     "<10>") );
  auxI->iconParams.push_back( ReportParamsOption("--mass-homolog",    "<11>",                                     "<11>") );
  auxI->iconParams.push_back( ReportParamsOption("--offset-reference","<12>",                                     "<12>") );
  auxI->iconParams.push_back( ReportParamsOption("--offset-homolog",  "<13>",                                     "<13>") );
  auxI->iconParams.push_back( ReportParamsOption("--reverse",         "",                                         "<14>") );
  auxI->iconParams.push_back( ReportParamsOption("--image-stretch-height",  "-1",                                 ""    ) );
  auxI->iconParams.push_back( ReportParamsOption("--image-stretch-width",   "300",                                ""    ) );
  auxI->iconParams.push_back( ReportParamsOption("--target",          "internal",                                 ""    ) );
  auxI->iconParams.push_back( ReportParamsOption("--encoding",        "uu64",                                     ""    ) );
  auxI->iconParams.push_back( ReportParamsOption("--notitle",         "",                                         ""    ) );
  auxI->iconParams.push_back( ReportParamsOption("--zoom",            "0.4",                                      ""    ) );
  m_colTypes.push_back(auxI);
}
示例#18
0
////////////////////////////////////////////////////////////////////////////////
//
// Table colTypes has the following structure:
// colTypes[0] -> (CTseqsBox)
//   --> columnLabel = ""
//     sequences[0]->(CTIOD) : Reference
//       --> icon  --> "/cgi/contplot --projectdir <projectdir> --contig <0> --reference <1> --homolog <2> --consensus <3> --user <4> --zoom 1 --output-format uu64 --output cout"
//       --> columnLabel = ""
//       --> url = ""
//       --> label = ""
//     sequences[1]-> isInput  = true
//       --> text = ""
//       --> id    --> 'user_<row>_<col>'
//     sequences[2]-> isButton = true
//       --> text = "Update"
//       --> onClick='javascript:DoOnCick('input_<row>_<col>', <0>, user_<row>_<col>);';
//       --> url --> --update --contig <0> --peptide <4>
//
void ReportTableContig::defineView2(void)
{
  // clear view
  clearView();

  // auxiliary object for column type holding
  ReportColumnTypeString        *auxS;
  ReportColumnTypeImageOnDemand *auxI;
  ReportColumnTypeBox           *auxB;


  auxB = new ReportColumnTypeBox();
  auxB->columnLabel  = "";

  // the image
  auxI = new ReportColumnTypeImageOnDemand();
  auxI->columnLabel       = "";
  //auxI->label             = "<br>Reference<br><3><br>Homolog<br><4><br>de Novo<br><5>";
  auxI->iconRenderer      = "contplot";
  //auxI->iconParams        = "--projectdir <projectdir> --contig --peptide <3> --target internal --encoding uu64";
  //auxI->iconParams         = "contig.<0>.png";

  auxI->files.push_back( ReportParamsFiles(1,   SPS_FILE_ABRUIJN, "",   ""    ) );
  auxI->files.push_back( ReportParamsFiles(2,   SPS_FILE_STARS,   "",   ""    ) );
  auxI->files.push_back( ReportParamsFiles(3,   SPS_FILE_SEQS,    "",   ""    ) );

//  auxI->iconParams.push_back( ReportParamsOption("--star",                  "<16>",    ""    ) );
//  auxI->iconParams.push_back( ReportParamsOption("--abruijn",               "<15>",    ""    ) );
//  auxI->iconParams.push_back( ReportParamsOption("--seqs",                  "<17>",    ""    ) );
//  auxI->iconParams.push_back( ReportParamsOption("--star",                  "<projectdir>/<16>",    ""    ) );
//  auxI->iconParams.push_back( ReportParamsOption("--abruijn",               "<projectdir>/<15>",    ""    ) );
//  auxI->iconParams.push_back( ReportParamsOption("--seqs",                  "<projectdir>/<17>",    ""    ) );
  auxI->iconParams.push_back( ReportParamsOption("--aa",                    "<aas_file>",                         "<aas_file>" ) );
  auxI->iconParams.push_back( ReportParamsOption("--title",                 "Contig <0>",                         ""    ) );
  auxI->iconParams.push_back( ReportParamsOption("--contig",                "<0>",                                "<0>" ) );
  auxI->iconParams.push_back( ReportParamsOption("--reference",             "<20>",                               "<20>" ) );
  auxI->iconParams.push_back( ReportParamsOption("--homolog",               "<19>",                               "<19>" ) );
  auxI->iconParams.push_back( ReportParamsOption("--denovo",                "<5>",                                "<5>" ) );
  auxI->iconParams.push_back( ReportParamsOption("--user",                  "<6>",                                "<6>" ) );
  auxI->iconParams.push_back( ReportParamsOption("--mass-reference",        "<10>",                               "<10>") );
  auxI->iconParams.push_back( ReportParamsOption("--mass-homolog",          "<11>",                               "<11>") );
  auxI->iconParams.push_back( ReportParamsOption("--offset-reference",      "<12>",                               "<12>") );
  auxI->iconParams.push_back( ReportParamsOption("--offset-homolog",        "<13>",                               "<13>") );
  auxI->iconParams.push_back( ReportParamsOption("--reverse",               "",                                   "<14>") );
  auxI->iconParams.push_back( ReportParamsOption("--image-stretch-height",  "-1",                                 ""    ) );
  auxI->iconParams.push_back( ReportParamsOption("--image-stretch-width",   "-1",                                 ""    ) );
  auxI->iconParams.push_back( ReportParamsOption("--target",                "internal",                           ""    ) );
  auxI->iconParams.push_back( ReportParamsOption("--encoding",              "uu64",                               ""    ) );

  auxB->sequences.push_back(auxI);


  // the input sequence
  auxS = new ReportColumnTypeString();
  auxS->isInput      = true;
  auxS->dynamic      = true;
  auxS->id           = "input_contig_<row>_<col>";
  auxB->sequences.push_back(auxS);

  // the "update" button
  auxS = new ReportColumnTypeString();
  auxS->isButton     = true;
  auxS->dynamic      = true;
  auxS->text         = "Update";
  auxS->link         = "--update <0> --pklbin <1> --peptide <5>";
  auxS->onClick      = "javascript:DoOnCick(\"input_contig_<row>_<col>\", n, 5);";
  auxB->sequences.push_back(auxS);

  m_colTypes.push_back(auxB);
}
示例#19
0
/**
 * Appends layer, redraws view and emmits modelChanged signal.
 */
void TopologyWidget::appendLayer(){
	model->appendLayer();
	clearView();
	makeView();
	model->modelChanged(TopologyChange);
}
示例#20
0
CoverFoundDialog::CoverFoundDialog( const CoverFetchUnit::Ptr unit,
                                    const CoverFetch::Metadata &data,
                                    QWidget *parent )
    : KDialog( parent )
    , m_album( unit->album() )
    , m_isSorted( false )
    , m_sortEnabled( false )
    , m_unit( unit )
    , m_queryPage( 0 )
{
    DEBUG_BLOCK
    setButtons( KDialog::Ok | KDialog::Cancel |
                KDialog::User1 ); // User1: clear icon view

    setButtonGuiItem( KDialog::User1, KStandardGuiItem::clear() );
    connect( button( KDialog::User1 ), SIGNAL(clicked()), SLOT(clearView()) );

    m_save = button( KDialog::Ok );

    QSplitter *splitter = new QSplitter( this );
    m_sideBar = new CoverFoundSideBar( m_album, splitter );

    KVBox *vbox = new KVBox( splitter );
    vbox->setSpacing( 4 );

    KHBox *breadcrumbBox = new KHBox( vbox );
    QLabel *breadcrumbLabel = new QLabel( i18n( "Finding cover for" ), breadcrumbBox );
    AlbumBreadcrumbWidget *breadcrumb = new AlbumBreadcrumbWidget( m_album, breadcrumbBox );

    QFont breadcrumbLabelFont;
    breadcrumbLabelFont.setBold( true );
    breadcrumbLabel->setFont( breadcrumbLabelFont );
    breadcrumbLabel->setIndent( 4 );

    connect( breadcrumb, SIGNAL(artistClicked(const QString&)), SLOT(addToCustomSearch(const QString&)) );
    connect( breadcrumb, SIGNAL(albumClicked(const QString&)), SLOT(addToCustomSearch(const QString&)) );

    KHBox *searchBox = new KHBox( vbox );
    vbox->setSpacing( 4 );

    QStringList completionNames;
    QString firstRunQuery( m_album->name() );
    completionNames << firstRunQuery;
    if( m_album->hasAlbumArtist() )
    {
        const QString &name = m_album->albumArtist()->name();
        completionNames << name;
        firstRunQuery += ' ' + name;
    }
    m_query = firstRunQuery;
    m_album->setSuppressImageAutoFetch( true );

    m_search = new KComboBox( searchBox );
    m_search->setEditable( true ); // creates a KLineEdit for the combobox
    m_search->setTrapReturnKey( true );
    m_search->setInsertPolicy( QComboBox::NoInsert ); // insertion is handled by us
    m_search->setCompletionMode( KGlobalSettings::CompletionPopup );
    m_search->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed );
    qobject_cast<KLineEdit*>( m_search->lineEdit() )->setClickMessage( i18n( "Enter Custom Search" ) );
    m_search->completionObject()->setOrder( KCompletion::Insertion );
    m_search->completionObject()->setIgnoreCase( true );
    m_search->completionObject()->setItems( completionNames );
    m_search->insertItem( 0, KStandardGuiItem::find().icon(), QString() );
    m_search->insertSeparator( 1 );
    m_search->insertItem( 2, KIcon("filename-album-amarok"), m_album->name() );
    if( m_album->hasAlbumArtist() )
        m_search->insertItem( 3, KIcon("filename-artist-amarok"), m_album->albumArtist()->name() );

    m_searchButton = new KPushButton( KStandardGuiItem::find(), searchBox );
    KPushButton *sourceButton = new KPushButton( KStandardGuiItem::configure(), searchBox );
    updateSearchButton( firstRunQuery );

    QMenu *sourceMenu = new QMenu( sourceButton );
    QAction *lastFmAct = new QAction( i18n( "Last.fm" ), sourceMenu );
    QAction *googleAct = new QAction( i18n( "Google" ), sourceMenu );
    QAction *yahooAct = new QAction( i18n( "Yahoo!" ), sourceMenu );
    QAction *discogsAct = new QAction( i18n( "Discogs" ), sourceMenu );
    lastFmAct->setCheckable( true );
    googleAct->setCheckable( true );
    yahooAct->setCheckable( true );
    discogsAct->setCheckable( true );
    connect( lastFmAct, SIGNAL(triggered()), this, SLOT(selectLastFm()) );
    connect( googleAct, SIGNAL(triggered()), this, SLOT(selectGoogle()) );
    connect( yahooAct, SIGNAL(triggered()), this, SLOT(selectYahoo()) );
    connect( discogsAct, SIGNAL(triggered()), this, SLOT(selectDiscogs()) );

    m_sortAction = new QAction( i18n( "Sort by size" ), sourceMenu );
    m_sortAction->setCheckable( true );
    connect( m_sortAction, SIGNAL(triggered(bool)), this, SLOT(sortingTriggered(bool)) );

    QActionGroup *ag = new QActionGroup( sourceButton );
    ag->addAction( lastFmAct );
    ag->addAction( googleAct );
    ag->addAction( yahooAct );
    ag->addAction( discogsAct );
    sourceMenu->addActions( ag->actions() );
    sourceMenu->addSeparator();
    sourceMenu->addAction( m_sortAction );
    sourceButton->setMenu( sourceMenu );

    connect( m_search, SIGNAL(returnPressed(const QString&)), SLOT(insertComboText(const QString&)) );
    connect( m_search, SIGNAL(returnPressed(const QString&)), SLOT(processQuery(const QString&)) );
    connect( m_search, SIGNAL(returnPressed(const QString&)), SLOT(updateSearchButton(const QString&)) );
    connect( m_search, SIGNAL(editTextChanged(const QString&)), SLOT(updateSearchButton(const QString&)) );
    connect( m_search->lineEdit(), SIGNAL(clearButtonClicked()), SLOT(clearQueryButtonClicked()));
    connect( m_searchButton, SIGNAL(clicked()), SLOT(processQuery()) );

    m_view = new KListWidget( vbox );
    m_view->setAcceptDrops( false );
    m_view->setContextMenuPolicy( Qt::CustomContextMenu );
    m_view->setDragDropMode( QAbstractItemView::NoDragDrop );
    m_view->setDragEnabled( false );
    m_view->setDropIndicatorShown( false );
    m_view->setMovement( QListView::Static );
    m_view->setGridSize( QSize( 140, 150 ) );
    m_view->setIconSize( QSize( 120, 120 ) );
    m_view->setSpacing( 4 );
    m_view->setViewMode( QListView::IconMode );
    m_view->setResizeMode( QListView::Adjust );

    connect( m_view, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)),
             this,   SLOT(currentItemChanged(QListWidgetItem*, QListWidgetItem*)) );
    connect( m_view, SIGNAL(itemDoubleClicked(QListWidgetItem*)),
             this,   SLOT(itemDoubleClicked(QListWidgetItem*)) );
    connect( m_view, SIGNAL(customContextMenuRequested(const QPoint&)),
             this,   SLOT(itemMenuRequested(const QPoint&)) );

    splitter->addWidget( m_sideBar );
    splitter->addWidget( vbox );
    setMainWidget( splitter );

    const KConfigGroup config = Amarok::config( "Cover Fetcher" );
    const QString source = config.readEntry( "Interactive Image Source", "LastFm" );
    m_sortEnabled = config.readEntry( "Sort by Size", false );
    m_sortAction->setChecked( m_sortEnabled );
    m_isSorted = m_sortEnabled;
    restoreDialogSize( config ); // call this after setMainWidget()

    if( source == "LastFm" )
        lastFmAct->setChecked( true );
    else if( source == "Yahoo" )
        yahooAct->setChecked( true );
    else if( source == "Discogs" )
        discogsAct->setChecked( true );
    else
        googleAct->setChecked( true );

    typedef CoverFetchArtPayload CFAP;
    const CFAP *payload = dynamic_cast< const CFAP* >( unit->payload() );
    if( !m_album->hasImage() )
        m_sideBar->setPixmap( QPixmap::fromImage( m_album->image(190 ) ) );
    else if( payload )
        add( m_album->image(), data, payload->imageSize() );
    else
        add( m_album->image(), data );
    m_view->setCurrentItem( m_view->item( 0 ) );
    updateGui();
    
    connect( The::networkAccessManager(), SIGNAL( requestRedirected( QNetworkReply*, QNetworkReply* ) ),
             this, SLOT( fetchRequestRedirected( QNetworkReply*, QNetworkReply* ) ) );
}
示例#21
0
ReportTableBase::~ReportTableBase()
{
  clearView();
}
示例#22
0
void MainWindow::_init()
{

    setWindowState(Qt::WindowFullScreen);
    m_bPerspectiveProjection = false;
    ui->radioBtnTransformation->hide();
    m_bHideFaces = false;
    m_pView = new CCoordinateView(this);
    m_pView3D = new C3DView(PROJECTION_DEFAULT,this);
    m_pView3D->hide();
//    m_pView->hide();
    //m_pView->hideGrid(true);
    //m_pView->hideGrid(false);

    ui->viewFrameGrid->addWidget(m_pView);
    ui->viewFrameGrid->addWidget(m_pView3D);

    m_pDebugBox = new CDebugModeBox(this);
    ui->sidePanel->addWidget(m_pDebugBox);
    m_pDebugBox->setDisabled(true);

    m_pTmpUndoStack.clear();

    m_firstPoint = QPoint(0,0);
    m_secondPoint = QPoint(0,0);

    m_btnClickState = MCS_UNDEFINED;

    m_pCurrentListener = NULL;

    m_bHighlightInitPoints = false;
    m_mainColor = QColor(Qt::blue);
    //m_mainColor.setAlpha(10);
    m_secondaryColor = QColor(Qt::red);


    ui->btnSecondaryColor->setAutoFillBackground(true);
    ui->btnMainColor->setAutoFillBackground(true);

    m_mode = MODE_NORMAL;


    ui->radioBtnAlgDDA->setChecked(true);
    ui->radioBtnAlgBrezenhema->setChecked(false);

    ui->radioBtnDefaultMode->setChecked(true);
    //defaultModeEnable();

    //ui->debugInfoBrowser->setUndoRedoEnabled(true);

    m_drawShapeType = DST_LINE;

    //m_pListener = new CListenerLineDDA(m_pView, m_pDebugBox,QColor(Qt::red), QColor(Qt::blue));

    connect(m_pView,SIGNAL(clickOnCell(int,int)),this,SLOT(mouseClickOnCell(int,int)));
    connect(m_pView,SIGNAL(moveOnCell(int,int)),this,SLOT(mouseMoveOnCell(int,int)));
    connect(m_pView,SIGNAL(releaseOnScene(int,int)),this,SLOT(mouseReleaseOnCell(int,int)));
//    connect(ui->btnZoomIn,SIGNAL(clicked()),m_pView,SLOT(zoomIn()));
//    connect(ui->btnZoomOut,SIGNAL(clicked()),m_pView,SLOT(zoomOut()));

    connect(ui->btnMainColor,SIGNAL(clicked()),this,SLOT(setMainColor()));
    connect(ui->btnSecondaryColor,SIGNAL(clicked()),this,SLOT(setSecondaryColor()));

    connect(ui->btnClear,SIGNAL(clicked()),this,SLOT(clearView()));

    connect(ui->radioBtnDebugMode,SIGNAL(clicked()),this,SLOT(debugModeEnable()));
    connect(ui->radioBtnDefaultMode,SIGNAL(clicked()),this,SLOT(defaultModeEnable()));


    connect(ui->checkBoxHightlightEndPoints,SIGNAL(clicked()),this,SLOT(highlightEndPoints()));

    connect(ui->radioBtnAlgBrezenhema,SIGNAL(clicked()),this,SLOT(drawAlgorithmChanged()));
    connect(ui->radioBtnAlgDDA,SIGNAL(clicked()),this,SLOT(drawAlgorithmChanged()));
    connect(ui->radioBtnRound,SIGNAL(clicked()),this,SLOT(drawAlgorithmChanged()));
    connect(ui->radioBtnAlgorithmParabola,SIGNAL(clicked()),this,SLOT(drawAlgorithmChanged()));
    connect(ui->radioBtnBSpline,SIGNAL(clicked()),this,SLOT(drawAlgorithmChanged()));
    connect(ui->radioBtnBese,SIGNAL(clicked()),this,SLOT(drawAlgorithmChanged()));
    connect(ui->radioBtnLineFilling,SIGNAL(clicked()),this,SLOT(drawAlgorithmChanged()));
    connect(ui->radioBtnLineVertexFilling,SIGNAL(clicked()),this,SLOT(drawAlgorithmChanged()));
    connect(ui->radioBtnTransformation,SIGNAL(clicked()),this,SLOT(drawAlgorithmChanged()));


    connect(ui->tabAlgorithms,SIGNAL(currentChanged(int)),this,SLOT(algorithmTabIndexChanged(int)));
    connect(ui->zoomSlider,SIGNAL(valueChanged(int)),this,SLOT(zoomChanged(int)));


    connect(ui->checkBoxHightlight,SIGNAL(clicked()),this,SLOT(perspectiveProjection()));
    connect(ui->checkBoxHideFaces,SIGNAL(clicked()),this,SLOT(hideFaces()));

    //connect(ui->btnRunThread, SIGNAL(clicked()),this,SLOT(runThread()));

    ui->radioBtnAlgDDA->setChecked(true);
    ui->radioBtnAlgBrezenhema->setChecked(false);
    ui->radioBtnDefaultMode->setChecked(true);

    createListeners();
    ui->radioBtnAlgDDA->click();

    _setMainColor(m_mainColor);
    _setSecondaryColor(m_secondaryColor);


//    CAlgorithmVertexLineFilling alg;
//    QList<QPoint> list;
//    list << QPoint(0,0) << QPoint(20,0) << QPoint(10,10) ;//<< QPoint(20,20) << QPoint(20,0);// << QPoint(20,20) << QPoint(-15,3);
//    alg.setPoints(list);
//    //qDebug() << alg.getDrawPoints();
//    StepPoints points = alg.getDrawPoints();
//    for(int i=0; i<points.size();i++)
//    {
//        m_pView->setCellColor(points.at(i),m_mainColor);
//    }

    m_lastZoomValue = ui->zoomSlider->value();
}
示例#23
0
GUIAttrEdit::~GUIAttrEdit() {
	clearView();
}