1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299
|
Comment: This patch is deactivated but do NOT delete it.
It enables compilation of the package but needs more work which is explained in
https://lists.debian.org/debian-mentors/2017/12/msg00025.html
Author: Andreas Tille <tille@debian.org>
Last-Update: Sat, 02 Dec 2017 17:06:16 +0100
Description: Migration from Qt4 to Qt5
--- a/gui/mainwindowimpl.cpp
+++ b/gui/mainwindowimpl.cpp
@@ -1,9 +1,11 @@
#include "mainwindowimpl.h"
#include <QDBusConnection>
#include <QDBusMessage>
-
+#include <QtPrintSupport/QPrinter>
+#include <QMessageBox>
+#include <QFileDialog>
//
-MainWindowImpl::MainWindowImpl( QWidget * parent, Qt::WFlags f):QMainWindow(parent, f) {
+MainWindowImpl::MainWindowImpl( QWidget * parent, Qt::WindowFlags f):QMainWindow(parent, f) {
param=new ParamQt();
outputFile=NULL;
data=NULL;
@@ -313,8 +315,8 @@ void MainWindowImpl::on_actionExtractIte
{
//Select iterations to combine
bool ok;
- int istart = QInputDialog::getInteger(this, tr("Start Sample Number"),tr("Enter the mininum sample number:"), 0, 0, 2147483647, 1, &ok);
- int iend = QInputDialog::getInteger(this, tr("End Sample Number"),tr("Enter the maximum sample number:"), 0, 0, 2147483647, 1, &ok);
+ int istart = QInputDialog::getInt(this, tr("Start Sample Number"),tr("Enter the mininum sample number:"), 0, 0, 2147483647, 1, &ok);
+ int iend = QInputDialog::getInt(this, tr("End Sample Number"),tr("Enter the maximum sample number:"), 0, 0, 2147483647, 1, &ok);
QString qstr = QFileDialog::getSaveFileName(this, tr("Save output file"),".","XML files (*.xml);;All files (*)");
on_actionExtractIterations_activated(qstr,istart,iend);
}
@@ -344,7 +346,7 @@ void MainWindowImpl::on_actionThinIterat
{
//Select iterations to combine
bool ok;
- int thin = QInputDialog::getInteger(this, tr("Thin Amount"),tr("Enter the thinning step:"), 0, 0, 2147483647, 1, &ok);
+ int thin = QInputDialog::getInt(this, tr("Thin Amount"),tr("Enter the thinning step:"), 0, 0, 2147483647, 1, &ok);
QString qstr = QFileDialog::getSaveFileName(this, tr("Save output file"),".","XML files (*.xml);;All files (*)");
on_actionThinIterations_activated(qstr,thin);
}
@@ -362,7 +364,7 @@ void MainWindowImpl::on_actionOnly_one_g
actionAll_genes->setChecked(false);
actionOnly_one_gene->setChecked(true);
bool ok;
- int i = QInputDialog::getInteger(this, tr("Pick a gene"),tr("Show events for gene number:"), 1, 1, param->getData()->getB(), 1, &ok);
+ int i = QInputDialog::getInt(this, tr("Pick a gene"),tr("Show events for gene number:"), 1, 1, param->getData()->getB(), 1, &ok);
if (ok) param->setGene(i);
repaint();
}
@@ -532,7 +534,7 @@ void MainWindowImpl::on_actionMajority_r
{
if (outputFile==NULL) {QMessageBox::about(0,"Information","Need some data first.");return;}
bool ok=true;
- if(cutoff<0) cutoff=QInputDialog::getInteger(this,"Enter cutoff","Enter value of cutoff for majority-rule consensus:",95,0,100,1,&ok);
+ if(cutoff<0) cutoff=QInputDialog::getInt(this,"Enter cutoff","Enter value of cutoff for majority-rule consensus:",95,0,100,1,&ok);
if (!ok || cutoff>100) return;
ParamTreeCons * paramtreecons=new ParamTreeCons();
paramtreecons->setBlocks(outputFile->getBlocks());
@@ -715,7 +717,7 @@ void MainWindowImpl::on_actionPd_map_act
if (outputFile==NULL) {QMessageBox::about(0,"Information","Need some data first.");return;}
bool ok;
- int sitejump=QInputDialog::getInteger(this,"Site Sample Rate","Enter gap between evaluated sites:",1,1,10000,1,&ok);
+ int sitejump=QInputDialog::getInt(this,"Site Sample Rate","Enter gap between evaluated sites:",1,1,10000,1,&ok);
if(!ok) return;
if(!param->displaySet()) param->newDisplayTree(param->getTree());
outputFile->startOver();
@@ -831,7 +833,7 @@ void MainWindowImpl::on_actionPrev_site_
void MainWindowImpl::on_actionSet_cutoff_activated()
{
bool ok;
- int cutoff=QInputDialog::getInteger(this,"Enter cutoff","Enter value of cutoff:",explorerCutoff,0,100,1,&ok);
+ int cutoff=QInputDialog::getInt(this,"Enter cutoff","Enter value of cutoff:",explorerCutoff,0,100,1,&ok);
if (!ok) return;
explorerCutoff=cutoff;
((ParamMR*)param)->consensus(explorerCutoff,explorerSite);
@@ -841,7 +843,7 @@ void MainWindowImpl::on_actionSet_cutoff
void MainWindowImpl::on_actionJump_to_site_activated()
{
bool ok;
- int site=QInputDialog::getInteger(this,"Enter site","Enter number of site:",explorerSite,0,param->getData()->getL()-1,1,&ok);
+ int site=QInputDialog::getInt(this,"Enter site","Enter number of site:",explorerSite,0,param->getData()->getL()-1,1,&ok);
if (!ok) return;
jumpToSite(site);
}
@@ -858,7 +860,7 @@ void MainWindowImpl::on_actionExport_mov
{
QString qstr = QFileDialog::getSaveFileName(this, tr("Save movie file"),".",tr("WMV files (*.wmv);;AVI files (*.avi)"));
if (qstr==NULL) return;
- bool ok;int step=QInputDialog::getInteger(this,"Enter step","Enter value of step:",1,1,100000,1,&ok);if (!ok) return;
+ bool ok;int step=QInputDialog::getInt(this,"Enter step","Enter value of step:",1,1,100000,1,&ok);if (!ok) return;
QImage image(width(),height(),QImage::Format_ARGB32);
explorerSite=0;
QString time=QTime::currentTime().toString();
@@ -887,7 +889,7 @@ void MainWindowImpl::on_actionExport_CSV
{
QString qstr = QFileDialog::getSaveFileName(this, tr("Export to CSV"),".","CSV index files (*.csv);;All files (*)");
if (qstr==NULL) return;
- bool ok;int step=QInputDialog::getInteger(this,"Enter step","Enter value of step:",1,1,100000,1,&ok);if (!ok) return;
+ bool ok;int step=QInputDialog::getInt(this,"Enter step","Enter value of step:",1,1,100000,1,&ok);if (!ok) return;
QFile file(qstr);
if ( !file.open(QIODevice::WriteOnly)) return;
QTextStream out(&file);
--- a/gui/gui.pro
+++ b/gui/gui.pro
@@ -3,7 +3,9 @@ QT = gui \
core \
xml \
svg \
- dbus
+ dbus \
+ printsupport \
+ widgets
CONFIG += qt \
warn_on \
console \
--- a/gui/colouredimpl.cpp
+++ b/gui/colouredimpl.cpp
@@ -1,6 +1,6 @@
#include "colouredimpl.h"
//
-ColouredImpl::ColouredImpl( QWidget * parent, Qt::WFlags f)
+ColouredImpl::ColouredImpl( QWidget * parent, Qt::WindowFlags f)
: QDialog(parent, f)
{
setAttribute(Qt::WA_DeleteOnClose);
--- a/gui/colouredimpl.h
+++ b/gui/colouredimpl.h
@@ -9,7 +9,7 @@ class ColouredImpl : public QDialog, pub
{
Q_OBJECT
public:
- ColouredImpl( QWidget * parent = 0, Qt::WFlags f = 0 );
+ ColouredImpl( QWidget * parent = 0, Qt::WindowFlags f = 0 );
private:
void closeEvent(QCloseEvent * event);
private slots:
--- a/gui/gelmanrubinimpl.cpp
+++ b/gui/gelmanrubinimpl.cpp
@@ -1,6 +1,7 @@
#include "gelmanrubinimpl.h"
+#include <QFileDialog>
//
-GelmanRubinImpl::GelmanRubinImpl( QWidget * parent, Qt::WFlags f)
+GelmanRubinImpl::GelmanRubinImpl( QWidget * parent, Qt::WindowFlags f)
: QDialog(parent, f) {
setupUi(this);
param=NULL;
--- a/gui/gelmanrubinimpl.h
+++ b/gui/gelmanrubinimpl.h
@@ -23,7 +23,7 @@ class GelmanRubinImpl : public QDialog,
{
Q_OBJECT
public:
- GelmanRubinImpl( QWidget * parent = 0, Qt::WFlags f = 0 );
+ GelmanRubinImpl( QWidget * parent = 0, Qt::WindowFlags f = 0 );
void compute(ParamQt*param,OutputFile*outputFile,QStringList*others, ostream* out=NULL,bool getparams=true,bool getnumedges=true,bool getpairwisedists=false);
void computeTree(ParamQt*,QStringList*,ostream* out=NULL);
void outputTracer(ParamQt*param,OutputFile*outputfile,QString*qstr,bool csv=false,bool getparams=true,bool getnumedges=true,bool getpairwisedists=false);
--- a/gui/heatimpl.cpp
+++ b/gui/heatimpl.cpp
@@ -1,6 +1,8 @@
#include "heatimpl.h"
+#include <QtPrintSupport/QPrinter>
+#include <QFileDialog>
//
-HeatImpl::HeatImpl(int n, QWidget * parent, Qt::WFlags f)
+HeatImpl::HeatImpl(int n, QWidget * parent, Qt::WindowFlags f)
: QMainWindow(parent, f) {
this->n=n;
states=vector<vector<double> >(n,vector<double>(n,0.0));
--- a/gui/heatimpl.h
+++ b/gui/heatimpl.h
@@ -13,7 +13,7 @@ class HeatImpl : public QMainWindow, pub
{
Q_OBJECT
public:
- HeatImpl(int n, QWidget * parent = 0, Qt::WFlags f = 0 );
+ HeatImpl(int n, QWidget * parent = 0, Qt::WindowFlags f = 0 );
void account(ParamQt * p);
void compute();
void compute_correct(int mode);
--- a/gui/mainwindowimpl.h
+++ b/gui/mainwindowimpl.h
@@ -14,11 +14,12 @@
#include "heatimpl.h"
#include "pdimpl.h"
#include "pheatimpl.h"
+#include <QFileDialog>
//
class MainWindowImpl : public QMainWindow, public Ui::MainWindow {
Q_OBJECT
public:
- MainWindowImpl( QWidget * parent = 0, Qt::WFlags f = 0 );
+ MainWindowImpl( QWidget * parent = 0, Qt::WindowFlags f = 0 );
virtual ~MainWindowImpl();
void openXMLFile(QStringList qstrs);
void doColourPlot(QStringList*nodes,QStringList*colors,bool denDep,bool colDep);
--- a/gui/pdimpl.cpp
+++ b/gui/pdimpl.cpp
@@ -1,6 +1,8 @@
#include "pdimpl.h"
+#include <QtPrintSupport/QPrinter>
+#include <QFileDialog>
//
-PdImpl::PdImpl(int n, int dist, QWidget * parent, Qt::WFlags f)
+PdImpl::PdImpl(int n, int dist, QWidget * parent, Qt::WindowFlags f)
: QMainWindow(parent, f) {
this->n=n;
sitedist=dist;
--- a/gui/pdimpl.h
+++ b/gui/pdimpl.h
@@ -13,7 +13,7 @@ class PdImpl : public QMainWindow, publi
{
Q_OBJECT
public:
- PdImpl(int n, int dist=1, QWidget * parent = 0, Qt::WFlags f = 0 );
+ PdImpl(int n, int dist=1, QWidget * parent = 0, Qt::WindowFlags f = 0 );
void account(ParamQt * p);
void compute(int mode);
void print(ostream* f_out);
--- a/gui/pheatimpl.cpp
+++ b/gui/pheatimpl.cpp
@@ -1,6 +1,8 @@
#include "pheatimpl.h"
+#include <QtPrintSupport/QPrinter>
+#include <QFileDialog>
//
-PHeatImpl::PHeatImpl(int n, bool reldists, QWidget * parent, Qt::WFlags f)
+PHeatImpl::PHeatImpl(int n, bool reldists, QWidget * parent, Qt::WindowFlags f)
: QMainWindow(parent, f) {
this->n=n;
this->reldists=reldists;
--- a/gui/pheatimpl.h
+++ b/gui/pheatimpl.h
@@ -13,7 +13,7 @@ class PHeatImpl : public QMainWindow, pu
{
Q_OBJECT
public:
- PHeatImpl(int n, bool reldists=true, QWidget * parent = 0, Qt::WFlags f = 0 );
+ PHeatImpl(int n, bool reldists=true, QWidget * parent = 0, Qt::WindowFlags f = 0 );
void account(ParamQt * p);
void compute(int mode);
void print(ostream* f_out);
--- a/gui/plotimpl.cpp
+++ b/gui/plotimpl.cpp
@@ -1,6 +1,8 @@
#include "plotimpl.h"
+#include <QtPrintSupport/QPrinter>
+#include <QFileDialog>
//
-PlotImpl::PlotImpl( QWidget * parent, Qt::WFlags f)
+PlotImpl::PlotImpl( QWidget * parent, Qt::WindowFlags f)
: QDialog(parent, f) {
mode=0;
setupUi(this);
--- a/gui/plotimpl.h
+++ b/gui/plotimpl.h
@@ -14,7 +14,7 @@ using namespace std;
class PlotImpl : public QDialog, public Ui::Plot {
Q_OBJECT
public:
- PlotImpl( QWidget * parent = 0, Qt::WFlags f = 0 );
+ PlotImpl( QWidget * parent = 0, Qt::WindowFlags f = 0 );
~PlotImpl();
//void extractValues(QDomDocument * domDoc,string str);
//void extractStat(QDomDocument * domDoc,string str,int b=1,int L=1);
--- a/gui/paramcons.h
+++ b/gui/paramcons.h
@@ -1,5 +1,6 @@
#ifndef PARAMCONS_H
#define PARAMCONS_H
+#include <QMessageBox>
//
#include "paramqt.h"
#include "densityontree.h"
--- a/gui/paramconsmult.h
+++ b/gui/paramconsmult.h
@@ -3,6 +3,7 @@
//
#include "paramqt.h"
#include "densityontree.h"
+#include <QMessageBox>
//
class ParamConsMult : public ParamQt
{
--- a/gui/gui.cpp
+++ b/gui/gui.cpp
@@ -5,6 +5,7 @@
#include "../warg/src/mpiutils.h"
#include "mainapplicationdbusadaptor.h"
#include <QDBusConnection>
+#include <getopt.h>
bool verbose=false;
|