Esempio n. 1
0
void ProfileWidget::s_buttonClicked(int row, int col) {
    if(col == 4) {
        s_accept(row);
        ClearTable();
        populateTable();
    }else if(col == 5) {
        s_decline(row);
        ClearTable();
        populateTable();
    }
}
Esempio n. 2
0
File: rmap.cpp Progetto: 87maxi/oom
void RouteMapDock::btnCopyClicked(bool)/*{{{*/
{
	QList<int> rows = getSelectedRows();
	if (!rows.isEmpty())
	{
		int id = rows.at(0);
		QStandardItem* item = _listModel->item(id, 1);
		if(item)
		{
			QString tname = item->text();
			QString origname = routePath + "/" + tname + ".orm";
			QString part = " - Copy";
			QFileInfo f(origname);
			if(f.exists() && f.isFile() && f.isWritable())
			{
				QFile file(f.filePath());
				part += " ";
				for(int i = 1; true; ++i)
				{
					QString n;
					n.setNum(i);
					QString s = part + n;
					if(file.copy(routePath + "/" + tname + s + ".orm"))
						break;
				}
				populateTable(-1);
			}
		}
	}
}/*}}}*/
Esempio n. 3
0
File: rmap.cpp Progetto: 87maxi/oom
RouteMapDock::RouteMapDock(QWidget* parent) : QFrame(parent)
{
	setupUi(this);
	routeList->installEventFilter(oom);
	_listModel = new QStandardItemModel(routeList);
	routeList->setModel(_listModel);
	//routeList->setObjectName("rmDockRouteList");

	btnDelete->setIcon(*garbageIconSet3);
	//btnDelete->setIconSize(garbagePCIcon->size());
	btnAdd->setIcon(*plusIconSet3);
	//btnAdd->setIconSize(addTVIcon->size());
	btnEdit->setIcon(*route_editIconSet3);
	//btnEdit->setIconSize(midi_edit_instrumentIcon->size());
	btnLoad->setIcon(*loadIconSet3);
	//btnLoad->setIconSize(midi_reset_instrIcon->size());
	btnCopy->setIcon(*duplicateIconSet3);
	//btnCopy->setIconSize(duplicatePCIcon->size());
	btnLink->setIcon(*connectIconSet3);
	//btnLink->setIconSize(midi_inputpluginsIcon->size());
	btnClear->setIcon(*garbageIconSet3);
	//btnClear->setIconSize(midi_inputpluginsIcon->size());

	connect(btnDelete, SIGNAL(clicked(bool)), SLOT(btnDeleteClicked(bool)));
	connect(btnAdd, SIGNAL(clicked(bool)), SLOT(btnAddClicked(bool)));
	connect(btnEdit, SIGNAL(clicked(bool)), SLOT(btnEditClicked(bool)));
	connect(btnLoad, SIGNAL(clicked(bool)), SLOT(btnLoadClicked(bool)));
	connect(btnCopy, SIGNAL(clicked(bool)), SLOT(btnCopyClicked(bool)));
	connect(btnLink, SIGNAL(clicked(bool)), SLOT(btnLinkClicked(bool)));
	connect(btnClear, SIGNAL(clicked(bool)), SLOT(btnClearClicked(bool)));
	connect(_listModel, SIGNAL(itemChanged(QStandardItem*)), SLOT(renameRouteMap(QStandardItem*)));
	connect(song, SIGNAL(songChanged(int)), SLOT(songChanged(int)));
	populateTable(-1);
}
Esempio n. 4
0
File: rmap.cpp Progetto: 87maxi/oom
void RouteMapDock::btnDeleteClicked(bool)/*{{{*/
{
	QList<int> rows = getSelectedRows();
	if (!rows.isEmpty())
	{
		int id = rows.at(0);
		QStandardItem* item = _listModel->item(id, 1);
		if(item)
		{
			QString tname = item->text();
			tname = routePath + "/" + tname + ".orm";
			//printf("RouteMapDock::btnDeleteClicked() Deleting: %s\n", tname.toLatin1().constData());
			QFileInfo f(tname);
			if(f.exists() && f.isFile() && f.isWritable())
			{
				QFile file(f.filePath());
				if(QMessageBox::question(this, QString("OOMidi: Delete?"),
										tr("Are you sure you want to delete route map from disk?\n\n%1")
										.arg(file.fileName()), QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok)
				{
					file.remove();
					populateTable(-1);
				}
			}
			//oom->loadRouteMapping(tname);
		}
	}
}/*}}}*/
Esempio n. 5
0
//--------------------utech--------------------utech--------------------utech--------------------
UWidgetPrintPlatijky::UWidgetPrintPlatijky(QDate cDate=QDate(), QWidget *parent)
        : QWidget(parent)
{
	ui.setupUi(this);
	
	QDate date=QDate::currentDate();
	ui.dateEdit_platijkaDate->setDate(date);
	ui.dateEdit_pererahunokZaMisyac->setDate(cDate);
	
	ui.tableWidget_organizacii->setColumnHidden(0, true);
	ui.tableWidget_organizacii->setColumnHidden(9, true);
	ui.tableWidget_organizacii->setColumnWidth(1, 50);
	ui.tableWidget_organizacii->setColumnWidth(2, 300);
	ui.tableWidget_organizacii->setColumnWidth(3, 70);
	ui.tableWidget_organizacii->setColumnWidth(4, 300);
	ui.tableWidget_organizacii->setColumnWidth(5, 60);
	ui.tableWidget_organizacii->setColumnWidth(6, 200);
	ui.tableWidget_organizacii->setColumnWidth(7, 60);
	ui.tableWidget_organizacii->setColumnWidth(8, 100);
	populateTable(true);
	
	connect(ui.pushButton_selectAll, SIGNAL(clicked ()), this, SLOT(pushButton_selectAll_clicked()));
	connect(ui.pushButton_deselectAll, SIGNAL(clicked ()), this, SLOT(pushButton_deselectAll_clicked()));
	connect(ui.pushButton_addRow, SIGNAL(clicked ()), this, SLOT(pushButton_addRow_clicked()));
	connect(ui.pushButton_deleteRow, SIGNAL(clicked ()), this, SLOT(pushButton_deleteRow_clicked()));
	connect(ui.pushButton_readSumyOplat, SIGNAL(clicked ()), this, SLOT(pushButton_readSumyOplat_clicked()));
	connect(ui.pushButton_createCurPlatijka, SIGNAL(clicked ()), this, SLOT(pushButton_createCurPlatijka_clicked()));
	connect(ui.pushButton_createSelectedPlatijky, SIGNAL(clicked ()), this, SLOT(pushButton_createSelectedPlatijky_clicked()));
	
	connect(ui.tableWidget_organizacii->selectionModel(), SIGNAL(currentRowChanged (const QModelIndex &,const QModelIndex &)), this, SLOT(tableWidget_currentRowChanged()));
	
	pushButton_readSumyOplat_clicked();
	tableWidget_currentRowChanged();
}
RemoteCommandConfigWidget::RemoteCommandConfigWidget(Transport* t, QWidget *parent) :
		QWidget(parent),
		ui(new Ui::RemoteCommandConfigWidget)
{
	Q_ASSERT(t);
	qDebug() << "RemoteCommandConfigWidget::RemoteCommandConfigWidget for" << t->getDescription();
	current = NULL;
	transport = t;
	ui->setupUi(this);

	connect(ui->commandTable, SIGNAL(clicked(QModelIndex)), this, SLOT(commandTableClicked(QModelIndex)));
	connect(ui->saveCommandButton, SIGNAL(clicked()), this, SLOT(saveCurrent()));
	connect(ui->addCommandButton, SIGNAL(clicked()), this, SLOT(addNewCommand()));
	connect(ui->removeCommandButton, SIGNAL(clicked()), this, SLOT(deleteCurrent()));
	connect(ui->testCommandButton, SIGNAL(clicked()), this, SLOT(testCurrent()));

	connect(ui->commandEdit, SIGNAL(textEdited(QString)), this, SLOT(madeUpdate()));
	connect(ui->timeoutSpin, SIGNAL(valueChanged(int)), this, SLOT(madeUpdate()));
	connect(ui->reconnectCheck, SIGNAL(toggled(bool)), this, SLOT(madeUpdate()));
	connect(ui->retiesSpin, SIGNAL(valueChanged(int)), this, SLOT(madeUpdate()));

	model.setHorizontalHeaderLabels(QStringList() << "Section" << "Remote Command Description");
	ui->commandTable->setModel(&model);
	ui->commandTable->horizontalHeader()->setStretchLastSection(true);

	populateTable();

	if (model.rowCount()>0)
	{
		ui->commandTable->selectRow(0);
		commandTableClicked(ui->commandTable->currentIndex());
	}
}
Esempio n. 7
0
NogoodDialog::NogoodDialog(
    QWidget* parent, TreeCanvas& tc, const std::vector<int>& selected_nodes,
    const std::unordered_map<int64_t, std::string>& sid2nogood)
    : QDialog(parent), _tc(tc), _sid2nogood(sid2nogood) {
  _model = new QStandardItemModel(0, 2, this);

  _nogoodTable = new QTableView(this);
  _nogoodTable->setEditTriggers(QAbstractItemView::NoEditTriggers);
  _nogoodTable->setSelectionBehavior(QAbstractItemView::SelectRows);

  QStringList tableHeaders;
  tableHeaders << "node id"
               << "clause";
  _model->setHorizontalHeaderLabels(tableHeaders);

  _nogoodTable->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
  _nogoodTable->setSortingEnabled(true);
  _nogoodTable->horizontalHeader()->setStretchLastSection(true);

  connect(_nogoodTable, SIGNAL(doubleClicked(const QModelIndex&)), this,
          SLOT(selectNode(const QModelIndex&)));

  resize(DEFAULT_WIDTH, DEFAULT_HEIGHT);

  QHBoxLayout* layout = new QHBoxLayout(this);

  populateTable(selected_nodes);

  _proxy_model = new MyProxyModel(this);
  _proxy_model->setSourceModel(_model);

  _nogoodTable->setModel(_proxy_model);

  layout->addWidget(_nogoodTable);
}
Esempio n. 8
0
File: rmap.cpp Progetto: 87maxi/oom
void RouteMapDock::updateRouteMap(QString _name, QString note)/*{{{*/
{
	if(_name.isEmpty())
		return;
	oom->updateRouteMapping(routePath + "/" + _name + ".orm", note);
	populateTable(-1);
}/*}}}*/
Esempio n. 9
0
ReportViewer::ReportViewer(QString report, QWidget *parent) :
    QDialog(parent),
    ui(new Ui::ReportViewer)
{
    ui->setupUi(this);
    populateTable(report);
}
Esempio n. 10
0
void ProRataPeptideTable::cleanUp()
{
	vpepInfo.clear();
	populateTable();
	emit flushGraph();
	return;

}
Esempio n. 11
0
File: rmap.cpp Progetto: 87maxi/oom
void RouteMapDock::btnAddClicked(bool)/*{{{*/
{
	RouteMapDialog* rmd = new RouteMapDialog(false, this);
	connect(rmd, SIGNAL(saveRouteMap(QString, QString)), SLOT(saveRouteMap(QString, QString)));
	rmd->exec();
	if(rmd)
		delete rmd;
	populateTable(-1);
}/*}}}*/
Esempio n. 12
0
QgsAuthMethodPlugins::QgsAuthMethodPlugins( QWidget *parent )
    : QDialog( parent )
{
  setupUi( this );
  connect( buttonBox, SIGNAL( rejected() ), this, SLOT( reject() ) );

  setupTable();
  populateTable();
}
Esempio n. 13
0
void TrackListView::songChanged(int flags)/*{{{*/
{
    if(flags & (SC_TRACK_INSERTED | SC_TRACK_REMOVED | SC_TRACK_MODIFIED | SC_PART_INSERTED | SC_PART_REMOVED | SC_PART_MODIFIED/*| SC_PART_COLOR_MODIFIED*/))
    {
        if(debugMsg)
            printf("TrackListView::songChanged\n");
        if(!m_editing)
            populateTable();
    }
}/*}}}*/
Esempio n. 14
0
QgsSymbolLevelsV2Dialog::QgsSymbolLevelsV2Dialog( QgsLegendSymbolList list, bool usingSymbolLevels, QWidget* parent )
    : QDialog( parent ), mList( list ), mForceOrderingEnabled( false )
{
  setupUi( this );

  QSettings settings;
  restoreGeometry( settings.value( "/Windows/symbolLevelsDlg/geometry" ).toByteArray() );

  tableLevels->setItemDelegate( new SpinBoxDelegate( this ) );

  chkEnable->setChecked( usingSymbolLevels );

  connect( chkEnable, SIGNAL( clicked() ), this, SLOT( updateUi() ) );

  if ( mList.count() > 0 && !mList[0].second )
  {
    // remove symbolless entry (probably classifier of categorized renderer)
    mList.removeFirst();
  }

  int maxLayers = 0;
  tableLevels->setRowCount( mList.count() );
  for ( int i = 0; i < mList.count(); i++ )
  {
    QgsSymbolV2* sym = mList[i].second;

    // set icons for the rows
    QIcon icon = QgsSymbolLayerV2Utils::symbolPreviewIcon( sym, QSize( 16, 16 ) );
    tableLevels->setVerticalHeaderItem( i, new QTableWidgetItem( icon, QString() ) );

    // find out max. number of layers per symbol
    int layers = sym->symbolLayerCount();
    if ( layers > maxLayers )
      maxLayers = layers;
  }

  tableLevels->setColumnCount( maxLayers + 1 );
  tableLevels->setHorizontalHeaderItem( 0, new QTableWidgetItem( QString() ) );
  for ( int i = 0; i < maxLayers; i++ )
  {
    QString name = tr( "Layer %1" ).arg( i );
    tableLevels->setHorizontalHeaderItem( i + 1, new QTableWidgetItem( name ) );
  }

  mMaxLayers = maxLayers;

  updateUi();

  if ( !usingSymbolLevels )
    setDefaultLevels();

  populateTable();

  connect( tableLevels, SIGNAL( cellChanged( int, int ) ), this, SLOT( renderingPassChanged( int, int ) ) );
}
Esempio n. 15
0
void ProRataProteinTable::sortColumn( int iColumn, bool bIsAscending )
{
	if( bIsAscending )
	{
		iCurrentColumnSorted = iColumn;
		bIsCurrentSortAscending = true;
		qtwTable->horizontalHeader()->setSortIndicator( iColumn, Qt::AscendingOrder );
		switch ( iColumn )
		{
		case (0):
			mainProteomeInfoInstance->sortProteinInfo( vproInfo, "locus" );
			break;
		case (1):
			mainProteomeInfoInstance->sortProteinInfo( vproInfo, "log2Ratio" );
			break;
		case (2):
			mainProteomeInfoInstance->sortProteinInfo( vproInfo, "widthCI" );
			break;
		case (3):
			mainProteomeInfoInstance->sortProteinInfo( vproInfo, "description" );
			break;
		default:
			break;
		}

	}
	else
	{
		iCurrentColumnSorted = iColumn;
		bIsCurrentSortAscending = false;
		qtwTable->horizontalHeader()->setSortIndicator( iColumn, Qt::DescendingOrder );
		switch ( iColumn )
		{
		case (0):
			mainProteomeInfoInstance->sortProteinInfoDescending( vproInfo, "locus" );
			break;
		case (1):
			mainProteomeInfoInstance->sortProteinInfoDescending( vproInfo, "log2Ratio" );
			break;
		case (2):
			mainProteomeInfoInstance->sortProteinInfoDescending( vproInfo, "widthCI" );
			break;
		case (3):
			mainProteomeInfoInstance->sortProteinInfoDescending( vproInfo, "description" );
			break;
		default:
			break;
		}

	}
	emit flushGraph();
	populateTable();


}
Esempio n. 16
0
void ProRataPeptideTable::sortColumn( int iColumn, bool bIsAscending )
{
	if( bIsAscending )
	{
		iCurrentColumnSorted = iColumn;
		bIsCurrentSortAscending = true;
		qtwTable->horizontalHeader()->setSortIndicator( iColumn, Qt::AscendingOrder );
		switch ( iColumn )
		{
			case (0):
				mainProteomeInfoInstance->sortPeptideInfo( vpepInfo, "sequence" );
				break;
			case (1):
				mainProteomeInfoInstance->sortPeptideInfo( vpepInfo, "log2Ratio" );
				break;
			case (2):
				mainProteomeInfoInstance->sortPeptideInfo( vpepInfo, "log2SN" );
				break;
			case (3):
				mainProteomeInfoInstance->sortPeptideInfo( vpepInfo, "validity" );
				break;
			default:
				break;
		}

	}
	else
	{
		iCurrentColumnSorted = iColumn;
		bIsCurrentSortAscending = false;
		qtwTable->horizontalHeader()->setSortIndicator( iColumn, Qt::DescendingOrder );
		switch ( iColumn )
		{
		case (0):
			mainProteomeInfoInstance->sortPeptideInfoDescending( vpepInfo, "sequence" );
			break;
		case (1):
			mainProteomeInfoInstance->sortPeptideInfoDescending( vpepInfo, "log2Ratio" );
			break;
		case (2):
			mainProteomeInfoInstance->sortPeptideInfoDescending( vpepInfo, "log2SN" );
			break;
		case (3):
			mainProteomeInfoInstance->sortPeptideInfoDescending( vpepInfo, "validity" );
			break;
		default:
			break;
		}

	}
	emit flushGraph();
	populateTable();

}
Esempio n. 17
0
void ShoppingDisplay::on_priceButton_clicked(){
    Heap<Item, QString> *copyHeap = new Heap<Item, QString>;
    Heap<Item, float> *newHeap  = new Heap<Item, float>;
    copyHeap->populate(*defaultHeap);
    while(copyHeap->size() > 0){
        newHeap->insert(copyHeap->min(), copyHeap->min().price);
        copyHeap->removeMin();
    }
    populateTable(newHeap);

}
Esempio n. 18
0
void TrackListView::displayRoleChanged(int role)/*{{{*/
{
    switch(role)
    {
        case Qt::Checked:
            m_displayRole = PartRole;
        break;
        case Qt::Unchecked:
            m_displayRole = TrackRole;
        break;
    }
    populateTable();
}/*}}}*/
Esempio n. 19
0
AddEntry::AddEntry(QStackedWidget *parent, UnitRegister& regRef, CommInterface& comRef) :
    QWidget(parent),
    ui(new Ui::AddEntry)
{
    ui->setupUi(this);
    this->setAccessibleName("Add Entry");

    parentPtr = parent;
    setRegistryPtr(regRef);
    setCommPtr(comRef);
    setTablePtr(this->findChild<QTableWidget*>("entry_Table"));
    populateTable();
}
Esempio n. 20
0
File: rmap.cpp Progetto: 87maxi/oom
void RouteMapDock::btnLoadClicked(bool)/*{{{*/
{
	QList<int> rows = getSelectedRows();
	if (!rows.isEmpty())
	{
		int id = rows.at(0);
		QStandardItem* item = _listModel->item(id, 1);
		if(item)
		{
			QString tname = item->text();
			tname = routePath + "/" + tname + ".orm";
			oom->loadRouteMapping(tname);
		}
	}
	populateTable(-1);
}/*}}}*/
Esempio n. 21
0
void ProRataPeptideTable::newProteinClicked( ProteinInfo * pproInfo )
{
	if (!(pproInfo))
	{
		vpepInfo.clear();
		populateTable();
		return;
	}
	vpepInfo.clear();
	vpepInfo = pproInfo->getPeptideInfo();	
	//populateTable();
//	qtwTable->horizontalHeader()->setSortIndicator( iCurrentColumnSorted, Qt::AscendingOrder );
	//qtwTable->horizontalHeader()->setSortIndicator( 0, Qt::AscendingOrder );
	qtwTable->horizontalHeader()->setStretchLastSection( true );
//	colClickedForSorting( iCurrentColumnSorted );
	sortColumn( iCurrentColumnSorted, bIsCurrentSortAscending );


}
Esempio n. 22
0
void ManageCoursesDialog::on_pushSaveCourses_clicked()
{

    if (ui->lineCourse->text().length()>3) {
        Courses C=Courses();

        Departments D=Departments();
        D.setDepName(ui->comboDepName->currentText());
        C.setD(D);


        C.setName(ui->lineCourse->text());
        C.setSchwerID(ui->comboSchwer->currentText().toInt());


        ORM::save(C);
    }

    populateTable();
}
Esempio n. 23
0
ManageCoursesDialog::ManageCoursesDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::ManageCoursesDialog)
{
    ui->setupUi(this);


    //fetch Shweriegkeit levels

    int row=0;

    Stuffen = ORM::getSchwer();
    for (Schwierigkeit stuffe: Stuffen) {
        qDebug() << "new stuffe" << stuffe.getRed() << " " << stuffe.getGreen() << " " << stuffe.getBlue();
        ui->comboSchwer->addItem(QString::number(stuffe.getSchwerID()));
        QColor col;

        col.setRed(stuffe.getRed());
        col.setGreen(stuffe.getGreen());
        col.setBlue(stuffe.getBlue());

        ui->comboSchwer->setItemData(row,col,Qt::ForegroundRole);
        row++;




    }

    //fetch departments
    QList<Departments> Deps = ORM::getDeps();
    for (Departments d : Deps) {
        ui->comboDepName->addItem(d.getDepName());
    }


    populateTable();



}
Esempio n. 24
0
QgsAuthMethodPlugins::QgsAuthMethodPlugins( QWidget *parent )
    : QDialog( parent )
    , mAuthNotifyLayout( nullptr )
    , mAuthNotify( nullptr )
{
  if ( QgsAuthManager::instance()->isDisabled() )
  {
    mAuthNotifyLayout = new QVBoxLayout;
    this->setLayout( mAuthNotifyLayout );
    mAuthNotify = new QLabel( QgsAuthManager::instance()->disabledMessage(), this );
    mAuthNotifyLayout->addWidget( mAuthNotify );
  }
  else
  {
    setupUi( this );
    connect( buttonBox, SIGNAL( rejected() ), this, SLOT( reject() ) );

    setupTable();
    populateTable();
  }
}
Esempio n. 25
0
File: rmap.cpp Progetto: 87maxi/oom
void RouteMapDock::renameRouteMap(QStandardItem* changed)/*{{{*/
{
	int row = changed->row();
	QStandardItem* item = _listModel->item(row, 0);
	if(item)
	{
		QString tname = changed->text();
		tname = routePath + "/" + tname + ".orm";
		QFileInfo f(item->text());
		if(f.exists() && f.isFile() && f.isWritable())
		{
			QFile file(f.filePath());
			if(!file.rename(tname))
			{
				QMessageBox::critical(this, QString("OOMidi: Error"),
							tr("Failed to rename map.\nPosible causes and map by that name already exists.\n\n%1").arg(file.fileName()));
			}
		}
	}
	populateTable(-1);
}/*}}}*/
Esempio n. 26
0
File: rmap.cpp Progetto: 87maxi/oom
void RouteMapDock::btnEditClicked(bool)/*{{{*/
{
	QList<int> rows = getSelectedRows();
	if (!rows.isEmpty())
	{
		int id = rows.at(0);
		QStandardItem* item = _listModel->item(id, 1);
		//QStandardItem* note = _listModel->item(id, 0);
		QString note = oom->noteForRouteMapping(routePath + "/" + item->text() + ".orm");
		if(item)
		{
			RouteMapDialog* rmd = new RouteMapDialog(true, this);
			connect(rmd, SIGNAL(saveRouteMap(QString, QString)), SLOT(updateRouteMap(QString, QString)));
			rmd->setFileName(item->text());
			rmd->setNotes(note);
			rmd->exec();
			if(rmd)
				delete rmd;
		}
	}
	populateTable(-1);
}/*}}}*/
Esempio n. 27
0
DataDisplayEditorForm::DataDisplayEditorForm(QWidget *parent) :
		QWidget(parent),
		ui(new Ui::DataDisplayEditorForm),
		current(NULL)
{
	ui->setupUi(this);


	connect(ui->displayTable, SIGNAL(clicked(QModelIndex)), this, SLOT(displayTableClicked(QModelIndex)));
	connect(ui->saveButton, SIGNAL(clicked()), this, SLOT(saveCurrent()));
	connect(ui->addButton, SIGNAL(clicked()), this, SLOT(addNewDataDisplay()));
	connect(ui->removeButton, SIGNAL(clicked()), this, SLOT(deleteCurrent()));
	connect(ui->testButton, SIGNAL(clicked()), this, SLOT(testCurrent()));
        connect(&GnosticApp::getInstance(), SIGNAL(configUpdated(GnosticApp::ConfigType)), this, SLOT(externalUpdate(GnosticApp::ConfigType)));

	model.setHorizontalHeaderLabels(QStringList() << "Section" << "Display Description");
	ui->displayTable->setModel(&model);
	ui->displayTable->horizontalHeader()->setStretchLastSection(true);
	populateTable();

	ui->saveButton->setEnabled(false);
}
Esempio n. 28
0
ImgurHistoryDialog::ImgurHistoryDialog()
{
	setWindowTitle(QApplication::applicationName() + QStringLiteral(" - ") + tr("Imgur History"));
	setMinimumWidth(650);
	setMinimumHeight(400);

	ImgurResponseLogger imgurResponseLogger;
	auto logEntries = imgurResponseLogger.getLogs();

	createTable(logEntries.count());

	populateTable(logEntries);

	mCloseButton = new QPushButton(tr("Close"));
	connect(mCloseButton, &QPushButton::clicked, this, &QDialog::close);

	mLayout = new QVBoxLayout;
	mLayout->addWidget(mTableWidget);
	mLayout->addWidget(mCloseButton);
	mLayout->setAlignment(Qt::AlignRight);
	setLayout(mLayout);
}
// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
void DynamicTableWidget::setupGui()
{
  // Catch when the filter is about to execute the preflight
  connect(getFilter(), SIGNAL(preflightAboutToExecute()),
          this, SLOT(beforePreflight()));

  // Catch when the filter is finished running the preflight
  connect(getFilter(), SIGNAL(preflightExecuted()),
          this, SLOT(afterPreflight()));

  // Catch when the filter wants its values updated
  connect(getFilter(), SIGNAL(updateFilterParameters(AbstractFilter*)),
          this, SLOT(filterNeedsInputParameters(AbstractFilter*)));

  tableLabel->setText(m_FilterParameter->getHumanLabel());

  // Set the item delegate so that we can only enter 'double' values into the table
  DynamicTableItemDelegate* dlg = new DynamicTableItemDelegate;
  dynamicTable->setItemDelegate(dlg);

  // Set button tooltips
  addRowBtn->setToolTip(addRowTT);
  addColBtn->setToolTip(addColTT);
  deleteRowBtn->setToolTip(deleteRowTT);
  deleteColBtn->setToolTip(deleteColTT);

  // Populate the table
  populateTable();

  // Set Icons
  QIcon addIcon = QIcon(QString(":/add2.png"));
  QIcon deleteIcon = QIcon(QString(":/delete2.png"));
  addRowBtn->setIcon(addIcon);
  addColBtn->setIcon(addIcon);
  deleteRowBtn->setIcon(deleteIcon);
  deleteColBtn->setIcon(deleteIcon);
}
Esempio n. 30
0
void MainWindow::on_comboBox_currentIndexChanged(const QString& arg1)
{
  QStringList splitted = arg1.split(" ");
  selectedVersionNumber = splitted.at(1).toInt();
  populateTable();
}