void FmFileView::on_delete_triggered() { QList<QFileInfo> files = mWidget->checkedItems(); if (files.size() == 0) { infoNoFileSelected(); } else { if (FmDlgUtils::question( hbTrId("Confirm Deletion?" ) )) { QStringList fileList; for (int i = 0; i < files.size(); ++i) { fileList.push_back( files[i].absoluteFilePath() ); } int ret = mOperationService->asyncRemove( fileList ); switch( ret ) { case FmErrNone: // no error, do not show note to user break; case FmErrAlreadyStarted: // last operation have not finished FmDlgUtils::warning( hbTrId( "Operatin already started!" ) ); break; case FmErrWrongParam: FmDlgUtils::warning( hbTrId( "Wrong parameters!" ) ); break; default: FmDlgUtils::warning( hbTrId( "Operation fail to start!" ) ); } setSelectable( false ); } } }
void WMenuItem::setMenu(WMenu *menu) { subMenu_ = menu; subMenu_->parentItem_ = this; Wt::WContainerWidget *sparent = dynamic_cast<Wt::WContainerWidget *>(subMenu_->parent()); if (sparent) sparent->removeWidget(subMenu_); addWidget(subMenu_); if (subMenu_->isPopup() && parentMenu() && parentMenu()->isPopup()) { subMenu_->webWidget()->setZIndex(std::max(parentMenu()->zIndex() + 100, subMenu_->zIndex())); } WPopupMenu *popup = dynamic_cast<WPopupMenu *>(subMenu_); if (popup) { popup->setJavaScriptMember("wtNoReparent", "true"); setSelectable(false); popup->setButton(anchor()); updateInternalPath(); // WPopupMenus are hidden by default, 'show' this WPopupMenu // but not really, since the parent is still hidden. This fixes // an issue where child widgets would remain unexposed, even // though this submenu was open (e.g. in a submenu where items // are checkable) if (dynamic_cast<WPopupMenu*>(menu_)) popup->show(); } }
LedgerLine::LedgerLine(Score* s) : Line(s, false) { setZ(int(Element::Type::NOTE) * 100 - 50); setSelectable(false); _next = 0; }
VarItem::VarItem(LazyFetchItem *parent, const QString &varName, DataType dataType) : LazyFetchItem (parent), cache_(QCString()), dataType_(dataType), highlight_(false) { setText(VAR_NAME_COLUMN, varName); setSelectable(false); // Order the VarItems so that globals are first, then // constants, class variables, instance variables and // finally local variables // Matches either an array element or a string slice, // Order on the array index or the first number in the // range specifying the slice. QRegExp arrayelement_re("\\[(\\d+)(\\.\\.\\d+)?\\]"); key_ = varName; if (arrayelement_re.search(varName) != -1) { key_.sprintf("%.6d", arrayelement_re.cap(1).toInt()); } else if (key_.startsWith("$")) { key_.prepend("1001"); // Global variable } else if (QRegExp("^[A-Z]").search(varName) != -1) { key_.prepend("1002"); // Constant } else if (key_.startsWith("@@")) { key_.prepend("1003"); // Class variable } else if (key_.startsWith("@")) { key_.prepend("1004"); // Instance variable } else { key_.prepend("1005"); // Local variable or parameter } // kdDebug(9012) << " ### VarItem::VarItem *CONSTR* " << varName << endl; }
void FmFileView::on_copy_triggered() { QList<QFileInfo> files = mWidget->checkedItems(); QStringList srcFileList; if (files.size() == 0) { infoNoFileSelected(); } else { QString targetPathName = FmFileDialog::getExistingDirectory( 0, hbTrId( "copy to" ), QString(""), QStringList() ); if( !targetPathName.isEmpty() && files.size() > 0 ) { targetPathName = FmUtils::fillPathWithSplash( targetPathName ); foreach( QFileInfo fileInfo, files ){ srcFileList.push_back( fileInfo.absoluteFilePath() ); } int ret = mOperationService->asyncCopy( srcFileList, targetPathName ); switch( ret ) { case FmErrNone: // no error, do not show note to user break; case FmErrAlreadyStarted: // last operation have not finished FmDlgUtils::warning( hbTrId( "Operatin already started!" ) ); break; case FmErrWrongParam: FmDlgUtils::warning( hbTrId( "Wrong parameters!" ) ); break; default: FmDlgUtils::warning( hbTrId( "Operation fail to start!" ) ); } setSelectable( false ); }
WatchRoot::WatchRoot(VariableTree *parent) : LazyFetchItem(parent) { setText(VAR_NAME_COLUMN, i18n("Watch")); setOpen(true); setSelectable(false); }
void KMListViewItem::init(KMPrinter *p) { m_state = 0; if (p) updatePrinter(p); setSelectable(depth() == 2); }
void ContactItem::init(Contact *contact, unsigned status, unsigned style, const char *icons, unsigned unread) { m_bOnline = false; m_bBlink = false; setSelectable(true); update(contact, status, style, icons, unread); }
GlobalRoot::GlobalRoot(VariableTree *parent) : LazyFetchItem(parent) { setText(0, i18n("Global")); setExpandable(true); setOpen(false); setSelectable(false); }
DivItem::DivItem(UserListBase *view, unsigned type) : UserViewItemBase(view) { m_type = type; setText(0, QString::number(m_type)); setExpandable(true); setSelectable(false); }
void EditorGroupItem::init(const QString &icon) { setOpen(true); setSelectable(false); m_label = new GroupWidget(this); m_label->setText(text(0)); //todo: icon? if (!icon.isEmpty()) m_label->setIcon( SmallIcon(icon) ); m_label->show(); }
SetupTab::SetupTab(const Widget2 *const widget) : Container(widget), ActionListener(), WidgetListener(), mName() { setOpaque(Opaque_false); addWidgetListener(this); setSelectable(false); }
IpListView(IpListModel* model, Wt::WContainerWidget* p = 0): Wt::WTableView(p) { setModel(model); resize(ILP::WIDTH, ILP::HEIGHT); setColumnWidth(IpListModel::USER, 70); setColumnWidth(IpListModel::TYPE, 70); setColumnWidth(IpListModel::VALUE, 380); setColumnWidth(IpListModel::LAST_USE, 140); setColumnWidth(IpListModel::BAN, 100); setSelectable(true); }
PropertyEditorItem::PropertyEditorItem(KListView *par, const QString &text) : KListViewItem(par, text, "") { m_property = 0; setSelectable(false); setOpen(true); //3 rows per item is enough? setMultiLinesEnabled( true ); setHeight(static_cast<PropertyEditor*>(par)->baseRowHeight()*3); }
ofxLiteGroup::ofxLiteGroup(string name) : ofxLiteBox(name){ setSpacing(); setMaxHeight(); setHoverable(false); setDraggable(false); setSelectable(false); setTriggerable(false); setSortable(false, false); singleSelected = NULL; setSingleSelect(false); dragBox = NULL; }
KWCopyShape::KWCopyShape(KoShape *original, const KWPageManager *pageManager) : KoShape() ,m_original(original) ,m_pageManager(pageManager) { setSize(m_original->size()); setSelectable(original->isSelectable()); // allow selecting me to get the tool for the original to still work. QSet<KoShape*> delegates; delegates << m_original; setToolDelegates(delegates); kDebug(32001) << "originalShape=" << m_original; }
void MenuManager::setupAbout() { ABOUTMENU = new Menu(logic); ABOUTMENU->addTopMenuComponent(new MenuComponent(logic, "Back", [=]{ logic->window->changeMenu(MAINMENU); } )); auto line = ABOUTMENU->addMenuComponent(new MenuComponent(logic, "MIT License", nullptr)); line->setSelectable(false); line = ABOUTMENU->addMenuComponent(new MenuComponent(logic, std::string("Space-Invaders ") + std::string(VERSION), nullptr)); line->setSelectable(false); line = ABOUTMENU->addMenuComponent(new MenuComponent(logic, "Programmed with love and anger by Redyz", nullptr)); line->setSelectable(false); auto last = ABOUTMENU->addBottomMenuComponent(new MenuComponent(logic, " ", nullptr)); last->setSelectable(false); }
void BridgeItem::init() { // Hover Events // // setAcceptHoverEvents(true); setSelectable(); setFlag(ItemIsFocusable); // Save a tunnel // tunnel_ = dynamic_cast<Tunnel *>(bridge_); // Signal Editor // signalEditor_ = dynamic_cast<SignalEditor *>(getProjectGraph()->getProjectWidget()->getProjectEditor()); // Signal Manager // signalManager_ = getProjectData()->getProjectWidget()->getMainWindow()->getSignalManager(); // Category Size // categorySize_ = signalManager_->getCategoriesSize(); // Context Menu // // QAction *removeRoadAction = getRemoveMenu()->addAction(tr("Bridge")); connect(removeRoadAction, SIGNAL(triggered()), this, SLOT(removeBridge())); if (getTopviewGraph()) // not for profile graph { // Text // // bridgeTextItem_ = new BridgeTextItem(this, bridge_); bridgeTextItem_->setZValue(1.0); // stack before siblings } road_ = bridge_->getParentRoad(); closestRoad_ = road_; pos_ = road_->getGlobalPoint(bridge_->getSStart()); updateColor(); updatePosition(); createPath(); doPan_ = false; copyPan_ = false; }
Target::Target(float radius, int recursionLevel, style::Appearance& edgeAppearance, style::Appearance& faceAppearance) { _radius = radius; initialiseBaseGeometry(); for (int i = 0; i < recursionLevel; i++) { subdivide(); } _triangles = new renderer::Geometry(renderer::Geometry::QUADS); // _outlineQuads = new renderer::Geometry(renderer::Geometry::QUADS); _lines = new renderer::Geometry(renderer::Geometry::LINES); initialiseVertices(); initialiseEdges(); initialiseFaces(); // initialiseOutlineFaces(); _faces = new renderer::LegacyShape(*_triangles, faceAppearance); _edges = new renderer::LegacyShape(*_lines, edgeAppearance); // style::Appearance* outlineAppearance = new style::Appearance(); // outlineAppearance->getColor()[0] = 0.0f; // outlineAppearance->getColor()[1] = 0.0f; // outlineAppearance->getColor()[2] = 0.0f; // outlineAppearance->getColor()[3] = 1.0f; // _outlineFaces = new renderer::LegacyShape(*_outlineQuads, *outlineAppearance); // _outlineFaces->enableFrontFaceCulling(); _edges->setSelectable(false); _faces->setSelectable(false); setSelectable(true); addChild(*_edges); addChild(*_faces); // addChild(*_outlineFaces); // renderer::Font* font = new renderer::Font(); // addChild(*(new renderer::Text(*font))); }
InfoClanTab::InfoClanTab(const Widget2 *const widget) : Container(widget), mNameLabel(new Label(this, " ")), mMasterLabel(new Label(this, " ")), mMapLabel(new Label(this, " ")) { setSelectable(false); LayoutHelper h(this); ContainerPlacer place = h.getPlacer(0, 0); place(0, 0, mNameLabel, 2, 1); place(0, 1, mMasterLabel, 2, 1); place(0, 2, mMapLabel, 2, 1); place.getCell().matchColWidth(0, 0); setDimension(Rect(0, 0, 600, 300)); }
PaintBrush::PaintBrush(int width, int height, WContainerWidget *parent) : WPaintedWidget(parent) { setSelectable(false); interactionCount_ = 0; undo_ = false; // setPositionScheme(Absolute); resize(WLength(width), WLength(height)); decorationStyle().setCursor("icons/pencil.cur", CrossCursor); mouseWentDown().connect(this, &PaintBrush::mouseDown); color_ = WColor(black); // setPreferredMethod(InlineSvgVml); }
void GroupItem::init(Group *grp) { m_unread = 0; m_nContacts = 0; m_nContactsOnline = 0; setExpandable(true); setSelectable(true); ListUserData *data = (ListUserData*)(grp->getUserData(CorePlugin::m_plugin->list_data_id, false)); if (data == NULL){ setOpen(true); }else{ if (m_bOffline){ setOpen(data->OfflineOpen); }else{ setOpen(data->OnlineOpen); } } update(grp, true); }
UserListView(UserListModel* model, Wt::WContainerWidget* p = 0): Wt::WTableView(p) { setModel(model); resize(ULP::WIDTH, ULP::HEIGHT); setColumnWidth(UserListModel::NUMBER_COL, 40); setColumnWidth(UserListModel::NAME_COLUMN, 170); setColumnWidth(UserListModel::CLASSIFICATION_COLUMN, 150); setColumnWidth(UserListModel::ALL_COLUMN, 40); setColumnWidth(UserListModel::WINS_COLUMN, 40); setColumnWidth(UserListModel::DRAWS_COLUMN, 30); setColumnWidth(UserListModel::FAILS_COLUMN, 40); setColumnWidth(UserListModel::RATING_COLUMN, 40); setColumnWidth(UserListModel::ONLINE_TIME, 85); setColumnWidth(UserListModel::REGISTRATION_DATE, 75); setSortingEnabled(UserListModel::NUMBER_COL, false); setSortingEnabled(UserListModel::DRAWS_COLUMN, false); addStyleClass("thechess-user-list"); setSelectable(true); }
PaintBrush::PaintBrush(int width, int height, WContainerWidget *parent) : WPaintedWidget(parent) { setSelectable(false); resize(WLength(width), WLength(height)); decorationStyle().setCursor("icons/pencil.cur", CrossCursor); mouseDragged().connect(this, &PaintBrush::mouseDrag); mouseWentDown().connect(this, &PaintBrush::mouseDown); touchStarted().connect(this, &PaintBrush::touchStart); touchMoved().connect(this, &PaintBrush::touchMove); touchMoved().preventDefaultAction(); color_ = WColor(black); // setPreferredMethod(InlineSvgVml); }
MusicGenericTree::MusicGenericTree(MusicGenericTree *parent, const QString &name, const QString &action, MythUIButtonListItem::CheckState check, bool showArrow) : MythGenericTree(name) { m_check = check; m_action = action; m_showArrow = showArrow; if (!action.isEmpty() && !action.isNull()) setSelectable(true); if (parent) { parent->addNode(this); parent->setDrawArrow(true); } }
// This base constructor is for tuples QmvItem::QmvItem( QmvList *ls, QmvItem *after, QmvTuple *tuple, const QString &label) : QListViewItem(ls, after), listview(ls) { // database hooks shuttleclass = ls->Editor()->shuttleClass(); shuttletuple = tuple; shuttletupleattribute = 0; // ie this is a tuple , not an attribute. setSelectable( FALSE ); open = FALSE; resetButton = 0; setText( 0, shuttletuple->userkeyValue()); setText( 1, shuttletuple->userlabelValue()); // Editing not allowed on base - is tuple allowedit = FALSE; }
PointCloudBase::PointCloudBase( const std::string& name, VisualizationManager* manager ) : Display( name, manager ) , spinner_(1, &cbqueue_) , new_cloud_(false) , new_xyz_transformer_(false) , new_color_transformer_(false) , needs_retransform_(false) , style_( Billboards ) , billboard_size_( 0.01 ) , point_decay_time_(0.0f) , selectable_(false) , coll_handle_(0) , messages_received_(0) , total_point_count_(0) { cloud_ = new ogre_tools::PointCloud(); scene_node_ = scene_manager_->getRootSceneNode()->createChildSceneNode(); scene_node_->attachObject(cloud_); coll_handler_ = PointCloudSelectionHandlerPtr(new PointCloudSelectionHandler(this)); setStyle( style_ ); setBillboardSize( billboard_size_ ); setAlpha(1.0f); setSelectable(true); PluginManager* pman = vis_manager_->getPluginManager(); const L_Plugin& plugins = pman->getPlugins(); L_Plugin::const_iterator it = plugins.begin(); L_Plugin::const_iterator end = plugins.end(); for (; it != end; ++it) { const PluginPtr& plugin = *it; PluginConns pc; pc.loaded = plugin->getLoadedSignal().connect(boost::bind(&PointCloudBase::onPluginLoaded, this, _1)); pc.unloading = plugin->getUnloadingSignal().connect(boost::bind(&PointCloudBase::onPluginUnloading, this, _1)); loadTransformers(plugin.get()); plugin_conns_[plugin.get()] = pc; } threaded_nh_.setCallbackQueue(&cbqueue_); spinner_.start(); }
ListBox::ListBox(Panel *pPanel, int x, int y, int w, int h, bool editable) : Component(pPanel, x, y, w, h) { setSelectable(true); m_editable = true;//editable; TODO: revisit m_numRows = m_editable ? 1 : 0; m_pForm = 0; m_curRow = 0; //Create field array, init to null if (m_editable) { m_pFields = new FIELD*[2]; createField(&m_pFields[0], 0, "..."); set_field_userptr(m_pFields[0], (void*)true); m_pFields[1] = 0; } else { m_pFields = new FIELD*[1]; m_pFields[0] = 0; } createForm(); }
void WMenuItem::setMenu(WMenu *menu) { subMenu_ = menu; subMenu_->parentItem_ = this; Wt::WContainerWidget *sparent = dynamic_cast<Wt::WContainerWidget *>(subMenu_->parent()); if (sparent) sparent->removeWidget(subMenu_); addWidget(subMenu_); WPopupMenu *popup = dynamic_cast<WPopupMenu *>(subMenu_); if (popup) { popup->setJavaScriptMember("wtNoReparent", "true"); setSelectable(false); popup->setButton(anchor()); updateInternalPath(); } }
UIListGenericTree::UIListGenericTree(UIListGenericTree *parent, const QString &name, const QString &action, int check, QPixmap *image) : GenericTree(name) { m_check = check; m_action = action; m_image = image; m_active = true; m_physitem = NULL; if (!action.isEmpty() && !action.isNull()) setSelectable(true); if (parent) { parent->addNode(this); parent->setDrawArrow(true); } }