void PathParser::run(const cxform& cx, const SWFMatrix& /*mat*/) { // Since we frequently remove an element from the front or the back, we use // a double ended queue here. typedef std::deque<UnivocalPath> UniPathList; std::vector<UniPathList> unipathvec(_num_styles); for (size_t i = 0; i < _paths.size(); ++i) { if (_paths[i].empty()) { continue; } int leftfill = _paths[i].getLeftFill(); if (leftfill) { unipathvec[leftfill-1].push_front(UnivocalPath(&_paths[i], UnivocalPath::FILL_LEFT)); } int rightfill = _paths[i].getRightFill(); if (rightfill) { unipathvec[rightfill-1].push_front(UnivocalPath(&_paths[i], UnivocalPath::FILL_RIGHT)); } } for (size_t i = 0; i < _num_styles; ++i) { start_shapes(i+1, cx); UniPathList& path_list = unipathvec[i]; while (!path_list.empty()) { if (closed_shape()) { reset_shape(path_list.front()); path_list.pop_front(); } UniPathList::iterator it = emitConnecting(path_list); if (it == path_list.end()) { if (!closed_shape()) { log_error("path not closed!"); _cur_endpoint = _shape_origin; } } else { path_list.erase(it); } } end_shapes(i+1); } }
ServerInfo::ServerInfo(QString host, int port, Widget* parent) : Widget(parent) { this->host = host; this->port = port; labelHost = new Label(host, this); labelPort = new Label(QString("%1").arg(port), this); buttonConnect = new Button(tr("Connect"), this); buttonDelete = new Button(tr("Delete"), this); connect(buttonConnect, SIGNAL(clicked()), this, SLOT(emitConnecting())); connect(buttonDelete, SIGNAL(clicked()), this, SLOT(emitDeleting())); setFrame(new TextInputFrame()); }