示例#1
0
ResultScene::ResultScene(SharedResultData *resultData, Plasma::RunnerManager *manager, QWidget *focusBase, QObject *parent)
    : QGraphicsScene(parent),
      m_runnerManager(manager),
      m_viewableHeight(0),
      m_currentIndex(0),
      m_focusBase(focusBase),
      m_resultData(resultData)
{
    setItemIndexMethod(NoIndex);

    connect(m_runnerManager, SIGNAL(matchesChanged(QList<Plasma::QueryMatch>)),
            this, SLOT(setQueryMatches(QList<Plasma::QueryMatch>)));

    m_clearTimer.setSingleShot(true);
    m_clearTimer.setInterval(200);
    connect(&m_clearTimer, SIGNAL(timeout()), this, SLOT(clearMatches()));

    m_arrangeTimer.setSingleShot(true);
    m_arrangeTimer.setInterval(50);
    connect(&m_arrangeTimer, SIGNAL(timeout()), this, SLOT(arrangeItems()));

    m_selectionBar = new SelectionBar(0);
    connect(m_selectionBar, SIGNAL(appearanceChanged()), this, SLOT(updateItemMargins()));
    connect(m_selectionBar, SIGNAL(targetItemReached(QGraphicsItem*)), this, SLOT(highlightItem(QGraphicsItem*)));
    m_selectionBar->hide();
    updateItemMargins();

    addItem(m_selectionBar);
}
示例#2
0
MRESULT EXPENTRY dlgprc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) {
   switch (msg) {
      case WM_INITDLG:
         initDlg(hwnd);
         break;
      case WM_WINDOWPOSCHANGED:
         if (((PSWP)mp1)->fl & SWP_SIZE)
            arrangeItems(hwnd, (PSWP)mp1);
      default:
         return WinDefDlgProc(hwnd, msg, mp1, mp2);
         break;
   } /* endswitch */
   return (MRESULT)FALSE;
}
示例#3
0
void ComponentGUIScrollerGrid::setRowPadding (DTfloat row_padding)
{
    _row_padding = row_padding;
    arrangeItems(0.0F);
}
示例#4
0
void ComponentGUIScrollerGrid::setColumnPadding (DTfloat column_padding)
{
    _column_padding = column_padding;
    arrangeItems(0.0F);
}
示例#5
0
void ComponentGUIScrollerGrid::setRowHeight (DTfloat row_height)
{
    _row_height = row_height;
    arrangeItems(0.0F);
}
示例#6
0
void ComponentGUIScrollerGrid::setColumnWidth (DTfloat column_width)
{
    _column_width = column_width;
    arrangeItems(0.0F);
}
示例#7
0
void ComponentGUIScrollerGrid::setNumRows (DTint num_rows)
{
    _num_rows = num_rows;
    arrangeItems(0.0F);
}
示例#8
0
void ComponentGUIScrollerGrid::setNumColumns (DTint num_cols)
{
    _num_columns = num_cols;
    arrangeItems(0.0F);
}
示例#9
0
// Update the tree widget to use new model.
void ObxTreeView::updateTreeWidget()
{
    arrangeItems(first_visible_, selected_, itemsPerPage());
}