Esempio n. 1
0
void RenderWindow::filePrintToPDF()
{
  QString outfile = QFileDialog::getSaveFileName( this, tr("Choose filename to save"), tr("print.pdf"), tr("Pdf (*.pdf)") );

  if(outfile.isEmpty()) // User canceled save dialog
    return;
  
  // BVI::Sednacom
  // use the new member
  filePrintToPDF(outfile);
  // BVI::Sednacom
}
Esempio n. 2
0
/*
 *  Constructs a RenderWindow as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 */
RenderWindow::RenderWindow(QWidget* parent, const char* name, Qt::WFlags fl)
    : QMainWindow(parent, name, fl)
{
    setupUi(this);

    (void)statusBar();

    // signals and slots connections
    connect(fileOpenAction, SIGNAL(activated()), this, SLOT(fileOpen()));
    connect(filePrintAction, SIGNAL(activated()), this, SLOT(filePrint()));
    connect(filePrintToPDFAction, SIGNAL(activated()), this, SLOT(filePrintToPDF()));
    connect(fileExitAction, SIGNAL(activated()), this, SLOT(fileExit()));
    connect(helpAboutAction, SIGNAL(activated()), this, SLOT(helpAbout()));
    connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
    connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit()));
    connect(_add, SIGNAL(clicked()), this, SLOT(sAdd()));
    connect(_table, SIGNAL(selectionChanged()), this, SLOT(sSelectionChanged()));
    connect(_list, SIGNAL(clicked()), this, SLOT(sList()));
}
Esempio n. 3
0
RenderWindow::RenderWindow(QWidget* parent, Qt::WindowFlags fl)
    : QMainWindow(parent, fl)
{
  setupUi(this);

  (void)statusBar();

  // signals and slots connections
  connect(fileOpenAction, SIGNAL(activated()), this, SLOT(fileOpen()));
  connect(fileLoadFromDB, SIGNAL(activated()), this, SLOT(fileLoad()));
  connect(filePrintPreviewAction, SIGNAL(activated()), this, SLOT(filePreview()));
  connect(filePrintAction, SIGNAL(activated()), this, SLOT(filePrint()));
  connect(filePrintToPDFAction, SIGNAL(activated()), this, SLOT(filePrintToPDF()));
  connect(fileExitAction, SIGNAL(activated()), this, SLOT(fileExit()));
  connect(helpAboutAction, SIGNAL(activated()), this, SLOT(helpAbout()));
  connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
  connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit()));
  connect(_add, SIGNAL(clicked()), this, SLOT(sAdd()));
  connect(_table, SIGNAL(itemSelectionChanged()), this, SLOT(sSelectionChanged()));
  connect(_list, SIGNAL(clicked()), this, SLOT(sList()));
  _autoPrint = false;                    //AUTOPRINT
}