⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ktreelist.h

📁 一种效率高
💻 H
📖 第 1 页 / 共 2 页
字号:
	*/  bool bottomScrollBar() const;  /**	Changes the text and/or pixmap of the given item at the specified	index to the given values and updates the display if auto update	enabled. If changing only the text or pixmap, set the other parameter	to 0.	*/  void changeItem(const char *newText, 				  const QPixmap *newPixmap, 				  int index);  /**	Same as above function, except item to change is specified by a path	through the tree.	*/  void changeItem(const char *newText,				  const QPixmap *newPixmap,				  const KPath *thePath);  /**	Removes all items from the tree.	*/  void clear();  /**	Returns the total number of items in the tree, whether visible	(expanded sub-trees) or not (collapsed).	*/  uint count();  /**	Returns the index of the current (highlighted) item. If no current	item, returns -1.	*/  int currentItem() const;  /**	Collapses the sub-tree at the specified index. 	*/  void collapseItem(int index);  /**	Expands the sub-tree at the specified index. 	*/  void expandItem(int index);  /**	Returns the depth to which all parent items are automatically	expanded.	*/  int expandLevel() const;  /**	Same as above functions combined into one. If sub-tree is expanded,	collapses it, if it is collapsed, it expands it.	*/  void expandOrCollapseItem(int index);  /**	Iterates every item in the tree, visible or not, and applies the	function func with a pointer to each item and user data	supplied as parameters. KForEveryFunc is defined as:          	typedef void (*KForEveryFunc)(KTreeListItem *, void *);           	That is, a function that returns void and takes a pointer to a	KTreeListItem and pointer to void as parameters. 	*/  void forEveryItem(KForEvery func, 					void *user);  /**	Same as above, but only iterates visible items, in order.			    	*/  void forEveryVisibleItem(KForEvery func, 						   void *user);  /**	Returns a pointer to the current item if there is one, or 0.	*/  KTreeListItem *getCurrentItem();  /**	Returns the number of pixels an item is indented for each level.	*/  int indentSpacing();  /**	Inserts an item into the tree with the given text and pixmap either	before or after the item currently at the given index, depending on	the value of prefix. The new item is added to the same branch as the	reference item. If index is -1, the item is simply appended to the	tree at the root level. The item text must not be null.	*/  void insertItem(const char *theText,				  const QPixmap *thePixmap,				  int index = -1,				  bool prefix = TRUE);  /**	Same as above, but uses a path through the tree to reference the	insert position.	*/  void insertItem(const char *theText,				  const QPixmap *thePixmap,				  const KPath *thePath,				  bool prefix = TRUE);  /**	Inserts the given item into the tree either before or after the item	currently at the given index, depending on the value of prefix. The	new item is add to the same branch as the reference item. If index is	-1, the item is simply appended to the tree at the root level. The	item text must not be null.	*/  void insertItem(KTreeListItem *newItem, 				  int index = -1,				  bool prefix = TRUE);   /**	Same as above, but uses a path through the tree to reference the	insert position.	*/  void insertItem(KTreeListItem *newItem,				  const KPath *thePath,				  bool prefix = TRUE);  /**	Returns a pointer to the item at index.	*/  KTreeListItem *itemAt(int index);  /**	Returns a pointer ot the item at the end of thePath.	*/  KTreeListItem *itemAt(const KPath *path);  /**	Returns the index of the given item in the visible tree or -1 if not	found.			 	*/  int itemIndex(KTreeListItem *item);  /**	Returns a pointer to the logical path to the item at the specified	index. The return KPath object must be deleted by the caller.	Any strings still contained in the stack will be automatically	deleted, but any popped from the path must also be deleted by the	caller.	*/  KPath *itemPath(int index);  /**	Outdents the item at the given index one level so that it becomes a	sibling of its parent.	*/  void join(int index);  /**   */  void join(const KPath *path);  /**	Moves the item at the specified index down one slot in its current	branch.	*/  void lowerItem(int index);  /**	Same as above but uses a path to specify the item.                              	*/  void lowerItem(const KPath *path);  /**	Moves the item at the specified index up one slot in its current	branch. 	*/  void raiseItem(int index);  /**	Same as above but uses a path to specify the item.                  	*/  void raiseItem(const KPath *path);  /**	Removes the item at the specified index. 	*/  void removeItem(int index);  /**	Same as above except uses path through the tree to find the item.	*/  void removeItem(const KPath *thePath);  /**	Returns bool value indicating whether the list currently displays a	vertical scroll bar.	*/  bool scrollBar() const;  /**	If enable is TRUE (default), enables auto update, else disables it.	*/  void setAutoUpdate(bool enable);  /**	If enable is TRUE, displays a horizontal scroll bar, else hides it.	*/  void setBottomScrollBar(bool enable);  /**	Makes the item at index current and highlights it.	*/  void setCurrentItem(int index);  void setExpandButtonDrawing(bool enable);  void setExpandLevel(int level);  void setIndentSpacing(int spacing);  /**	If enable is TRUE, displays a vertical scroll bar, else hides it.                                        	*/  void setScrollBar(bool enable);  /**	If enable is TRUE (default), item text will be displayed, otherwise 	it will not, and no highlight will be shown in the default widget.	*/  void setShowItemText(bool enable);  /**	If enable is TRUE, enables smooth scrolling, else disables 	it (default).	*/  void setSmoothScrolling(bool enable);  /**	If enable is TRUE (default), lines depicting the structure of the	tree will be drawn, otherwise they will not.	*/  void setTreeDrawing(bool enable);  /**	Indicates whether item text is displayed.	*/  bool showItemText() const;  /**	Returns a bool value indicating whether smooth scrolling is enabled.	*/  bool smoothScrolling() const;  /**	Indents the item at the specified index, creating a new branch.	*/  void split(int index);  /**	Same as above but uses a path to specify the item.                    	*/  void split(const KPath *path);  /**	Removes the item at the given index from the tree, but does not	delete it, returning a pointer to the removed item.	*/  KTreeListItem *takeItem(int index);  /**	Same as above but uses a path to specify the item to take.	*/  KTreeListItem *takeItem(const KPath *path);  /**	Indicates whether the tree structure is drawn.	*/  bool treeDrawing() const;  /**	Returns the number of items that are visible (their parents are	expanded).                   	*/  int visibleCount();  signals:  void collapsed(int index);  void expanded(int index);  void highlighted(int index);  void selected(int index);  void singleSelected(int index); //ettrichprotected:  void paletteChange(const QPalette &);  void addChildItem(KTreeListItem *theParent,					KTreeListItem *theChild);  virtual int cellHeight(int row);  void changeItem(KTreeListItem *toChange,				  int itemIndex,				  const char *newText,				  const QPixmap *newPixmap);  bool checkItemPath(const KPath *path) const;  bool checkItemText(const char *text) const;  void collapseSubTree(KTreeListItem *subRoot);  bool countItem(KTreeListItem *item,				 void *total);  void expandOrCollapse(KTreeListItem *parentItem);  void expandSubTree(KTreeListItem *subRoot);  bool findItemAt(KTreeListItem *item,				  void *user);  void fixChildBranches(KTreeListItem *parentItem);  virtual void focusInEvent(QFocusEvent *e);  void forEveryItem(KForEveryM func, 					void *user);  void forEveryVisibleItem(KForEveryM func,						   void *user);  bool getItemIndex(KTreeListItem *item,					void *user);  bool getMaxItemWidth(KTreeListItem *item,					   void *user);  void insertItem(KTreeListItem *referenceItem,				  KTreeListItem *newItem,				  bool prefix);  void join(KTreeListItem *item);  virtual void keyPressEvent(QKeyEvent *e);  void lowerItem(KTreeListItem *item);  virtual void mouseDoubleClickEvent(QMouseEvent *e);  virtual void mouseMoveEvent(QMouseEvent *e);  virtual void mousePressEvent(QMouseEvent *e);  virtual void mouseReleaseEvent(QMouseEvent *e);  virtual void paintCell(QPainter *p, int row, int col);  virtual void paintHighlight(QPainter *p, 							  KTreeListItem *item);  virtual void paintItem(QPainter *p, KTreeListItem *item, 						 bool highlighted);  void raiseItem(KTreeListItem *item);  KTreeListItem *recursiveFind(KTreeListItem *subRoot,							   KPath *path);  bool setItemExpanded(KTreeListItem *item, void *);  bool setItemExpandButtonDrawing(KTreeListItem *item, void *);  bool setItemIndent(KTreeListItem *item, void *);  bool setItemShowText(KTreeListItem *item, void *);  bool setItemTreeDrawing(KTreeListItem *item, void *);  void split(KTreeListItem *item);  void takeItem(KTreeListItem *item);  virtual void updateCellWidth();  KTreeListItem *treeRoot;  bool clearing;  int current;  bool drawExpandButton;  bool drawTree;  int expansion;  bool goingDown;  int indent;  int maxItemWidth;  bool showText;  // Rainer Bawidamann: move window in "rubberband" mode  bool rubberband_mode;             // true if in "rubberband_mode"  QPoint rubber_startMouse;         // where the user pressed the MMB  int rubber_height, rubber_width,  // the size if the rubberband rect	rubber_startX, rubber_startY; // the x/yOffset() when the MMB was pressed  void draw_rubberband();  void start_rubberband(const QPoint& where);  void end_rubberband();  void move_rubberband(const QPoint& where);};#endif // KTREE_LIST_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -