File indexing completed on 2024-04-28 05:51:09
0001 /* 0002 * SPDX-FileCopyrightText: 2002-2003 Jesper K. Pedersen <blackie@kde.org> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.0-only 0005 **/ 0006 0007 #include "kmultiformlistboxentry.h" 0008 0009 #include <QPushButton> 0010 0011 //---------------------------------------------------------------------- 0012 // This function is needed to signal which of the KMultiFormListBox entries 0013 // the Idx button was invoked from. 0014 //---------------------------------------------------------------------- 0015 void KMultiFormListBoxEntry::acceptIndexButton() 0016 { 0017 Q_EMIT gotoIndex(this); 0018 } 0019 0020 void KMultiFormListBoxEntry::indexWindowPos(QPoint *start, int *width) 0021 { 0022 // Calculate the position of the value widgets left-buttom border 0023 QPoint global_point = valueWidget()->mapToGlobal(QPoint(0, 0)); 0024 start->setX(global_point.x()); 0025 start->setY(global_point.y() + valueWidget()->height()); 0026 0027 // Calculate the width of the list. 0028 global_point = indexButton()->mapToGlobal(QPoint(0, 0)); 0029 *width = global_point.x() + indexButton()->width() - start->x(); 0030 } 0031 0032 #include "moc_kmultiformlistboxentry.cpp"