Lib_dialog::Lib_dialog(const QString lib_path) : QDialog(NULL), ui(new Ui::Lib_dialog) { ui->setupUi(this); fx.setPath(lib_path); QMenuBar *menuBar = new QMenuBar(this); QAction *action_save= new QAction("save",this); QAction *action_change= new QAction("change",this); QAction *action_load= new QAction("load",this); menuBar->insertAction(NULL,action_save); menuBar->insertAction(NULL,action_change); menuBar->insertAction(NULL,action_load); connect(action_save,SIGNAL( triggered()) ,this,SLOT(save())); connect(action_load,SIGNAL( triggered()),this,SLOT(open())); connect(action_change,SIGNAL( triggered()),this,SLOT(changelist())); connect(ui->widget, SIGNAL(looking(int*,int*)), this, SLOT(looking(int*,int*))); connect(ui->widget, SIGNAL(setXY(int,int)), this, SLOT(setXY(int,int))); connect(ui->widget, SIGNAL(addPoint()), this, SLOT(addPoint())); connect(ui->MaxX,SIGNAL(textChanged ()),this,SLOT(setMaxX())); connect(ui->MinX,SIGNAL(textChanged ()),this,SLOT(setMinX())); connect(ui->MinY,SIGNAL(textChanged ()),this,SLOT(setMinY())); connect(ui->MaxY,SIGNAL(textChanged ()),this,SLOT(setMaxY())); connect(ui->LX,SIGNAL(textChanged ()),this,SLOT(setX())); connect(ui->LY,SIGNAL(textChanged ()),this,SLOT(setY())); connect(ui->gridX,SIGNAL(textChanged ()),this,SLOT(setgridX())); connect(ui->gridY,SIGNAL(textChanged ()),this,SLOT(setgridY())); connect(ui->widget,SIGNAL(drw ()),this,SLOT( draw ())); connect(ui->widget,SIGNAL(del ()),this,SLOT( del ())); connect(ui->widget,SIGNAL(correct ()),this,SLOT( correct ())); connect(ui->widget,SIGNAL(save ()),this,SLOT( save ())); connect(ui->widget,SIGNAL(open ()),this,SLOT( open ())); connect(ui->widget,SIGNAL(changegrid()),this,SLOT( changegrid())); connect(ui->widget,SIGNAL(change(int,int)),this,SLOT(change(int,int))); //------------------------------------------------------------------------------------------- // в lib_path я передам адрес библиотеки(папки с файлами). Сохрани его сам кудато))) // //-------------------------------------------------------------------------------------------- }
Py::Object pysvn_client::cmd_add_to_changelist( const Py::Tuple &a_args, const Py::Dict &a_kws ) { static argument_description args_desc[] = { { true, name_path }, { true, name_changelist }, { false, name_depth }, { false, name_changelists }, { false, NULL } }; FunctionArguments args( "add_to_changelist", args_desc, a_args, a_kws ); args.check(); std::string type_error_message; SvnPool pool( m_context ); try { apr_array_header_t *targets = targetsFromStringOrList( args.getArg( name_path ), pool ); std::string changelist( args.getUtf8String( name_changelist ) ); apr_array_header_t *changelists = NULL; if( args.hasArg( name_changelists ) ) { changelists = arrayOfStringsFromListOfStrings( args.getArg( name_changelists ), pool ); } svn_depth_t depth = args.getDepth( name_depth, svn_depth_files ); try { checkThreadPermission(); PythonAllowThreads permission( m_context ); svn_error_t *error = svn_client_add_to_changelist ( targets, changelist.c_str(), depth, changelists, m_context, pool ); permission.allowThisThread(); if( error != NULL ) throw SvnException( error ); } catch( SvnException &e ) { // use callback error over ClientException m_context.checkForError( m_module.client_error ); throw_client_error( e ); } } catch( Py::TypeError & ) { throw Py::TypeError( type_error_message ); } return Py::None(); }