Ejemplo n.º 1
0
void GL_widget_3::print_to_printer() {
	QPrinter printer;

	QPrintDialog print_dialog(&printer/*, this*/);
    if (print_dialog.exec() == QDialog::Accepted) {
		//something different here
	}
}
Ejemplo n.º 2
0
/* Print all dialogs. */
static void print_all_dialogs()
{
    pjsip_dlg *dlg = (pjsip_dlg *)global.user_agent->dlg_list.next;

    puts("List all dialogs:");

    while (dlg != (pjsip_dlg *) &global.user_agent->dlg_list) {
	printf("%c", (dlg==global.cur_dlg ? '*' : ' '));
	print_dialog(dlg);
	dlg = dlg->next;
    }

    puts("");
}
Ejemplo n.º 3
0
void FlowTab::Print()
{
    QPrinter printer;
    QPrintDialog print_dialog(&printer, this);
    print_dialog.setWindowTitle(tr("Print %1").arg(GetFilename()));

    if (print_dialog.exec() == QDialog::Accepted) {
        if (m_ViewState == MainWindow::ViewState_BookView) {
            m_wBookView->print(&printer);
        } else if (m_ViewState == MainWindow::ViewState_CodeView) {
            m_wCodeView->print(&printer);
        }
    }
}
Ejemplo n.º 4
0
void GL_widget_2::print_to_printer() {
	QPrinter printer;

	QPrintDialog print_dialog(&printer, this);
    if (print_dialog.exec() == QDialog::Accepted) {
		QPainter painter;
		set_renderer_type(GL_widget_2::QT_PAINTER);
		set_painter(&painter);
		painter.begin(&printer);
		paint_to_painter();
		painter.end();
		set_painter(0);
		set_renderer_type(GL_widget_2::OPEN_GL);
	}
}
Ejemplo n.º 5
0
/* if prompt is zero then we are really a menu */
word open_dialog(char *title, word width, word height, char *prompt)
{

    word num;

    if ( (num=spare_window())==-1)
        return ERRM_NOSPARE;

    dlog=wlist[num];

    /* centered on screen */
    dlog->x=(maxw-width-2)/2;
    dlog->y=(maxh-height-2)/2;
    dlog->w=width+2;
    dlog->h=height+2;

    dlog->open=TRUE;
    dlog->number=num;
    dlog->type=WTYPE_DIALOG;
    dlog->magic=NULL;
    add_wlist(dlog);

    /* mark us on the screen, carefully as we are not in the wlist */
    window_cls(dlog);
    window_title2(dlog,title,FALSE);
    recalcw(dlog);
    update_rectangle(dlog->x,dlog->y,dlog->w,dlog->h);

    line_buffer=dlog_line;			/* where it will be remembered */

    if (prompt)
    {
        winit_command(dlog);
        if (dlog->type==WTYPE_NONE)
        {
            close_dialog();
            return ERRM_NOMEMORY;
        }

        print_dialog(1,prompt);			/* print prompt */
        dlog->xpos=DLOGX;
        dlog->ypos++;
        start_command(dlog,"");
    }

    return 0;

}
Ejemplo n.º 6
0
void ChronoDuino::printAction()
{
	PrintDialog print_dialog(this);
	print_dialog.exec();
}