FFont * newFFont(char * loc) { //Creates a new font FFont * temp = (FFont *) c_malloc(sizeof(FFont)); int w, h, size, x, y; short bpp = 0; char * data; Tex * letter; temp->nLetters = 0; data = loadTGA(loc, &w, &h, &bpp); size = w / 16; /* Loading the data from our font image (deylen - 14/05/2009)*/ for (y=0; y < 16; y++) for (x=0; x < 16; x++){ letter = newLetter(data, x, 15 - y, size, bpp, w); temp->letters = (Tex **) listAdd((void **) temp->letters, size_tex_p, letter, &temp->nLetters); } /* Running through the image and creating each letter (deylen - 14/05/2009)*/ temp->size = size / 16.0; free(data); return temp; }
void MainWindow::init(){ createActions(); createMenus(); //createToolBars(); createStatusBar(); createDockWindows(); //setUnifiedTitleAndToolBarOnMac(true); newLetter(); }
//! [1] MainWindow::MainWindow() : textEdit(new QTextEdit) { setCentralWidget(textEdit); createActions(); createStatusBar(); createDockWindows(); setWindowTitle(tr("Dock Widgets")); newLetter(); setUnifiedTitleAndToolBarOnMac(true); }
MainWindow::MainWindow() { textEdit = new QTextEdit; setCentralWidget(textEdit); createActions(); createMenus(); createToolBars(); createStatusBar(); createDockWindows(); setWindowTitle(tr("Dock Widgets")); newLetter(); }
void MainWindow::createActions(){ newLetterAct = new QAction(QIcon(":/images/new.png"), tr("&New Letter"), this); newLetterAct->setShortcuts(QKeySequence::New); newLetterAct->setStatusTip(tr("Create a new form letter")); connect(newLetterAct, SIGNAL(triggered()), this, SLOT(newLetter())); saveAct = new QAction(QIcon(":/images/save.png"), tr("&Save..."), this); saveAct->setShortcuts(QKeySequence::Save); saveAct->setStatusTip(tr("Save the current form letter")); connect(saveAct, SIGNAL(triggered()), this, SLOT(save())); printAct = new QAction(QIcon(":/images/print.png"), tr("&Print..."), this); printAct->setShortcuts(QKeySequence::Print); printAct->setStatusTip(tr("Print the current form letter")); // connect(printAct, SIGNAL(triggered()), this, SLOT(print())); undoAct = new QAction(QIcon(":/images/undo.png"), tr("&Undo"), this); undoAct->setShortcuts(QKeySequence::Undo); undoAct->setStatusTip(tr("Undo the last editing action")); connect(undoAct, SIGNAL(triggered()), this, SLOT(undo())); quitAct = new QAction(tr("&Quit"), this); quitAct->setShortcuts(QKeySequence::Quit); quitAct->setStatusTip(tr("Quit the application")); connect(quitAct, SIGNAL(triggered()), this, SLOT(close())); settingsAct = new QAction(tr("&Settings..."), this); settingsAct->setStatusTip(tr("Open the settings dialog")); connect(settingsAct, SIGNAL(triggered()), client->settingsDialog, SLOT(show())); aboutAct = new QAction(tr("&About"), this); aboutAct->setStatusTip(tr("Show the application's About box")); connect(aboutAct, SIGNAL(triggered()), this, SLOT(about())); aboutQtAct = new QAction(tr("About &Qt"), this); aboutQtAct->setStatusTip(tr("Show the Qt library's About box")); connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt())); }
void MainWindow::createActions() { newLetterAct = new QAction(QIcon(":/images/new.png"), tr("&New Letter"), this); newLetterAct->setShortcut(tr("Ctrl+N")); newLetterAct->setStatusTip(tr("Create a new form letter")); connect(newLetterAct, SIGNAL(triggered()), this, SLOT(newLetter())); saveAct = new QAction(QIcon(":/images/save.png"), tr("&Save..."), this); saveAct->setShortcut(tr("Ctrl+S")); saveAct->setStatusTip(tr("Save the current form letter")); connect(saveAct, SIGNAL(triggered()), this, SLOT(save())); printAct = new QAction(QIcon(":/images/print.png"), tr("&Print..."), this); printAct->setShortcut(tr("Ctrl+P")); printAct->setStatusTip(tr("Print the current form letter")); connect(printAct, SIGNAL(triggered()), this, SLOT(print())); undoAct = new QAction(QIcon(":/images/undo.png"), tr("&Undo"), this); undoAct->setShortcut(tr("Ctrl+Z")); undoAct->setStatusTip(tr("Undo the last editing action")); connect(undoAct, SIGNAL(triggered()), this, SLOT(undo())); quitAct = new QAction(tr("&Quit"), this); quitAct->setShortcut(tr("Ctrl+Q")); quitAct->setStatusTip(tr("Quit the application")); connect(quitAct, SIGNAL(triggered()), this, SLOT(close())); aboutAct = new QAction(tr("&About"), this); aboutAct->setStatusTip(tr("Show the application's About box")); connect(aboutAct, SIGNAL(triggered()), this, SLOT(about())); aboutQtAct = new QAction(tr("About &Qt"), this); aboutQtAct->setStatusTip(tr("Show the Qt library's About box")); connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt())); }
void FenPrincipale::createActions() { newLetterAct = new QAction(QIcon(":/images/new.png"), tr("&New Letter"), this); newLetterAct->setShortcuts(QKeySequence::New); newLetterAct->setStatusTip(tr("Create a new form letter")); connect(newLetterAct, SIGNAL(triggered()), this, SLOT(newLetter())); saveAct = new QAction(QIcon(":/images/save.png"), tr("&Save..."), this); saveAct->setShortcuts(QKeySequence::Save); saveAct->setStatusTip(tr("Save the current form letter")); connect(saveAct, SIGNAL(triggered()), this, SLOT(save())); printAct = new QAction(QIcon(":/images/print.png"), tr("&Print..."), this); printAct->setShortcuts(QKeySequence::Print); printAct->setStatusTip(tr("Print the current form letter")); connect(printAct, SIGNAL(triggered()), this, SLOT(print())); undoAct = new QAction(QIcon(":/images/undo.png"), tr("&Undo"), this); undoAct->setShortcuts(QKeySequence::Undo); undoAct->setStatusTip(tr("Undo the last editing action")); connect(undoAct, SIGNAL(triggered()), this, SLOT(undo())); quitAct = new QAction(tr("&Quit"), this); quitAct->setShortcuts(QKeySequence::Quit); quitAct->setStatusTip(tr("Quit the application")); connect(quitAct, SIGNAL(triggered()), this, SLOT(close())); aboutAct = new QAction(tr("&About"), this); aboutAct->setStatusTip(tr("Show the application's About box")); connect(aboutAct, SIGNAL(triggered()), this, SLOT(about())); aboutQtAct = new QAction(tr("About &Qt"), this); aboutQtAct->setStatusTip(tr("Show the Qt library's About box")); connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt())); ajoutLigne = new QAction(tr("ajout ss"),this); ajoutLigne->setStatusTip(tr("ajout station Stationnées")); connect (ajoutLigne, SIGNAL(triggered()),this, SLOT(insertRowss())); ajoutLigneMesures = new QAction(tr("ajout pt"),this); ajoutLigneMesures->setStatusTip(tr("ajout point rayonnnés")); connect (ajoutLigneMesures, SIGNAL(triggered()),this, SLOT(insertRow())); supprLigneMesures = new QAction (tr("suppr mesures"),this); supprLigneMesures->setStatusTip (tr("supprimer un points")); supprLigneMesures->setShortcuts(QKeySequence::Delete); connect (supprLigneMesures, SIGNAL(triggered()),this, SLOT(deleteRow())); supprLigne = new QAction (tr("suppr ss"),this); supprLigne->setStatusTip (tr("supprimer une ss")); supprLigne->setShortcuts(QKeySequence::Delete); connect (supprLigne, SIGNAL(triggered()),this, SLOT(deleteRowss())); submitSS = new QAction (tr("conf action"),this); submitSS->setStatusTip (tr("confirmer les changements")); connect (submitSS , SIGNAL (triggered()),this, SLOT (submitChangement())); importGSI = new QAction (tr ("Importation Gsi"),this); importGSI->setStatusTip(tr("Importation de carnet")); connect (importGSI, SIGNAL(triggered()),this, SLOT(ImportGSI2())); actionafficherPolygonal = new QAction (tr ("Affichage de la poloygo"),this); connect (actionafficherPolygonal, SIGNAL(triggered()), this, SLOT(afficherPolygonal())); actioncreerProjet = new QAction (tr("Créer projet"),this); connect ( actioncreerProjet,SIGNAL(triggered()), this, SLOT(creerProjet())); actionouvrirProjet = new QAction (tr("Ouvrir projet"),this); connect (actionouvrirProjet,SIGNAL(triggered()), this, SLOT(ouvrirProjet())); }