[ImoLUG] QtSwaret

Golinelli Luca l.golinelli@linuxtimes.net
Mar 12 Ott 2004 11:43:15 CEST


Ho il codice per lanciare il processo!

proc = new QProcess;
    Kswaret::proc = proc;
    proc->addArgument("swaret");
    proc->addArgument("--upgrade");
    
    /**
      * sets the options window settings
      */
    if(Keyword.isNull()){
	proc->addArgument(".");
    }
    else{
	proc->addArgument(Keyword);
    }
    
    switch(UpgradeSelection){
	
	case 1:
	    proc->addArgument("-i");
	    break;
	case 2:
	    proc->addArgument("-ip");
	    break;
	case 3:
	    proc->addArgument("-ie");
	    break;
    }
    
    ExcludeLabel = new QLabel("Making a List of all<br>available Packages", this);
    ExcludeLabel->move(5,0);
    ExcludeLabel->setFixedSize(140, 40);
    QFont Font(ExcludeLabel->font());
    Font.setPointSize(10);
    ExcludeLabel->setFont(Font);
    ExcludeLabel->setAlignment(Qt::AlignHCenter);
    ExcludeLabel->show();
    PWin = new PackageWindow;
    
    Kswaret::DownloadingLabelShared->setText("Downloading");
    Kswaret::DownloadingProgressShared->setText("");
	
    connect(proc, SIGNAL(readyReadStdout()), this, SLOT(readOut()) );
    connect(proc, SIGNAL(processExited()), this, SLOT(ProcFinished()) );
    this->show();
    proc->start();

---
Luca Golinelli
ImoLUG Staff

ImoLUG - The Imola Linux User Group
http://www.imolug.org - info@imolug.org


Maggiori informazioni sulla lista Imolug