// if container content-object name does not container the cull string // then cull it. void Container::filter(char *cull_string) { UserData *current; UserData *first = NULL; // find the first item (top-level) current = (UserData*)WinSendMsg(cont,CM_QUERYRECORD,MPFROMP(NULL),MPFROM2SHORT(CMA_FIRST,CMA_ITEMORDER)); if (num_objects > 0) do { if (current != NULL) { if (!(((PRECORDCORE)current)->flRecordAttr & CRA_FILTERED)) { if (strstr(current->getName(),cull_string) == NULL) { ((PRECORDCORE)current)->flRecordAttr |= CRA_FILTERED; } else if (first == NULL) { first = current; emphasis(current); // message("Setting emphasis on %s",current->getName()); } } // find all the other servers current = (UserData*)WinSendMsg(cont,CM_QUERYRECORD,MPFROMP(current),MPFROM2SHORT(CMA_NEXT,CMA_ITEMORDER)); } } while(current != NULL); }
void SemanticMarkupEdition::createActions(KActionCollection* actionCollection) { Q_ASSERT(actionCollection); mEmphasisAction = new KAction("emphasis", actionCollection); mEmphasisAction->setCheckable(true); mEmphasisAction->setToolTip(i18nc("@info:tooltip", "Emphasized text")); mEmphasisAction->setWhatsThis(i18nc("@info:whatsthis", "Phrase tag to emphasize a word or phrase in the text.<nl/>" "Example: <emphasis>emphasized text</emphasis>")); actionCollection->addAction("kuit-edition-phrase-emphasis", mEmphasisAction); connect(mEmphasisAction, SIGNAL(triggered()), this, SLOT(emphasis())); mActions.append(mEmphasisAction); mEmphasisStrongAction = new KAction("emphasis (strong)", actionCollection); mEmphasisStrongAction->setCheckable(true); mEmphasisStrongAction->setToolTip(i18nc("@info:tooltip", "Strongly emphasized text")); mEmphasisStrongAction->setWhatsThis(i18nc("@info:whatsthis", "Phrase tag to strongly emphasize a word or phrase in the text.<nl/>" "Example: <emphasis strong=\"1\">strongly emphasized text</emphasis>")); actionCollection->addAction("kuit-edition-phrase-emphasis-strong", mEmphasisStrongAction); connect(mEmphasisStrongAction, SIGNAL(triggered()), this, SLOT(emphasisStrong())); mActions.append(mEmphasisStrongAction); mFilenameAction = new KAction("filename", actionCollection); mFilenameAction->setCheckable(true); mFilenameAction->setToolTip(i18nc("@info:tooltip", "Filename or path")); mFilenameAction->setWhatsThis(i18nc("@info:whatsthis", "Phrase tag for file or folder name or path.<nl/>" "The path separators will be transformed into what is native to the " "platform.<nl/>" "Example: <filename>/home/user/Music/song.ogg</filename>")); actionCollection->addAction("kuit-edition-phrase-filename", mFilenameAction); connect(mFilenameAction, SIGNAL(triggered()), this, SLOT(filename())); mActions.append(mFilenameAction); mInterfaceAction = new KAction("interface", actionCollection); mInterfaceAction->setCheckable(true); mInterfaceAction->setToolTip(i18nc("@info:tooltip", "GUI interface element")); mInterfaceAction->setWhatsThis(i18nc("@info:whatsthis", "Phrase tag for paths to GUI interface elements.<nl/>" "If there is more than one element in the path, use \"|\" to delimit " "elements, which will be converted into canonical delimiter.<nl/>" "Example: <interface>File|Open</interface>")); actionCollection->addAction("kuit-edition-phrase-interface", mInterfaceAction); connect(mInterfaceAction, SIGNAL(triggered()), this, SLOT(interface())); mActions.append(mInterfaceAction); mLinkAction = new KAction("link", actionCollection); mLinkAction->setCheckable(true); mLinkAction->setToolTip(i18nc("@info:tooltip", "Link to URL or widget")); mLinkAction->setWhatsThis(i18nc("@info:whatsthis", "Phrase tag to link to a URL-addressable resource.<nl/>" "Widgets in the target application interface can be linked using " "<emphasis>widget:theObjectNameOfTheWidget</emphasis><nl/>" "Example: <link url=\"http://www.kde.org\">a link</link>")); actionCollection->addAction("kuit-edition-phrase-link", mLinkAction); connect(mLinkAction, SIGNAL(triggered()), this, SLOT(link())); mActions.append(mLinkAction); mNlAction = new KAction("nl", actionCollection); mNlAction->setToolTip(i18nc("@info:tooltip", "Line break")); mNlAction->setWhatsThis(i18nc("@info:whatsthis", "Phrase tag for line breaks.<nl/>" "Example: line<nl/>break")); actionCollection->addAction("kuit-edition-phrase-nl", mNlAction); connect(mNlAction, SIGNAL(triggered()), this, SLOT(nl())); mActions.append(mNlAction); mShortcutAction = new KAction("shortcut", actionCollection); mShortcutAction->setCheckable(true); mShortcutAction->setToolTip(i18nc("@info:tooltip", "Combination of keys to press")); mShortcutAction->setWhatsThis(i18nc("@info:whatsthis", "Phrase tag for combinations of keys to press.<nl/>" "Separate the keys by \"+\" or \"-\", and the shortcut will be " "converted into canonical form.<nl/>" "Example: <shortcut>Ctrl+N</shortcut>")); actionCollection->addAction("kuit-edition-phrase-shortcut", mShortcutAction); connect(mShortcutAction, SIGNAL(triggered()), this, SLOT(shortcut())); mActions.append(mShortcutAction); mParaAction = new KAction("para", actionCollection); mParaAction->setCheckable(true); mParaAction->setToolTip(i18nc("@info:tooltip", "Paragraph")); mParaAction->setWhatsThis(i18nc("@info:whatsthis", "<para>Structure tag for text paragraphs.<nl/>" "Example: one paragraph</para><para>Other paragraph</para>")); actionCollection->addAction("kuit-edition-structure-para", mParaAction); connect(mParaAction, SIGNAL(triggered()), this, SLOT(para())); mActions.append(mParaAction); mListAction = new KAction("list", actionCollection); mListAction->setCheckable(true); mListAction->setToolTip(i18nc("@info:tooltip", "List of items")); mListAction->setWhatsThis(i18nc("@info:whatsthis", "<para>Structure tag for lists of items.<nl/>" "Can contain only <item> as subtags. List is considered an " "element of the paragraph, so the <list> must be found inside " "<para>.<nl/>" "Example: <list>" " <item>One item</item>" " <item>Other item</item>" " </list></para>")); actionCollection->addAction("kuit-edition-structure-list", mListAction); connect(mListAction, SIGNAL(triggered()), this, SLOT(list())); mActions.append(mListAction); mItemAction = new KAction("item", actionCollection); mItemAction->setCheckable(true); mItemAction->setToolTip(i18nc("@info:tooltip", "List items")); mItemAction->setWhatsThis(i18nc("@info:whatsthis", "<para>Structure tag for list items.<nl/>" "Example: <list>" " <item>One item</item>" " <item>Other item</item>" " </list></para>")); actionCollection->addAction("kuit-edition-structure-item", mItemAction); connect(mItemAction, SIGNAL(triggered()), this, SLOT(item())); mActions.append(mItemAction); updateActionStates(); }