diff options
author | Timothy Pearson <[email protected]> | 2013-02-04 14:00:34 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2013-02-04 14:00:34 -0600 |
commit | 5f12b88e2de1496970d74c7b654e8fd9442f3d5c (patch) | |
tree | 95c1f03353b4652c26eba2de64f947ed5809a7b3 /src/newbasketdialog.cpp | |
parent | bd608b63a8654863e86960e8f2301eac012aa44d (diff) | |
download | basket-5f12b88e2de1496970d74c7b654e8fd9442f3d5c.tar.gz basket-5f12b88e2de1496970d74c7b654e8fd9442f3d5c.zip |
Rename KIcon to enhance compatibility with KDE4
Diffstat (limited to 'src/newbasketdialog.cpp')
-rw-r--r-- | src/newbasketdialog.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/newbasketdialog.cpp b/src/newbasketdialog.cpp index ceaf987..39a7e7a 100644 --- a/src/newbasketdialog.cpp +++ b/src/newbasketdialog.cpp @@ -44,27 +44,27 @@ #include "global.h" #include "bnpview.h" -/** class SingleSelectionKIconView: */ +/** class SingleSelectionTDEIconView: */ -SingleSelectionKIconView::SingleSelectionKIconView(TQWidget *parent, const char *name, WFlags f) - : KIconView(parent, name, f), m_lastSelected(0) +SingleSelectionTDEIconView::SingleSelectionTDEIconView(TQWidget *parent, const char *name, WFlags f) + : TDEIconView(parent, name, f), m_lastSelected(0) { connect( this, TQT_SIGNAL(selectionChanged(TQIconViewItem*)), this, TQT_SLOT(slotSelectionChanged(TQIconViewItem*)) ); connect( this, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged()) ); } -TQDragObject* SingleSelectionKIconView::dragObject() +TQDragObject* SingleSelectionTDEIconView::dragObject() { return 0; } -void SingleSelectionKIconView::slotSelectionChanged(TQIconViewItem *item) +void SingleSelectionTDEIconView::slotSelectionChanged(TQIconViewItem *item) { if (item) m_lastSelected = item; } -void SingleSelectionKIconView::slotSelectionChanged() +void SingleSelectionTDEIconView::slotSelectionChanged() { if (m_lastSelected && !m_lastSelected->isSelected()) m_lastSelected->setSelected(true); @@ -94,8 +94,8 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro // Icon, Name and Background Color: TQHBoxLayout *nameLayout = new TQHBoxLayout(0, marginHint()*2/3, spacingHint()); - m_icon = new KIconButton(page); - m_icon->setIconType(KIcon::NoGroup, KIcon::Action); + m_icon = new TDEIconButton(page); + m_icon->setIconType(TDEIcon::NoGroup, TDEIcon::Action); m_icon->setIconSize(16); m_icon->setIcon(m_defaultProperties.icon.isEmpty() ? "basket" : m_defaultProperties.icon); int size = TQMAX(m_icon->sizeHint().width(), m_icon->sizeHint().height()); @@ -140,11 +140,11 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro // *Meeting Summary // Hobbies: // * - m_templates = new SingleSelectionKIconView(page); + m_templates = new SingleSelectionTDEIconView(page); m_templates->setItemsMovable(false); - m_templates->setMode(KIconView::Select); + m_templates->setMode(TDEIconView::Select); m_templates->setGridX(m_templates->maxItemWidth()); - KIconViewItem *lastTemplate = 0; + TDEIconViewItem *lastTemplate = 0; TQPixmap icon(40, 53); TQPainter painter(&icon); @@ -152,7 +152,7 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro painter.setPen(TDEGlobalSettings::textColor()); painter.drawRect(0, 0, icon.width(), icon.height()); painter.end(); - lastTemplate = new KIconViewItem(m_templates, lastTemplate, i18n("One column"), icon); + lastTemplate = new TDEIconViewItem(m_templates, lastTemplate, i18n("One column"), icon); if (defaultTemplate == "1column") m_templates->setSelected(lastTemplate, true); @@ -163,7 +163,7 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro painter.drawRect(0, 0, icon.width(), icon.height()); painter.drawLine(icon.width() / 2, 0, icon.width() / 2, icon.height()); painter.end(); - lastTemplate = new KIconViewItem(m_templates, lastTemplate, i18n("Two columns"), icon); + lastTemplate = new TDEIconViewItem(m_templates, lastTemplate, i18n("Two columns"), icon); if (defaultTemplate == "2columns") m_templates->setSelected(lastTemplate, true); @@ -175,7 +175,7 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro painter.drawLine(icon.width() / 3, 0, icon.width() / 3, icon.height()); painter.drawLine(icon.width() * 2 / 3, 0, icon.width() * 2 / 3, icon.height()); painter.end(); - lastTemplate = new KIconViewItem(m_templates, lastTemplate, i18n("Three columns"), icon); + lastTemplate = new TDEIconViewItem(m_templates, lastTemplate, i18n("Three columns"), icon); if (defaultTemplate == "3columns") m_templates->setSelected(lastTemplate, true); @@ -187,7 +187,7 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro painter.drawRect(icon.width() / 5, icon.width() / 5, icon.width() / 4, icon.height() / 8); painter.drawRect(icon.width() * 2 / 5, icon.width() * 2 / 5, icon.width() / 4, icon.height() / 8); painter.end(); - lastTemplate = new KIconViewItem(m_templates, lastTemplate, i18n("Free"), icon); + lastTemplate = new TDEIconViewItem(m_templates, lastTemplate, i18n("Free"), icon); if (defaultTemplate == "free") m_templates->setSelected(lastTemplate, true); @@ -198,7 +198,7 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro painter.drawRect(0, 0, icon.width(), icon.height()); painter.drawRect(icon.width() * 2 / 5, icon.height() * 3 / 7, icon.width() / 5, icon.height() / 7); painter.end(); - lastTemplate = new KIconViewItem(m_templates, lastTemplate, i18n("Mind map"), icon);*/ + lastTemplate = new TDEIconViewItem(m_templates, lastTemplate, i18n("Mind map"), icon);*/ m_templates->setMinimumHeight(topLayout->minimumSize().width() * 9 / 16); @@ -262,7 +262,7 @@ int NewBasketDialog::populateBasketsList(TQListViewItem *item, int indent, int i while (item) { // Get the basket data: Basket *basket = ((BasketListViewItem*)item)->basket(); - TQPixmap icon = kapp->iconLoader()->loadIcon(basket->icon(), KIcon::NoGroup, ICON_SIZE, KIcon::DefaultState, 0L, /*canReturnNull=*/false); + TQPixmap icon = kapp->iconLoader()->loadIcon(basket->icon(), TDEIcon::NoGroup, ICON_SIZE, TDEIcon::DefaultState, 0L, /*canReturnNull=*/false); icon = Tools::indentPixmap(icon, indent, 2 * ICON_SIZE / 3); // Append item to the list: @@ -297,7 +297,7 @@ void NewBasketDialog::nameChanged(const TQString &newName) void NewBasketDialog::slotOk() { - TQIconViewItem *item = ((SingleSelectionKIconView*)m_templates)->selectedItem(); + TQIconViewItem *item = ((SingleSelectionTDEIconView*)m_templates)->selectedItem(); TQString templateName; if (item->text() == i18n("One column")) templateName = "1column"; |