# eric4.DataViews.CodeMetricsDialog

Module implementing a code metrics dialog.

### Global Attributes

None

### Classes

CodeMetricsDialog | Class implementing a dialog to display the code metrics.

### Functions

None

## CodeMetricsDialog

Class implementing a dialog to display the code metrics.

### Derived from

QDialog, Ui_CodeMetricsDialog

### Class Attributes

None

### Class Methods

None

### Methods

CodeMetricsDialog | Constructor
__createResultItem | Private slot to create a new item in the result list.
__createSummaryItem | Private slot to create a new item in the summary list.
__finish | Private slot called when the action finished or the user pressed the button.
__getValues | Private method to extract the code metric values.
__resizeResultColumns | Private method to resize the list columns.
__resizeSummaryColumns | Private method to resize the list columns.
__resultCollapse | Private slot to collapse all entries of the resultlist.
__resultExpand | Private slot to expand all entries of the resultlist.
__showContextMenu | Private slot to show the context menu of the listview.
on_buttonBox_clicked | Private slot called by a button of the button box clicked.
start | Public slot to start the code metrics determination.

### Static Methods

None

#### CodeMetricsDialog (Constructor)

CodeMetricsDialog(parent = None)

Constructor

parent
  parent widget (QWidget)

#### CodeMetricsDialog.__createResultItem

__createResultItem(parent, values)

Private slot to create a new item in the result list.

parent
  parent of the new item (QTreeWidget or QTreeWidgetItem)
values
  values to be displayed (list)

Returns:
  the generated item

#### CodeMetricsDialog.__createSummaryItem

__createSummaryItem(col0, col1)

Private slot to create a new item in the summary list.

col0
  string for column 0 (string or QString)
col1
  string for column 1 (string or QString)

#### CodeMetricsDialog.__finish

__finish()

Private slot called when the action finished or the user pressed the button.

#### CodeMetricsDialog.__getValues

__getValues(loc, stats, identifier)

Private method to extract the code metric values.

loc
  reference to the locale object (QLocale)
stats
  reference to the code metric statistics object
identifier
  identifier to get values for

Returns:
  list of values suitable for display (QStringList)

#### CodeMetricsDialog.__resizeResultColumns

__resizeResultColumns()

Private method to resize the list columns.

#### CodeMetricsDialog.__resizeSummaryColumns

__resizeSummaryColumns()

Private method to resize the list columns.

#### CodeMetricsDialog.__resultCollapse

__resultCollapse()

Private slot to collapse all entries of the resultlist.

#### CodeMetricsDialog.__resultExpand

__resultExpand()

Private slot to expand all entries of the resultlist.

#### CodeMetricsDialog.__showContextMenu

__showContextMenu(coord)

Private slot to show the context menu of the listview.

coord
  the position of the mouse pointer (QPoint)

#### CodeMetricsDialog.on_buttonBox_clicked

on_buttonBox_clicked(button)

Private slot called by a button of the button box clicked.

button
  button that was clicked (QAbstractButton)

#### CodeMetricsDialog.start

start(fn)

Public slot to start the code metrics determination.

fn
  file or list of files or directory to be show the code metrics for (string or list of strings)

Up