BAMseek::BAMseek(QWidget *parent) : QMainWindow(parent), pr(0) { setAttribute(Qt::WA_DeleteOnClose); setupFileMenu(); setupHelpMenu(); setWindowTitle(tr("BAMseek")); setupHeader(); setupTable(); setupPager(); QGroupBox * groupbox = new QGroupBox(tr("Page Number")); QHBoxLayout * horiz = new QHBoxLayout; horiz->addWidget(spinbox); horiz->addWidget(slider); groupbox->setLayout(horiz); QVBoxLayout * vert = new QVBoxLayout; vert->addWidget(tableview, 1); vert->addWidget(groupbox, 0); QWidget * layout = new QWidget; layout->setLayout(vert); setCentralWidget(layout); }
mainWindow::mainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::mainWindow) { //#ifndef WIN32 QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8")); QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8")); //#endif ui->setupUi(this); setupDataBase(); setupTable(); setupComboBox(); ui->mainToolBar->addAction(ui->actionAjouter_console); ui->mainToolBar->addAction(ui->actionEditer_ligne); ui->mainToolBar->addAction(ui->actionSupprimer_ligne); connect(ui->buttonAdd, SIGNAL(clicked()), this, SLOT(addGame())); connect(ui->actionAjouter_console, SIGNAL(triggered()), this, SLOT(addConsole())); connect(ui->actionSupprimer_ligne, SIGNAL(triggered()), this, SLOT(deleteGame())); connect(ui->actionEditer_ligne, SIGNAL(triggered()), this, SLOT(editGame())); connect(ui->actionExporter_en_csv, SIGNAL(triggered()), this, SLOT(exportCSV())); connect(ui->actionImporter_un_CSV, SIGNAL(triggered()), this, SLOT(importCSV())); }
PurchaseEditor::PurchaseEditor( QWidget *parent) : KDialog( parent ) { ui = new PurchaseEditorUI( this ); setMainWidget( ui ); setCaption( i18n("Purchase") ); setButtons( KDialog::Ok|KDialog::Cancel ); setDefaultButton(KDialog::None); ui->editDonor->setCustomLayout(1); ui->btnAddItem->setDefault(true); connect( ui->btnAddItem, SIGNAL( clicked() ), this, SLOT( addItemToList() ) ); connect(ui->btnRemoveItem, SIGNAL( clicked() ), SLOT( deleteSelectedItem() ) ); ui->chIsAGroup->setDisabled(true); QString path = KStandardDirs::locate("appdata", "styles/"); path = path+"tip.svg"; errorPanel = new MibitTip(this, ui->widgetPurchase, path, DesktopIcon("dialog-warning",32) ); lastCode = ""; status = estatusNormal; productExists = false; productsHash.clear(); resetEdits(); totalBuy = 0.0; itemCount = 0.0; ui->editDateTime->setDateTime(QDateTime::currentDateTime()); QTimer::singleShot(500, this, SLOT(setupTable())); }
QgsAuthMethodPlugins::QgsAuthMethodPlugins( QWidget *parent ) : QDialog( parent ) { setupUi( this ); connect( buttonBox, SIGNAL( rejected() ), this, SLOT( reject() ) ); setupTable(); populateTable(); }
CurrentPlayTable::CurrentPlayTable(boost::shared_ptr<ClientGroup>clientGroup, QWidget *parent): QTableWidget(parent), m_ClientGroup(clientGroup) { setupTable(); m_PlayFile = new QAction(tr("预览"),this); this->addAction(m_PlayFile); this->setContextMenuPolicy(Qt::ActionsContextMenu); connect(m_PlayFile,SIGNAL(triggered()),this,SLOT(onPlayFile())); }
QgsGeometryCheckerFixSummaryDialog::QgsGeometryCheckerFixSummaryDialog( const Statistics &stats, QgsGeometryChecker *checker, QWidget *parent ) : QDialog( parent ) , mChecker( checker ) { ui.setupUi( this ); ui.groupBoxFixedErrors->setTitle( tr( "%1 errors were fixed" ).arg( stats.fixedErrors.size() ) ); ui.groupBoxNewErrors->setTitle( tr( "%1 new errors were found" ).arg( stats.newErrors.count() ) ); ui.groupBoxNotFixed->setTitle( tr( "%1 errors were not fixed" ).arg( stats.failedErrors.count() ) ); ui.groupBoxObsoleteErrors->setTitle( tr( "%1 errors are obsolete" ).arg( stats.obsoleteErrors.count() ) ); for ( QgsGeometryCheckError *error : stats.fixedErrors ) { addError( ui.tableWidgetFixedErrors, error ); } for ( QgsGeometryCheckError *error : stats.newErrors ) { addError( ui.tableWidgetNewErrors, error ); } for ( QgsGeometryCheckError *error : stats.failedErrors ) { addError( ui.tableWidgetNotFixed, error ); } for ( QgsGeometryCheckError *error : stats.obsoleteErrors ) { addError( ui.tableWidgetObsoleteErrors, error ); } setupTable( ui.tableWidgetFixedErrors ); setupTable( ui.tableWidgetNewErrors ); setupTable( ui.tableWidgetNotFixed ); setupTable( ui.tableWidgetObsoleteErrors ); ui.plainTextEditMessages->setPlainText( checker->getMessages().join( QStringLiteral( "\n" ) ) ); ui.groupBoxFixedErrors->setVisible( !stats.fixedErrors.isEmpty() ); ui.groupBoxNewErrors->setVisible( !stats.newErrors.isEmpty() ); ui.groupBoxNotFixed->setVisible( !stats.failedErrors.isEmpty() ); ui.groupBoxObsoleteErrors->setVisible( !stats.obsoleteErrors.isEmpty() ); ui.groupBoxMessages->setVisible( !checker->getMessages().isEmpty() ); }
MainDialog::MainDialog() { Global::init(); setFixedSize(Global::desktop.width()*0.6f, Global::desktop.height()*0.5f); netman_.reset(new NetworkManager(this)); setupButtons(); setupTable(); setWindowTitle(Global::productFullName()); }
void loadPslTable(char *database, struct sqlConnection *conn, char *pslFile) /* load one psl table */ { char table[128]; char *tabFile; boolean indirectLoad = FALSE; verbose(1, "Processing %s\n", pslFile); /* determine table name to use */ if (clTableName != NULL) safef(table, sizeof(table), "%s", clTableName); else { if (endsWith(pslFile, ".gz")) { char *stripGz; stripGz = cloneString(pslFile); chopSuffix(stripGz); splitPath(stripGz, NULL, table, NULL); freeMem(stripGz); } else splitPath(pslFile, NULL, table, NULL); } setupTable(database, conn, table); /* if a bin column is being added or if the input file is * compressed, we must copy to an intermediate tab file */ indirectLoad = ((pslCreateOpts & PSL_WITH_BIN) != 0) || endsWith(pslFile, ".gz") || !noSort; if (indirectLoad) { tabFile = "psl.tab"; if (pslCreateOpts & PSL_XA_FORMAT) copyPslXaToTab(pslFile, tabFile); else copyPslToTab(pslFile, tabFile); } else tabFile = pslFile; sqlLoadTabFile(conn, tabFile, table, pslLoadOpts); if (!noHistory) hgHistoryComment(conn, "Add psl alignments to %s table", table); if (indirectLoad && !keep) unlink(tabFile); }
PurchaseEditor::PurchaseEditor( QWidget *parent ) : KDialog( parent ) { ui = new PurchaseEditorUI( this ); setMainWidget( ui ); setCaption( i18n("Purchase") ); setButtons( KDialog::Ok|KDialog::Cancel ); setDefaultButton(KDialog::None); ui->btnAddItem->setDefault(true); //Set Validators for input boxes QRegExp regexpC("[0-9]{1,13}"); //(EAN-13 y EAN-8) .. y productos sin codigo de barras? QRegExpValidator * validatorEAN13 = new QRegExpValidator(regexpC, this); ui->editCode->setValidator(validatorEAN13); ui->editTax->setValidator(new QDoubleValidator(0.00, 999999999999.99, 3,ui->editTax)); ui->editExtraTaxes->setValidator(new QDoubleValidator(0.00, 999999999999.99, 3,ui->editExtraTaxes)); ui->editCost->setValidator(new QDoubleValidator(0.00, 999999999999.99, 3, ui->editCost)); ui->editPoints->setValidator(new QIntValidator(0,999999999, ui->editPoints)); ui->editFinalPrice->setValidator(new QDoubleValidator(0.00,999999999999.99, 3, ui->editFinalPrice)); ui->editItemsPerBox->setValidator(new QDoubleValidator(0.00,999999999999.99, 2, ui->editItemsPerBox)); ui->editPricePerBox->setValidator(new QDoubleValidator(0.00,999999999999.99, 2, ui->editPricePerBox)); ui->editQty->setValidator(new QDoubleValidator(0.00,999999999999.99, 2, ui->editQty)); connect( ui->btnPhoto , SIGNAL( clicked() ), this, SLOT( changePhoto() ) ); connect( ui->btnCalculatePrice , SIGNAL( clicked() ), this, SLOT( calculatePrice() ) ); connect( ui->editItemsPerBox , SIGNAL( textEdited(const QString &) ), this, SLOT( calculatePrice() ) ); connect( ui->editPricePerBox , SIGNAL( textEdited(const QString &) ), this, SLOT( calculatePrice() ) ); connect( ui->editCost , SIGNAL( textEdited(const QString &) ), this, SLOT( calculatePrice() ) ); connect( ui->editTax , SIGNAL( textEdited(const QString &) ), this, SLOT( calculatePrice() ) ); connect( ui->editExtraTaxes , SIGNAL( textEdited(const QString &) ), this, SLOT( calculatePrice() ) ); connect( ui->editUtility , SIGNAL( textEdited(const QString &) ), this, SLOT( calculatePrice() ) ); connect( ui->editCode, SIGNAL(textEdited(const QString &)), SLOT(checkIfCodeExists())); connect( ui->editCode, SIGNAL(returnPressed()), ui->editQty, SLOT(setFocus())); connect( ui->btnAddItem, SIGNAL( clicked() ), this, SLOT( addItemToList() ) ); connect(ui->groupBoxedItem, SIGNAL(toggled(bool)), this, SLOT(focusItemsPerBox(bool)) ); connect(ui->btnRemoveItem, SIGNAL( clicked() ), SLOT( deleteSelectedItem() ) ); ui->chIsAGroup->setDisabled(true); status = estatusNormal; productExists = false; productsHash.clear(); resetEdits(); totalBuy = 0.0; itemCount = 0.0; totalTaxes = 0.0; QTimer::singleShot(500, this, SLOT(setupTable())); }
void hgLoadGenePred(char *db, char *table, int numGenePreds, char **genePredFiles) /* hgLoadGenePred - Load up a mySQL database genePred table. */ { struct genePred *genes = loadGenes(numGenePreds, genePredFiles); struct sqlConnection *conn = sqlConnect(db); char *tmpDir = "."; FILE *tabFh = hgCreateTabFile(tmpDir, table); mkTabFile(db, genes, tabFh); genePredFreeList(&genes); setupTable(db, conn, table); hgLoadTabFile(conn, tmpDir, table, &tabFh); sqlDisconnect(&conn); hgRemoveTabFile(tmpDir, table); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); // tab 1 - QGraphicsScene with ScrollPanner setupGraphicsScene(); // tab 2 - QTable with ScrollPanner setupTable(); // tab 3 - QTextBrowser with ScrollPanner setupTextBrowser(); }
void doTests() /* Run our set of tests that use functions exploited by -dbLink flag. */ { struct sqlConnection *conn = dbConnect(); testCommaOutputInput(); testTabOutputInput(); setupTable(conn); testInsertion(conn, FALSE); testInsertion(conn, TRUE); dropTable(conn); if(numFailed == 0) warn("dbLinkTest: PASSED. All %d tests passed", numPassed); else warn("dbLinkTest: FAILURES. %d tests failed", numFailed); sqlDisconnect(&conn); }
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(); } }
void ossimHistogramRemapper::buildTable() { setupTable(); switch(theStretchMode) { case ossimHistogramRemapper::LINEAR_ONE_PIECE: { buildLinearTable(); break; } case ossimHistogramRemapper::LINEAR_AUTO_MIN_MAX: { buildAutoLinearMinMaxTable(); break; } case ossimHistogramRemapper::LINEAR_1STD_FROM_MEAN: case ossimHistogramRemapper::LINEAR_2STD_FROM_MEAN: case ossimHistogramRemapper::LINEAR_3STD_FROM_MEAN: buildLinearTableStdFromMean(); break; default: if(traceDebug()) { ossimNotify(ossimNotifyLevel_WARN) << "ossimHistogramRemapper::buildTable ERROR!" << "\nUnknown stretch type!" << endl; } break; } if (traceDebug()) { ossimNotify(ossimNotifyLevel_DEBUG) << "ossimHistogramRemapper::buildTable DEBUG:\n" << endl; print(ossimNotify(ossimNotifyLevel_DEBUG)); } }
void PaymentDialog::setModel(QAbstractItemModel *model, int mode, Entity *view) { paymentModel = (PaymentModel *) model; this->mode = mode; this->view = view; payment = new Payment(); int id; if (mode == OTHER) { payModelF->setFilterRole(PayModel::otherRole); payModelF->setMatchValue(true); ui->table->hide(); adjustSize(); return; } else if (mode == ORDER) { id = view->fields["ordr_id"].toInt(); payModelF->setFilterRole(PayModel::orderRole); payModelF->setMatchValue(true); QString info = QString::fromUtf8("Заказ №%1 ").arg(id); setupInfo(info); ui->total->setMoney(Money(view->fields["ordr_debt"])); setupTable(id, Pay::ORDER); } else if (mode == MATERIAL) { id = view->fields["material_id"].toInt(); Material *material = (Material *) view; payModelF->setFilterRole(PayModel::materialRole); payModelF->setMatchValue(true); QString info = QString::fromUtf8("%1 %2 %3") .arg(material->getProductName()) .arg(material->getStockName()) .arg(material->getParametr()); setupInfo(info); ui->total->setMoney(Money(view->fields["material_debt"])); QString invoice = view->fields["material_invoice"].toString(); ui->invoice->setInvoice(invoice); setupTable(id, Pay::MATERIAL); } else if (mode == DEPOSIT) { id = view->fields["payment_field_id"].toInt(); Payment *depositPayment = (Payment *) view; int type = depositPayment->getPayType(); int paymentId = view->fields["payment_id"].toInt(); if (type == Pay::ORDER ) { payModelF->setFilterRole(PayModel::debtOrderRole); setupTable(paymentId, Pay::ORDER); } else if (type == Pay::MATERIAL ) { payModelF->setFilterRole(PayModel::debtMaterialRole); setupTable(paymentId, Pay::MATERIAL); } else if (type == Pay::OTHER ) { payModelF->setFilterRole(PayModel::debtOtherRole); setupTable(paymentId, Pay::OTHER); } payModelF->setMatchValue(true); QString info = QString::fromUtf8("Относится к платежу %1.") .arg(paymentId); setupInfo(info); int cents = abs(view->fields["payment_debt"].toInt()); ui->total->setMoney(Money(cents)); QString invoice = view->fields["payment_invoice"].toString(); ui->invoice->setInvoice(invoice); } payment->fields["payment_field_id"] = id; }
BitSplit::BitSplit() { fontDb.addApplicationFont(":/fonts/OpenSans-Light.ttf"); fontDb.addApplicationFont(":/fonts/OpenSans-Regular.ttf"); exit = true; blockToggle = false; searchExisting = false; /* Timer setup*/ guiUpdater = new QTimer( this ); guiUpdater->setInterval(25); syncAnimator = new QTimer( this ); syncAnimator->setInterval(75); /* Interface setup */ fileInterface.debug = false; fileInterface.copyDirection = BothDirections; actionCreator.fileInterface = &fileInterface; smartMatch.fileInterface = &fileInterface; actionHandler.fileInterface = &fileInterface; updater.fileInterface = &fileInterface; /* Set up icons */ remove = new QIcon(":images/general/remove.png"); done = new QIcon(":images/table/tick.png"); errorIcon = new QIcon(":images/table/error.png"); skip = new QIcon(":images/table/skip.png"); sync1 = new QIcon(":images/table/sync1.png"); syncAnimation.append(sync1); sync2 = new QIcon(":images/table/sync2.png"); syncAnimation.append(sync2); sync3 = new QIcon(":images/table/sync3.png"); syncAnimation.append(sync3); sync4 = new QIcon(":images/table/sync4.png"); syncAnimation.append(sync4); sync5 = new QIcon(":images/table/sync5.png"); syncAnimation.append(sync5); sync6 = new QIcon(":images/table/sync6.png"); syncAnimation.append(sync6); sync7 = new QIcon(":images/table/sync7.png"); syncAnimation.append(sync7); sync8 = new QIcon(":images/table/sync8.png"); syncAnimation.append(sync8); ui.setupUi( this ); ui.runButton->setDisabled(true); /* Connect buttons to their dialogs */ connect(ui.editSettingsButton, SIGNAL(clicked()), this, SLOT(editSettings())); connect(ui.newProfileButton, SIGNAL(clicked()), this, SLOT(newProfile())); /* Log Connections*/ connect(ui.actionView_Log, SIGNAL(triggered()), this, SLOT(showLog())); connect(ui.exitLog, SIGNAL(clicked()), this, SLOT(showMain())); connect(&fileInterface, SIGNAL(updateLog(QString)), ui.log, SLOT(append(QString))); connect(ui.errorViewLog, SIGNAL(clicked()), this, SLOT(showLog())); /* Top Bar connections*/ connect(&fileInterface, SIGNAL(matchComplete()), this, SLOT(matchComplete())); connect(&fileInterface, SIGNAL(updateSingle(QString)), ui.topBarSingle, SLOT(setText(QString))); connect(&fileInterface, SIGNAL(updateTopMP(QString)), ui.mp_top, SLOT(setText(QString))); connect(&fileInterface, SIGNAL(updateBottomMP(QString)), ui.mp_bottom, SLOT(setText(QString))); connect(&fileInterface, SIGNAL(updateOperationMP(QString)), ui.mp_operation, SLOT(setText(QString))); connect(guiUpdater, SIGNAL(timeout()), &smartMatch, SLOT(updateGuiLabels())); connect(&smartMatch, SIGNAL(startTime()), guiUpdater, SLOT(start())); connect(&smartMatch, SIGNAL(stopTime()), guiUpdater, SLOT(stop())); connect(&smartMatch, SIGNAL(setTopBarLineStack(int)), this, SLOT(setTopBarLineStack(int))); /* Unmatched files tree Connections */ connect(ui.unmatchedTree, SIGNAL(itemChanged(QTreeWidgetItem*,int)), this, SLOT(toggleTree(QTreeWidgetItem*,int))); connect(&fileInterface, SIGNAL(updateFileTree(bool, QTreeWidgetItem *)), this, SLOT(insertTreeItem(bool, QTreeWidgetItem *))); connect(&fileInterface, SIGNAL(pop()), this, SLOT(popParent())); connect(&fileInterface, SIGNAL(expandTree()), this, SLOT(expandTree())); /* Matched Table Connections */ connect(&fileInterface, SIGNAL(insertMatchTableRow(QList<QTableWidgetItem*>*)), this, SLOT(insertMatchTableRow(QList<QTableWidgetItem*>*))); /* Action Table Connections*/ connect(&fileInterface, SIGNAL(insertActionTableRow(QList<QTableWidgetItem*>*)), this, SLOT(insertActionTableRow(QList<QTableWidgetItem*>*))); /* Error connections */ connect(&smartMatch, SIGNAL(operationFailed()), this, SLOT(error())); connect(&actionCreator, SIGNAL(operationFailed()), this, SLOT(error())); connect(&actionHandler, SIGNAL(exception()), this, SLOT(error())); /* Developer Test Connections */ connect(ui.actionDeveloper_Test, SIGNAL(triggered()), this, SLOT(runDeveloperTest())); connect(&smartMatch, SIGNAL(stopTestTime()), this, SLOT(endTimer())); /* Action Handler Connections */ connect(&actionHandler, SIGNAL(updateProgress(int)), ui.progressBar, SLOT(setValue(int))); connect(&actionHandler, SIGNAL(updateActionLabel(QString)), ui.actionLabel, SLOT(setText(QString))); connect(&actionHandler, SIGNAL(updateSpeedLabel(QString)), ui.speedLabel, SLOT(setText(QString))); connect(&actionHandler, SIGNAL(updatePercentageLabel(QString)), ui.mp_busyIndicator, SLOT(setText(QString))); connect(&actionHandler, SIGNAL(setComplete(int)), this, SLOT(setDone(int))); connect(&actionHandler, SIGNAL(setSkipped(int)), this, SLOT(setSkip(int))); connect(&actionHandler, SIGNAL(setError(int)), this, SLOT(setError(int))); connect(&actionHandler, SIGNAL(setInProgress(int)), this, SLOT(setSync(int))); /* Updater Connections */ connect(&updater, SIGNAL(complete()), this, SLOT(updaterComplete())); /* General Connections & Button Stack Connections */ connect(syncAnimator, SIGNAL(timeout()), this, SLOT(showSync())); connect(ui.finishEditButton, SIGNAL(clicked()), this, SLOT(createActions())); connect(&actionCreator, SIGNAL(complete()), this, SLOT(actionsComplete())); connect(ui.runButton, SIGNAL(clicked()), this, SLOT(runActionHandler())); connect(ui.searchButton, SIGNAL(clicked()), this, SLOT(searchForSync())); connect(&actionHandler, SIGNAL(complete()), this, SLOT(actionHandlerComplete())); /* General Setup*/ frame = 0; currentAction = -1; actionHandler.table = ui.actionsTable; ui.mp_ProfileLabel->fontMetrics().width(ui.mp_ProfileLabel->text()); createTrayIcon(); setupTable(); fileInterface.loadDatabase(); recentProfiles = fileInterface.loadRecentProfiles(); if(recentProfiles.size() > 0) showRecentProfiles(); }
PlayListTable::PlayListTable(boost::shared_ptr<ClientGroup>clientGroup, QWidget *parent): QTableWidget(parent), m_ClientGroup(clientGroup) { setupTable(); }
/** * Program entry. Sets up OpenGL state, GLSL Shaders and GLUT window and function call backs * Takes no arguments */ int main(int argc, char **argv) { std::cout << "Controls: arrow keys rotate cube\n"; // Set up GLUT window glutInit(&argc, argv); glutInitWindowPosition(100, 0); glutInitWindowSize(winX, winY); #ifdef __APPLE__ glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH | GLUT_3_2_CORE_PROFILE); #else glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH ); #endif glutCreateWindow("Many Attributes"); // Initialize GLEW glewExperimental = true; // Needed for core profile if (glewInit() != GLEW_OK) { fprintf(stderr, "Failed to initialize GLEW\n"); return -1; } lightProgramID = LoadShaders("pv-light.vert", "pv-light.frag"); if (lightProgramID == 0) { fprintf(stderr, "Can't compile shaders!\n"); return 1; } glUseProgram(lightProgramID); if (setupLight() !=0) return 1; glClearColor(0.2f, 0.2f, 0.2f, 1.0f); glEnable(GL_DEPTH_TEST); glFrontFace(GL_CCW); tableprogramID = LoadShaders("pv-light.vert", "pv-light.frag"); if (tableprogramID == 0) return 1; if (setupTable() !=0) return 1; skyID = LoadShaders("sky.vert", "sky.frag"); if (skyID == 0) return 1; glUseProgram(skyID); if (setup() !=0) return 1; // Here we set a new function callback which is the GLUT handling of keyboard input glutKeyboardFunc(keyboardDown); glutSpecialFunc(SpecialFunc); glutMouseFunc(MouseFunc); glutMotionFunc(MotionFunc); glutDisplayFunc(render); glutReshapeFunc(reshapeFunc); glutMainLoop(); return 0; }