// main: get DOSs // assume "system" and "qpoints" generated // assume eigenvalues and eigenvectors generated int main(int argc,char *argv[]) { int withVecs=atoi(argv[1]); double dBin=atof(argv[2]); initSetup(); pd(withVecs,dBin); printf("Ssee program? iss kap\\\"ut.\n"); }
void PaintView::autoDraw(bool randomSize) { glClear(GL_COLOR_BUFFER_BIT); initSetup(); glBlendFunc(GL_NONE, GL_NONE); glDisable(GL_BLEND); int canvasWidth = m_pDoc->m_nWidth; int canvasHeight = m_pDoc->m_nHeight; int spacing = m_pDoc->getSpacing(); Point source(coord.x + m_nStartCol, m_nEndRow - coord.y); Point target(coord.x, m_nWindowHeight - coord.y); for (int i = 0; i < canvasWidth; i += spacing) { for (int j = 0; j < canvasHeight; j += spacing) { m_pDoc->m_pCurrentBrush->BrushBegin(Point(m_nStartCol, m_nEndRow), Point(0, m_nWindowHeight)); m_pDoc->m_pCurrentBrush->BrushMove(Point(i + m_nStartCol, m_nEndRow - j), Point(i, m_nWindowHeight - j)); } } m_pDoc->m_pCurrentBrush->BrushEnd(Point(canvasWidth - 1 + m_nStartCol, m_nEndRow - canvasHeight - 1), Point(canvasWidth - 1, m_nWindowHeight - canvasHeight - 1)); SaveCurrentContent(); glFlush(); #ifndef MESA // To avoid flicker on some machines. glDrawBuffer(GL_BACK); #endif // !MESA }
UserDialog::UserDialog(QSqlRelationalTableModel *model, QSqlRecord &record, int row, QWidget *parent) :QDialog(parent), userModel(model), userRecord(record), userRow(row) { initSetup(); fillFieldInputs(); connect(okButton, SIGNAL(clicked()), this, SLOT(editUser())); }
UserDialog::UserDialog(QSqlRelationalTableModel *model, QWidget *parent) :QDialog(parent), userModel(model) { initSetup(); connect(okButton, SIGNAL(clicked()), this, SLOT(addUser())); }
void PaintView::draw() { initSetup(); if ( m_pDoc->m_ucPainting && !isAnEvent) { RestoreContent(); // restore content upon refresh } if (m_pDoc->m_ucPainting && isAnEvent) { // Clear it after processing. isAnEvent = 0; Point source(coord.x + m_nStartCol, m_nEndRow - coord.y); Point target(coord.x, m_nWindowHeight - coord.y); // This is the event handler switch (eventToDo) { case LEFT_MOUSE_DOWN: m_pDoc->m_pUI->m_SizeRandButton->value(0); m_pDoc->m_pUI->setSizeRand(FALSE); savePreviousStrokes(); // save previous strokes before creating new strokes RestoreContent(); // put the strokes to colour buffer (no background) m_pDoc->m_pCurrentBrush->BrushBegin(source, target); // place the strokes to the colour buffer SaveCurrentContent(); // save the strokes to the buffer break; case LEFT_MOUSE_DRAG: RestoreContent(); m_pDoc->m_pCurrentBrush->BrushMove(source, target); SaveCurrentContent(); break; case LEFT_MOUSE_UP: RestoreContent(); m_pDoc->m_pCurrentBrush->BrushEnd(source, target); SaveCurrentContent(); // save current strokes break; case RIGHT_MOUSE_DOWN: firstCoord = target; // Implement the right mouse stroke direction here rightClickDirectionLine = new RightClickDirectionLine(m_pDoc, "Right Click Direction Line"); rightClickDirectionLine->BrushBegin(source, target); break; case RIGHT_MOUSE_DRAG: // We need to release the current content because // each mouse drag refers to a different angle RestoreContent(); rightClickDirectionLine->BrushMove(source, target); break; case RIGHT_MOUSE_UP: RestoreContent(); rightClickDirectionLine->BrushEnd(source, target); angle = LineBrush::DetermineAngle(firstCoord, target); m_pDoc->setLineAngle(angle); delete rightClickDirectionLine; rightClickDirectionLine = NULL; break; default: printf("Unknown event!!\n"); break; } } // put the background on top of the stroke // it sounds stupid, but if we want to do the other way, // we need to make everything rbga rather than rbg if (m_pDoc->m_ucPainting) { displayBackground(); } glFlush(); #ifndef MESA // To avoid flicker on some machines. glDrawBuffer(GL_BACK); #endif // !MESA }