示例#1
0
int handle_zoom_box (Desktop * d, CEvent * cwevent)
{
    Picture *p;

    set_current_from_pointer (d, cwevent);
    p = &(d->view[d->current_view].pic);

    if (cwevent->state & ControlMask) {
        if ((cwevent->button == Button1
                && (cwevent->type == ButtonRelease
                    || cwevent->type == ButtonPress))
                || (cwevent->state & Button1Mask && cwevent->type == MotionNotify))
            move_marker (p, cwevent);

        if (cwevent->button == Button2 && cwevent->type == ButtonRelease)
            remove_marker (p, cwevent);
    } else {
        if (cwevent->button == Button1 && cwevent->type == ButtonRelease)
            insert_marker (p, cwevent);

        if (cwevent->button == Button2 && cwevent->type == ButtonRelease)
            check_button_release (p, cwevent);
    }

    if (cwevent->type == MotionNotify || cwevent->type == ButtonRelease)
        return check_motion (p, cwevent);

    return 0;
}
示例#2
0
void HaiQTextEdit::remove_markers_of_type(int marker_type) {
	QList<haiq_marker> list=markers.values();
	//bool something_removed=false;
	for (int j=0; j<list.count(); j++) {
		haiq_marker marker=list[j];
		if (marker.marker_type==marker_type) {
			remove_marker(marker.id);
		}
	}
};
示例#3
0
void defaultedit_blockdata::remove_markers_of_type(int marker_type) {
	QList<int> marker_types;
	
	for (int j=0; j<markers.count(); j++) {
		marker_types << markers[j].marker_type;
	}
	for (int j=0; j<marker_types.count(); j++) {
		if (marker_types[j]==marker_type) {
			remove_marker(markers[j].id);
		}
	}
}