Qtリファレンス Alt Key 新しいページはコチラ

提供: yonewiki
移動: 案内, 検索
(API)
(API)
66行: 66行:
  
  
'''<span style="color:deeppink;">void</span> <span style="color:darkblue;">AQP::accelerateActions</span>(<span style="color:deeppink;">QList<QAction*></span> actions, <span style="color:deeppink;">const QString&</span>  alphabet=Alphabet)'''
+
*'''<span style="color:deeppink;">void</span> <span style="color:darkblue;">AQP::accelerateActions</span>(<span style="color:deeppink;">QList<QAction*></span> actions, <span style="color:deeppink;">const QString&</span>  alphabet=Alphabet)'''
  
  
This function takes a list of actions and optionally an alphabet. It adds keyboard accelerators to every action's text wherever possible. Existing accelerators are respected as are plain ampersands (which are represented by "&&" in strings).
+
 This function takes a list of actions and optionally an alphabet. It adds keyboard accelerators to every action's text wherever possible. Existing accelerators are respected as are plain ampersands (which are represented by "&&" in strings).
  
  
void AQP::accelerateMenu(QWidget *menuOrMenuBar, const QString &alphabet=Alphabet)
+
*'''<span style="color:deeppink;">void</span> <span style="color:darkblue;">AQP::accelerateMenu</span>(<span style="color:deeppink;">QWidget*</span> menuOrMenuBar, <span style="color:deeppink;">const QString&</span> alphabet=Alphabet)'''
  
  
This function takes a menu (including context menus) or a main window's menu bar and optionally an alphabet. It adds keyboard accelerators to every menu item's text wherever possible. The function works recursively, adding accelerators to submenus and subsubmenus. Existing accelerators are respected as are plain ampersands (which are represented by "&&" in strings).
+
 This function takes a menu (including context menus) or a main window's menu bar and optionally an alphabet. It adds keyboard accelerators to every menu item's text wherever possible. The function works recursively, adding accelerators to submenus and subsubmenus. Existing accelerators are respected as are plain ampersands (which are represented by "&&" in strings).
  
  
void AQP::accelerateWidget(QWidget *widget, const QString &alphabet=Alphabet)
+
*'''<span style="color:deeppink;">void</span> <span style="color:darkblue;">AQP::accelerateWidget</span>(<span style="color:deeppink;">QWidget*</span> widget, <span style="color:deeppink;">const QString&</span> alphabet=Alphabet)'''
  
  
This function takes a widget (such as a QDialog subclass) and optionally an alphabet. It adds keyboard accelerators to every buddy label, button (i.e., all QAbstractButton subclasses apart from QToolButton), checkbox, checkable group box, and radio button, that is a child of the widget (or grandchild, recursively), wherever possible. Existing accelerators are respected as are plain ampersands (which are represented by "&&" in strings).
+
 This function takes a widget (such as a QDialog subclass) and optionally an alphabet. It adds keyboard accelerators to every buddy label, button (i.e., all QAbstractButton subclasses apart from QToolButton), checkbox, checkable group box, and radio button, that is a child of the widget (or grandchild, recursively), wherever possible. Existing accelerators are respected as are plain ampersands (which are represented by "&&" in strings).
  
  
void AQP::accelerateWidgets(QList<QWidget*> widgets, const QString &alphabet=Alphabet)
+
*'''<span style="color:deeppink;">void</span> <span style="color:darkblue;">AQP::accelerateWidgets</span>(<span style="color:deeppink;">QList<QWidget*></span> widgets, <span style="color:deeppink;">const QString &</span> alphabet=Alphabet)'''
  
  
This function takes a list of widgets (for example, all the widgets on a particular tab widget page) and optionally an alphabet. It adds keyboard accelerators to every suitable widget, (i.e., to every buddy label and button), wherever possible. Existing accelerators are respected as are plain ampersands (which are represented by "&&" in strings).
+
 This function takes a list of widgets (for example, all the widgets on a particular tab widget page) and optionally an alphabet. It adds keyboard accelerators to every suitable widget, (i.e., to every buddy label and button), wherever possible. Existing accelerators are respected as are plain ampersands (which are represented by "&&" in strings).
 
Auxiliary Functions
 
Auxiliary Functions
 
These functions are occassionally useful.
 
These functions are occassionally useful.
  
  
QStringList AQP::accelerated(const QStringList &strings, const QString &alphabet=Alphabet)
+
*'''<span style="color:deeppink;">QStringList</span> <span style="color:darkblue;">AQP::accelerated</span>(<span style="color:deeppink;">const QStringList&</span> strings, <span style="color:deeppink;">const QString&</span> alphabet=Alphabet)'''
  
  
This function takes a list of strings and optionally an alphabet. It returns a new string list with a keyboard accelerator added to every string wherever possible. Existing accelerators are respected as are plain ampersands (which are represented by "&&" in strings).
+
 This function takes a list of strings and optionally an alphabet. It returns a new string list with a keyboard accelerator added to every string wherever possible. Existing accelerators are respected as are plain ampersands (which are represented by "&&" in strings).
  
  
bool AQP::isValid(const QStringList &strings, QPair<int, int> *where=0, const QString &alphabet=Alphabet)
+
*'''<span style="color:deeppink;">bool</span> <span style="color:darkblue;">AQP::isValid</span>(<span style="color:deeppink;">const QStringList&</span> strings, <span style="color:deeppink;">QPair<int, int>*</span> where=0, <span style="color:deeppink;">const QString&</span> alphabet=Alphabet)'''
  
  
This function returns true if the given list of strings has valid accelerators. Valid includes no accelerators, but does not include duplicate accelerators. If the where pair is passed and the function returns false the pair's ints are set to the index of the first string in the list and the index of the character within the string where a problem (e.g., duplicate accelerators) occurred.
+
 This function returns true if the given list of strings has valid accelerators. Valid includes no accelerators, but does not include duplicate accelerators. If the where pair is passed and the function returns false the pair's ints are set to the index of the first string in the list and the index of the character within the string where a problem (e.g., duplicate accelerators) occurred.
  
  
int AQP::numberAccelerated(const QStringList &strings)
+
*'''<span style="color:deeppink;">int</span> <span style="color:darkblue;">AQP::numberAccelerated</span>(<span style="color:deeppink;">const QStringList&</span> strings)'''
  
  
This function returns the number of strings in the string list that have accelerators.
+
 This function returns the number of strings in the string list that have accelerators.
double AQP::quality(const QStringList &strings)
+
 
This function returns a rough guide to accelerator quality. For each string the best quality is when the string has an accelerator for its first character, second best is an accelerator for the start of a word, third best is any accelerator at all, and worst is no accelerator. The quality computation accounts for the overall quality of all the strings in the list and returns a value that ranges from 0.0 (worst) to 1.0 (best).
+
 
 +
*'''<span style="color:deeppink;">double</span> <span style="color:darkblue;">AQP::quality</span>(<span style="color:deeppink;">const QStringList&</span> strings)'''
 +
 
 +
 
 +
 This function returns a rough guide to accelerator quality. For each string the best quality is when the string has an accelerator for its first character, second best is an accelerator for the start of a word, third best is any accelerator at all, and worst is no accelerator. The quality computation accounts for the overall quality of all the strings in the list and returns a value that ranges from 0.0 (worst) to 1.0 (best).
  
 
 
 
 
  
 
[[Qt#Qtリファレンス|Qtリファレンス]]へ戻る
 
[[Qt#Qtリファレンス|Qtリファレンス]]へ戻る

2021年3月2日 (火) 00:00時点における版



個人用ツール
名前空間

変種
操作
案内
ツールボックス