本文整理汇总了C++中currentTextChanged函数的典型用法代码示例。如果您正苦于以下问题:C++ currentTextChanged函数的具体用法?C++ currentTextChanged怎么用?C++ currentTextChanged使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了currentTextChanged函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: QIntValidator
MainWindow::MainWindow(QWidget *parent):QMainWindow(parent),ui(new Ui::MainWindow)
{
ui->setupUi(this);
ui->label_GenerationTime->setText("Current Generation Time: 00:00:00");
ui->progressBar->setValue(0);
ui->progressBar->setAlignment(Qt::AlignRight);
ui->list_LevelSet->setContextMenuPolicy(Qt::CustomContextMenu);
ui->lineEdit_GeneratorSeed->setValidator(new QIntValidator(0,999999999,this));
ui->lineEdit_GeneratorSeed->setText(0000000000);
ui->spin_TimeLimit->setValue(1.00);
connect(&Generator, SIGNAL(changeProgressBar(float)), this, SLOT(changeProgressBar(float)));
connect(&Generator, SIGNAL(addToList(int)), this, SLOT(addToList(int)));
connect(&Generator, SIGNAL(regenFinished(int)), this, SLOT(displayLevel(int)));
connect(&Generator, SIGNAL(regenFinished(int)), this, SLOT(displayLevelGenTime(int)));
connect(&thread, SIGNAL(finished()), this, SLOT(stopTimer()));
connect(&timer, SIGNAL(timeout()), this, SLOT(updateTimer()));
connect(&Generator, SIGNAL(resetGUI()), this, SLOT(resetGUI()));
connect(ui->list_LevelSet, SIGNAL(currentRowChanged(int)), this, SLOT(displayLevel(int)));
connect(ui->combo_RoomH, SIGNAL(currentTextChanged(QString)), this, SLOT(disable3by3(QString)));
connect(ui->combo_RoomW, SIGNAL(currentTextChanged(QString)), this, SLOT(disable3by3(QString)));
connect(ui->list_LevelSet, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(rightClickMenu(QPoint)));
connect(&Generator, SIGNAL(displayGenSeed()), this, SLOT(displayGenSeed()));
scene = new QGraphicsScene(this);
ui->graphicsView->setScene(scene);
Generator.setupForThread(thread);
Generator.moveToThread(&thread);
}
开发者ID:RBrNx,项目名称:SokoGenerator,代码行数:31,代码来源:mainwindow.cpp
示例2: QMainWindow
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
// ui->tableWidget->resizeColumnsToContents();
myDB = new db();
// qDebug()<< myDB->setClass("呆扳手","8-10");
// qDebug()<< myDB->setClass("呆扳手","9-11");
// qDebug()<<myDB->getEtalon("呆扳手");
// detail myDetail = {0,3,"2014.06.18",3,4,5,6,7,8,9,10};
// qDebug()<< myDB->setDetail(myDetail);
// qDebug()<< myDB->updateDetail((detail){0,3,"2014.06.18",44,4,5,6,7,8,9,10});
// qDebug()<< myDB->getDetail(1).at(0).date;
// ui->namesComboBox->addItems(myDB->getAllName());
// changeEtalon(ui->namesComboBox->currentText());
// QObject::connect(ui->tableWidget,SIGNAL(changeSize(int,int)),this,SLOT(resetWindowsSize(int,int)));
QObject::connect(ui->namesComboBox,SIGNAL(currentTextChanged(QString)),this,SLOT(changeEtalon(QString)));
QObject::connect(ui->etalonComboBox,SIGNAL(currentTextChanged(QString)),this,SLOT(on_serachButton_clicked()));
QObject::connect(ui->tableWidget,SIGNAL(itemChanged(QTableWidgetItem*)),this,SLOT(addWare(QTableWidgetItem*)));
ui->namesComboBox->addItems(myDB->getAllName());
ui->tableWidget->installEventFilter(this);
// qDebug()<<"get details by name:"<<myDB->getDetailsByName("呆扳手").length();
// ui->tableWidget->setRowCount(1);
// ui->tableWidget->setItem(0,0,new QTableWidgetItem(QString("2221")));
}
开发者ID:3642214,项目名称:warehouse,代码行数:27,代码来源:mainwindow.cpp
示例3: connect
void eaps8000UsbUICharWindow::connectUiElements()
{
connect( _ui->btn_emergencyStop, SIGNAL( clicked() ), this,
SLOT( emergencyStop() ) );
connect( _ui->cob_setValue, SIGNAL( currentTextChanged( QString ) ), this,
SLOT( setValueSelectionChanged() ) );
connect( _ui->cob_unit, SIGNAL( currentTextChanged( QString ) ),
this, SLOT( updateUnitRange() ) );
connect( _ui->chb_calcValues, SIGNAL( stateChanged( int ) ), this,
SLOT( fixStepSizeChanged() ) );
connect( _ui->dsb_fromValue, SIGNAL( valueChanged( double ) ), this,
SLOT( calculateRemainingTicks() ) );
connect( _ui->dsb_toValue, SIGNAL( valueChanged( double ) ), this,
SLOT( calculateRemainingTicks() ) );
connect( _ui->dsb_stepSize, SIGNAL( valueChanged( double ) ), this,
SLOT( calculateRemainingTicks() ) );
connect( _ui->spb_repeat, SIGNAL( valueChanged( int ) ), this,
SLOT( calculateRemainingTicks() ) );
connect( _ui->chb_loop, SIGNAL( stateChanged( int ) ), this,
SLOT( calculateRemainingTicks() ) );
connect( _ui->btn_connect, SIGNAL( clicked() ), this,
SLOT( connectivityButtonPressed() ) );
connect( _ui->btn_startStop, SIGNAL( clicked() ), this,
SLOT( startStop() ) );
connect( _ui->btn_resetInfo, SIGNAL( clicked() ), this,
SLOT( resetInfo() ) );
}
开发者ID:bchjoerni,项目名称:mlab,代码行数:30,代码来源:eaps8000usbuicharwindow.cpp
示例4: SIGNAL
void ViMainCorrelationWidget::updateCorrelators()
{
QObject::disconnect(mUi->correlatorComboBox, SIGNAL(currentTextChanged(QString)), mUi->correlationWidget, SLOT(changeCorrelator(QString)));
mUi->scrollArea->show(); // Table must be visible before setting the data, in order to resize properly
mUi->correlatorContainer->show();
ViAudioObjectQueue objects = mObjects;
if(objects.isEmpty()) objects = mUi->projectLoader->objects();
QSet<QString> correlators;
ViCorrelationGroups correlations;
QStringList keys;
for(int i = 0; i < objects.size(); ++i)
{
correlations = objects[i]->correlations();
for(int j = 0; j < correlations.size(); ++j)
{
keys = correlations[j].correlators();
for(int k = 0; k < keys.size(); ++k)
{
correlators.insert(ViName::formatName(keys[k], "", true));
}
}
}
mUi->correlatorComboBox->clear();
mUi->correlatorComboBox->addItems(correlators.toList());
mUi->correlatorComboBox->setCurrentText(ViCorrelatorManager::defaultName());
QObject::connect(mUi->correlatorComboBox, SIGNAL(currentTextChanged(QString)), mUi->correlationWidget, SLOT(changeCorrelator(QString)));
mUi->correlationWidget->changeCorrelator(mUi->correlatorComboBox->currentText());
}
开发者ID:EQ4,项目名称:Visore,代码行数:33,代码来源:vimaincorrelationwidget.cpp
示例5: QDialog
Arduino::Arduino(QWidget *parent) :
QDialog(parent),
ui(new Ui::Arduino)
{
ui->setupUi(this);
setWindowIcon(QIcon(":/icon"));
arduino = new QSerialPort(this);
baudRateList << "1200" << "2400" << "4800" << "9600" << "19200" << "38400" << "57600" << "115200";
ports = QSerialPortInfo::availablePorts();
QListIterator <QSerialPortInfo> iter(ports);
QListIterator <QString> baudIter(baudRateList);
while (iter.hasNext()){
ui->comportBox->addItem(iter.next().portName());
}
while (baudIter.hasNext()){
ui->baudrateBox->addItem(baudIter.next());
}
ui->baudrateBox->setCurrentText("9600");
connect(ui->comportBox, SIGNAL(currentTextChanged(QString)), this, SLOT(setPortName()));
connect(ui->baudrateBox, SIGNAL(currentTextChanged(QString)),this, SLOT(setBaudRate()));
connect(ui->connectButton, SIGNAL(clicked()), this, SLOT(connectArduino()));
connect(ui->forwardButton, SIGNAL(pressed()), this, SLOT(forward()));
connect(ui->backwardButton, SIGNAL(pressed()), this, SLOT(backward()));
connect(ui->leftButton, SIGNAL(pressed()), this, SLOT(left()));
connect(ui->rightButton, SIGNAL(pressed()), this, SLOT(right()));
connect(ui->stopButton, SIGNAL(clicked()), this, SLOT(stop()));
connect(ui->forwardButton, SIGNAL(released()), this, SLOT(stop()));
connect(ui->leftButton, SIGNAL(released()), this, SLOT(stop()));
connect(ui->rightButton, SIGNAL(released()), this, SLOT(stop()));
connect(ui->backwardButton, SIGNAL(released()), this, SLOT(stop()));
ui->statusLabel->setText("Connect BT Module");
arduino->setPortName(currentPort);
ui->speedLabel->setText("Running at default speed: 230");
}
开发者ID:theUnspecified,项目名称:BluetoothSpyBot,代码行数:58,代码来源:arduino.cpp
示例6: QGraphicsView
Figure2D::Figure2D(QWidget *parent) :
QGraphicsView(parent),
lbProjX(new QLabel("xlabelhere",this)),
lbProjY(new QLabel("ylabelhere",this))
{
setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
// Create a new scene
setScene(new VibesScene2D(this));
this->scale(1.0, -1.0);
this->show();
setDragMode(ScrollHandDrag);
// Force full viewport update (avoid problems with axes)
setViewportUpdateMode(FullViewportUpdate);
// Never show the scrollbars
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
// Keep the view centered when resizing window
setResizeAnchor(AnchorViewCenter);
lbProjX->setAlignment(Qt::AlignRight);
lbProjX->move(width()-50, 0);
lbProjX->setSizePolicy(QSizePolicy::Ignored,QSizePolicy::Ignored);
lbProjX->resize(100, 20);
lbProjX->installEventFilter(this);
lbProjX->show();
lbProjY->move(5, 15);
lbProjY->setSizePolicy(QSizePolicy::Ignored,QSizePolicy::Ignored);
lbProjY->resize(100, 20);
lbProjY->installEventFilter(this);
lbProjY->show();
cbProjX = new QComboBox(lbProjX);
cbProjX->setMaximumSize(lbProjX->size());
connect(cbProjX, SIGNAL(currentTextChanged(QString)), lbProjX, SLOT(setText(QString)));
connect(cbProjX, SIGNAL(currentIndexChanged(QString)), lbProjX, SLOT(setText(QString)));
for (int i=0; i<3; ++i)
cbProjX->addItem(QString("x: dim %1").arg(i), i);
cbProjX->setCurrentIndex(scene()->dimX());
//cbProjX->installEventFilter(this);
connect(cbProjX, SIGNAL(currentIndexChanged(int)), scene(), SLOT(setDimX(int)));
connect(scene(), SIGNAL(changedDimX(int)), cbProjX, SLOT(setCurrentIndex(int)));
cbProjY = new QComboBox(lbProjY);
cbProjY->setMaximumSize(lbProjY->size());
connect(cbProjY, SIGNAL(currentTextChanged(QString)), lbProjY, SLOT(setText(QString)));
connect(cbProjY, SIGNAL(currentIndexChanged(QString)), lbProjY, SLOT(setText(QString)));
for (int i=0; i<3; ++i)
cbProjY->addItem(QString("y: dim %1").arg(i), i);
cbProjY->setCurrentIndex(scene()->dimY());
//cbProjY->installEventFilter(this);
connect(cbProjY, SIGNAL(currentIndexChanged(int)), scene(), SLOT(setDimY(int)));
connect(scene(), SIGNAL(changedDimY(int)), cbProjY, SLOT(setCurrentIndex(int)));
connect(scene(), SIGNAL(dimensionsChanged()), this, SLOT(refreshProjectionSelectors()));
}
开发者ID:schvarcz,项目名称:VIBES,代码行数:57,代码来源:figure2d.cpp
示例7: disconnect
void WeatherParamSetupWidget::onAirportChanged(int index){
disconnect(planeNameComboBox, SIGNAL(currentTextChanged(QString)), this, SLOT(onPlaneNameChanged(QString)));
planeNameComboBox->clear();
Airport airport = airportList[index];
QStringList planeNameList = airport.planeName().split(",", QString::SkipEmptyParts);
planeNameComboBox->addItems(planeNameList);
connect(planeNameComboBox, SIGNAL(currentTextChanged(QString)), this, SLOT(onPlaneNameChanged(QString)));
this->onPlaneNameChanged(planeNameList[0]);
}
开发者ID:skypanda100,项目名称:airportevaluation,代码行数:9,代码来源:weatherparamsetupwidget.cpp
示例8: connect
void BehaviorReferenceGeneratorUI::toggleSignals(bool toggleconnections){
if (toggleconnections){
connect(name, SIGNAL(textEdited(QString)), this, SLOT(setName(QString)), Qt::UniqueConnection);
connect(behaviorName, SIGNAL(currentTextChanged(QString)), this, SLOT(setBehaviorName(QString)), Qt::UniqueConnection);
}else{
disconnect(name, SIGNAL(textEdited(QString)), this, SLOT(setName()));
disconnect(behaviorName, SIGNAL(currentTextChanged(QString)), this, SLOT(setBehaviorName(QString)));
}
}
开发者ID:Zartar,项目名称:Skyrim-Behavior-Editor-,代码行数:9,代码来源:behaviorreferencegeneratorui.cpp
示例9: QWidget
StatisticsWidget::StatisticsWidget(User* user, QWidget* parent) : QWidget(parent), ui(new Ui::StatisticsWidget), _user(user) {
ui->setupUi(this);
ui->fromDTE->setDate(QDateTime::currentDateTime().addDays(-1).date());
ui->toDTE->setDate(QDateTime::currentDateTime().addDays(1).date());
connect(ui->viewCB, SIGNAL(currentTextChanged(QString)), this, SLOT(renderData()));
connect(ui->groupByCB, SIGNAL(currentTextChanged(QString)), this, SLOT(renderData()));
connect(ui->fromDTE, SIGNAL(editingFinished()), this, SLOT(renderData()));
connect(ui->toDTE, SIGNAL(editingFinished()), this, SLOT(renderData()));
renderData();
}
开发者ID:EPecherkin,项目名称:diplom,代码行数:12,代码来源:statisticswidget.cpp
示例10: QDialog
SessionWizard::SessionWizard(Session *session, Class *cl, QWidget *parent, Qt::WindowFlags f):
QDialog(parent, f)
{
setupUi(this);
QObject::connect(btnMatch, SIGNAL(released()), this, SLOT(match()));
QObject::connect(btnSplit, SIGNAL(released()), this, SLOT(split()));
twMatchedPairs->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
twMatchedPairs->horizontalHeader()->hide();
twMatchedPairs->verticalHeader()->hide();
QObject::connect(lwSessionStudents, SIGNAL(currentTextChanged(QString)), this, SLOT(toggleMatchEnabled()));
QObject::connect(lwClassStudents, SIGNAL(currentTextChanged(QString)), this, SLOT(toggleMatchEnabled()));
QObject::connect(twMatchedPairs, SIGNAL(currentItemChanged(QTableWidgetItem *, QTableWidgetItem *)), this, SLOT(toggleSplitEnabled()));
toggleMatchEnabled(); toggleSplitEnabled();
lblSessionName->setText(QString("%1 - %2").arg(session->dateTimeToString()).arg(session->name()));
lblClassName->setText(cl->name());
for (int i = 0; i < session->numStudents(); ++i) {
QListWidgetItem *item = new QListWidgetItem(session->student(i)->name());
item->setData(Qt::UserRole, i);
lwSessionStudents->addItem(item);
}
for (int i = 0; i < cl->numMembers(); ++i) {
QListWidgetItem *item = new QListWidgetItem(cl->member(i)->name());
item->setData(Qt::UserRole, i);
lwClassStudents->addItem(item);
}
QString str1;
QString str2;
bool found = false;
for (int i = 0; i < lwSessionStudents->count();) {
for (int j = 0; j < lwClassStudents->count();) {
str1 = lwSessionStudents->item(i)->text().toLower().simplified();
str1.remove(" ");
str2 = lwClassStudents->item(j)->text().toLower().simplified();
str2.remove(" ");
if (str1 == str2) {
lwSessionStudents->setCurrentRow(i);
lwClassStudents->setCurrentRow(j);
match();
found = true; break;
} else {
j++;
}
}
if (!found) {
i++;
} else {
found = false;
}
}
}
开发者ID:gz818,项目名称:itest,代码行数:51,代码来源:session_wizard.cpp
示例11: on_portNameComboBox_currentTextChanged
void SerialConfigWindow::on_portNameComboBox_currentTextChanged(const QString & text)
{
if ( port->isOpen() )
{
QMessageBox::warning(this,"incorrect operation", "you should close the active port first before switch port \n", QMessageBox::Ok, QMessageBox::Ok) ;
portNameComboBox->disconnect(portNameComboBox,SIGNAL(currentTextChanged(QString)),this,SLOT(on_portNameComboBox_currentTextChanged(QString)));
portNameComboBox->setCurrentText ( port->portName() );
portNameComboBox->connect(portNameComboBox,SIGNAL(currentTextChanged(QString)),this,SLOT(on_portNameComboBox_currentTextChanged(QString)));
}
else
{
port->setPortName(portNameComboBox->currentText());
}
}
开发者ID:KayTsao,项目名称:9POTNodes,代码行数:15,代码来源:SerialConfigWindowDemo.cpp
示例12: QDialog
isis::viewer::ui::AboutDialog::AboutDialog ( QWidget *parent, isis::viewer::QViewerCore *core )
: QDialog ( parent ),
m_ViewerCore( core )
{
m_Interface.setupUi( this );
connect( m_Interface.authorsList, SIGNAL( currentTextChanged( QString ) ), this, SLOT( onAuthorClicked( QString ) ) );
connect( m_Interface.sendMailButton, SIGNAL( pressed() ), this, SLOT( sendEmailClicked() ) );
m_Interface.sendMailButton->setIcon( QIcon( ":/common/icon_email.gif" ) );
m_Interface.sendMailButton->setEnabled( false );
QPixmap pixMap( m_ViewerCore->getSettings()->getPropertyAs<std::string>( "vastSymbol" ).c_str() );
const float ratio = pixMap.height() / ( float )pixMap.width();
m_Interface.vastSymbolLabel->setPixmap( QPixmap(
m_ViewerCore->getSettings()->getPropertyAs<std::string>( "vastSymbol" ).c_str() ).scaled( 200 / ratio , m_Interface.vastSymbolLabel->height(), Qt::KeepAspectRatio ) );
QPalette pal;
pal.setColor( QPalette::Text, Qt::blue );
m_Interface.contactEdit->setPalette( pal );
m_authorMap["Erik Tuerke"] = std::string( "[email protected]" );
m_authorMap["Enrico Reimer"] = std::string( "[email protected]" );
}
开发者ID:Rollmops,项目名称:vast,代码行数:25,代码来源:aboutDialog.cpp
示例13: QMainWindow
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
default_scale = 1;
current_scale = 1;
image.load(":/aliceA.png");
scaled = image;
files_names = QStringList();
pImage_lbl = new QLabel();
pImage_lbl->setAlignment(Qt::AlignCenter);
ui->imageArea->setWidget(pImage_lbl);
ui->imageArea->setBackgroundRole(QPalette::NoRole);
loadListOfFiles();
setAcceptDrops(true);
connect(&interpret, SIGNAL(ready(QImage)), this, SLOT(updateImage(QImage)));
connect(ui->gammaSlider, SIGNAL(sliderReleased()), this, SLOT(refreshGamma()));
connect(ui->zoomSlider, SIGNAL(sliderReleased()), this, SLOT(scaleImage()));
connect(ui->filesList, SIGNAL(itemSelectionChanged()), this, SLOT(restoreDefaultScale()));
connect(ui->filesList, SIGNAL(currentTextChanged(QString)), this, SLOT(updateImage(QString)));
updateImage("aliceA.png");
}
开发者ID:DeaDiana,项目名称:_Graphics,代码行数:27,代码来源:mainwindow.cpp
示例14: QMainWindow
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) {
ui->setupUi(this);
midi = new MistyMidi();
loadPortNames();
connect(ui->intputList, SIGNAL(currentTextChanged(QString)), midi, SLOT(input_changed(QString)));
connect(midi, SIGNAL(send_message(QString)), this, SLOT(updatelog(QString)));
ui->actionE_xit->setShortcut(QKeySequence::Quit);
ui->synthList->setRowCount(1);
ui->synthList->setItem(0, 0, new QTableWidgetItem("Piano", QTableWidgetItem::Type));
SynthSelector *combo = new SynthSelector(ui->synthList, outputs);
ui->synthList->setCellWidget(0, 1, combo);
QDir mididir ("MIDI");
if(mididir.exists()) {
mididir.setFilter(QDir::Files | QDir::NoSymLinks);
mididir.setNameFilters(QStringList("*.mid"));
QFileInfoList files = mididir.entryInfoList();
for(int i=0; i<files.size(); i++) {
ui->accompanimentList->addItem(files.at(i).fileName());
}
} else {
ui->accompanimentList->addItem(QString("Midi Directory %1 Not Found").arg(mididir.absolutePath()));
}
}
开发者ID:shimpe,项目名称:MistyRTAW,代码行数:28,代码来源:mainwindow.cpp
示例15: enableSVTools
void MainWindow::setupSessionViewer()
{
SVSelectedSessionWidget->setEnabled(false); enableSVTools();
passMarkDetailsTab->setEnabled(false);
scoringSystemTab->setEnabled(false);
QObject::connect(SVLSListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(setCurrentSession(QListWidgetItem *)));
QObject::connect(SVLASListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(setCurrentSession(QListWidgetItem *)));
QObject::connect(SVLCListWidget, SIGNAL(currentTextChanged(QString)), this, SLOT(setCurrentStudent()));
QObject::connect(SVLCListWidget, SIGNAL(itemClicked(QListWidgetItem *)), this, SLOT(showSelectedStudentTab()));
QObject::connect(actionDelete_log, SIGNAL(triggered()), this, SLOT(deleteLog()));
QObject::connect(actionArchive_session, SIGNAL(triggered()), this, SLOT(archiveSession()));
QObject::connect(actionRestore_session, SIGNAL(triggered()), this, SLOT(restoreSession()));
QObject::connect(actionCopy_to_archive, SIGNAL(triggered()), this, SLOT(copyToArchive()));
QObject::connect(actionCopy_from_archive, SIGNAL(triggered()), this, SLOT(copyFromArchive()));
QObject::connect(actionPrint_all, SIGNAL(triggered()), this, SLOT(printAll()));
QObject::connect(actionPrint_session_summary, SIGNAL(triggered()), this, SLOT(printSessionSummary()));
QObject::connect(SVLSSearchLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(searchSVLS(const QString &)));
QObject::connect(SVSearchDetailsLineEdit, SIGNAL(textChanged(QLineEdit *, const QString &)), SVPassMarkTableWidget, SLOT(filterItems(QLineEdit *, const QString &)));
SVLSListWidget->setSortingEnabled(true);
SVLASListWidget->setSortingEnabled(true);
SVPassMarkTableWidget->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch);
SVPassMarkTableWidget->horizontalHeader()->setResizeMode(1, QHeaderView::ResizeToContents);
SVPassMarkTableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);
SVScoringSystemTableWidget->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents);
SVScoringSystemTableWidget->verticalHeader()->setResizeMode(QHeaderView::ResizeToContents);
SVScoringSystemTableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);
for (int i = 0; i < SVScoringSystemTableWidget->rowCount(); ++i) {
SVScoringSystemTableWidget->setItem(i, 1, new QTableWidgetItem);
}
hideArchive();
}
开发者ID:nayanapriyankara,项目名称:itest,代码行数:31,代码来源:session_viewer.cpp
示例16: currentTextChanged
void SearchBar::setCurrentIndex(int index)
{
m_lineEdit->setText(itemText(index));
emit currentTextChanged(m_lineEdit->text());
m_popupList->clearSelection();
m_menu->hide();
}
开发者ID:wzedmund,项目名称:filemanager,代码行数:7,代码来源:searchbar.cpp
示例17: QMainWindow
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
if(initalized==false){
QPalette Pal(palette());
initalized=true;
Pal.setColor(QPalette::Background, defaultcolor);
ui->color_display->setAutoFillBackground(true);
ui->color_display->setPalette(Pal);
}
//connect
//display to control
//QObject::connect(ui->AngleInput,SIGNAL(textChanged(QString)),ui->openGLWidget,SLOT(changeAngle(QString)));
QObject::connect(ui->openGLWidget,SIGNAL(axiomRead(QString)),ui->Axiom,SLOT(setText(QString)));
QObject::connect(ui->openGLWidget,SIGNAL(angleRead(QString)),ui->AngleInput,SLOT(setText(QString)));
QObject::connect(ui->openGLWidget,SIGNAL(RuleRead(QString)),ui->RuleDIsplay,SLOT(setPlainText(QString)));
QObject::connect(ui->openGLWidget,SIGNAL(iterationRead(int)),ui->Iteration_spinBox,SLOT(setValue(int)));
QObject::connect(ui->openGLWidget,SIGNAL(RuleCalculated(QString)),ui->L_systemResult,SLOT(setPlainText(QString)));
//control to display
QObject::connect(ui->Axiom,SIGNAL(textEdited(QString)),ui->openGLWidget,SLOT(changeAxiom(QString)));
QObject::connect(ui->AngleInput,SIGNAL(textEdited(QString)),ui->openGLWidget,SLOT(changeAngle(QString)));
QObject::connect(ui->Iteration_spinBox,SIGNAL(valueChanged(int)),ui->openGLWidget,SLOT(changeIteration(int)));
QObject::connect(ui->foceUpdateButton,SIGNAL(pressed()),ui->openGLWidget,SLOT(UpdateL_system()));
QObject::connect(ui->FileSelector,SIGNAL(currentTextChanged(QString)),ui->openGLWidget,SLOT(ChangeTemplate(QString)));
QObject::connect(ui->foceUpdateButton,SIGNAL(pressed()),ui->openGLWidget,SLOT(setFocus()));
QObject::connect(this,SIGNAL(ColorChange(QColor)),ui->openGLWidget,SLOT(getChangedColor(QColor)));
//this->setAttribute(Qt::WA_TranslucentBackground, true);
}
开发者ID:MeridianPoint,项目名称:QT_L_system,代码行数:33,代码来源:mainwindow.cpp
示例18: QMainWindow
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent), _ui(new Ui::MainWindow), _nextScene(QString::null)
{
_ui->setupUi(this);
Camera* camera = new Camera;
camera->set(config->defaultCameraVerticalFOV(), config->defaultCameraAspectRatio());
camera->setAperture(config->defaultCameraAperture());
camera->setFocalPlane(config->defaultCameraFocusPlane());
_ui->renderer->setCamera(camera);
_setConfig();
_ui->sceneNames->addItems(sceneGenerator->scenes());
_ui->sceneNames->setCurrentIndex(0);
logger->setConsole(_ui->console);
logger->setStatusBar(_ui->statusBar);
onLoadScene();
connect(_ui->action_Save, SIGNAL(triggered()), SLOT(onSaveImage()));
connect(_ui->action_Play_Pause, SIGNAL(triggered()), SLOT(onPlayPause()));
connect(_ui->action_Stop, SIGNAL(triggered()), SLOT(onStop()));
connect(_ui->action_Reload, SIGNAL(triggered()), SLOT(onLoadScene()));
connect(_ui->sceneNames, SIGNAL(currentIndexChanged(QString)), SLOT(onLoadScene()));
connect(_ui->integrator, SIGNAL(currentTextChanged(QString)), SLOT(onIntegratorChanged()));
connect(_ui->renderer, SIGNAL(renderingFinished()), SLOT(onRenderingFinished()));
connect(_ui->renderer, SIGNAL(renderingStarted()), SLOT(onRenderingStarted()));
connect(_ui->renderer, SIGNAL(clicked(Intersection)), SLOT(onClick(Intersection)));
QTimer* progressTimer = new QTimer(this);
connect(progressTimer, SIGNAL(timeout()), SLOT(onUpdateProgress()));
progressTimer->start(35);
}
开发者ID:john1995,项目名称:raytracer,代码行数:35,代码来源:MainWindow.cpp
示例19: QGraphicsProxyWidget
ComboBox::ComboBox(QGraphicsItem* parent)
: QGraphicsProxyWidget(parent)
{
widget = new QComboBox;
setWidget(widget);
QObject::connect(widget, SIGNAL(currentIndexChanged(QString)), this, SIGNAL(currentTextChanged(QString)));
}
开发者ID:shainer,项目名称:partitioner-plugin,代码行数:8,代码来源:qmlcombobox.cpp
示例20: connect
void WeatherParamSetupWidget::initConnect(){
connect(airportComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onAirportChanged(int)));
connect(planeNameComboBox, SIGNAL(currentTextChanged(QString)), this, SLOT(onPlaneNameChanged(QString)));
if(SharedMemory::isWelcome){
connect(previousButton, SIGNAL(clicked()), this, SIGNAL(previousClicked()));
connect(nextButton, SIGNAL(clicked()), this, SIGNAL(nextClicked()));
}
}
开发者ID:skypanda100,项目名称:airportevaluation,代码行数:8,代码来源:weatherparamsetupwidget.cpp
注:本文中的currentTextChanged函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论