summaryrefslogtreecommitdiffstats
path: root/src/entryeditdialog.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:34:15 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:34:15 -0600
commit031454e56009d576589c28757f6c6fcf4884095e (patch)
treead4c9959d05a814c9090e8fe63ba27057903271b /src/entryeditdialog.cpp
parent54011e0e1af8cd96162160ecf5d361a59a2c733e (diff)
downloadtellico-031454e56009d576589c28757f6c6fcf4884095e.tar.gz
tellico-031454e56009d576589c28757f6c6fcf4884095e.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'src/entryeditdialog.cpp')
-rw-r--r--src/entryeditdialog.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/entryeditdialog.cpp b/src/entryeditdialog.cpp
index 70b2288..8956163 100644
--- a/src/entryeditdialog.cpp
+++ b/src/entryeditdialog.cpp
@@ -30,7 +30,7 @@
#include <kpushbutton.h>
#include <kaccel.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqstringlist.h>
#include <tqpushbutton.h>
#include <tqvaluevector.h>
@@ -73,12 +73,12 @@ EntryEditDialog::EntryEditDialog(TQWidget* parent_, const char* name_)
connect(this, TQT_SIGNAL(user3Clicked()), TQT_SLOT(slotGoPrevEntry()));
KGuiItem prev;
- prev.setIconName(TQString::tqfromLatin1(TQApplication::reverseLayout() ? "forward" : "back"));
+ prev.setIconName(TQString::fromLatin1(TQApplication::reverseLayout() ? "forward" : "back"));
prev.setToolTip(i18n("Go to the previous entry in the collection"));
prev.setWhatsThis(prev.toolTip());
KGuiItem next;
- next.setIconName(TQString::tqfromLatin1(TQApplication::reverseLayout() ? "back" : "forward"));
+ next.setIconName(TQString::fromLatin1(TQApplication::reverseLayout() ? "back" : "forward"));
next.setToolTip(i18n("Go to the next entry in the collection"));
next.setWhatsThis(next.toolTip());
@@ -86,14 +86,14 @@ EntryEditDialog::EntryEditDialog(TQWidget* parent_, const char* name_)
setButtonGuiItem(m_prevBtn, prev);
KAccel* accel = new KAccel(this);
- accel->insert(TQString::tqfromLatin1("Go Prev"), TQString(), prev.toolTip(), TQt::Key_PageUp,
+ accel->insert(TQString::fromLatin1("Go Prev"), TQString(), prev.toolTip(), TQt::Key_PageUp,
Controller::self(), TQT_SLOT(slotGoPrevEntry()));
- accel->insert(TQString::tqfromLatin1("Go Next"), TQString(), next.toolTip(), TQt::Key_PageDown,
+ accel->insert(TQString::fromLatin1("Go Next"), TQString(), next.toolTip(), TQt::Key_PageDown,
Controller::self(), TQT_SLOT(slotGoNextEntry()));
- setHelp(TQString::tqfromLatin1("entry-editor"));
+ setHelp(TQString::fromLatin1("entry-editor"));
- resize(configDialogSize(TQString::tqfromLatin1("Edit Dialog Options")));
+ resize(configDialogSize(TQString::fromLatin1("Edit Dialog Options")));
}
void EntryEditDialog::slotClose() {
@@ -153,7 +153,7 @@ void EntryEditDialog::setLayout(Data::CollPtr coll_) {
continue;
}
- // if this tqlayout model is changed, be sure to check slotUpdateField()
+ // if this layout model is changed, be sure to check slotUpdateField()
TQWidget* page = new TQWidget(m_tabs);
// (parent, margin, spacing)
TQVBoxLayout* boxLayout = new TQVBoxLayout(page, 0, 0);
@@ -163,10 +163,10 @@ void EntryEditDialog::setLayout(Data::CollPtr coll_) {
// (parent, nrows, ncols, margin, spacing)
// spacing gets a bit weird, if there are absolutely no Choice fields,
// then spacing should be 5, which is set later
- TQGridLayout* tqlayout = new TQGridLayout(grid, 0, NCOLS, 8, 2);
+ TQGridLayout* layout = new TQGridLayout(grid, 0, NCOLS, 8, 2);
// keramik styles make big widget, cut down the spacing a bit
if(TQCString(tqstyle().name()).lower().find("keramik", 0, false) > -1) {
- tqlayout->setSpacing(0);
+ layout->setSpacing(0);
}
boxLayout->addWidget(grid, 0);
@@ -202,8 +202,8 @@ void EntryEditDialog::setLayout(Data::CollPtr coll_) {
int r = count/NCOLS;
int c = count%NCOLS;
- tqlayout->addWidget(widget, r, c);
- tqlayout->setRowStretch(r, 1);
+ layout->addWidget(widget, r, c);
+ layout->setRowStretch(r, 1);
m_widgetDict.insert(TQString::number(m_currColl->id()) + field->name(), widget);
@@ -213,7 +213,7 @@ void EntryEditDialog::setLayout(Data::CollPtr coll_) {
}
widget->updateGeometry();
if(!field->isSingleCategory()) {
- maxHeight = TQMAX(maxHeight, widget->tqminimumSizeHint().height());
+ maxHeight = TQMAX(maxHeight, widget->minimumSizeHint().height());
}
++count;
}
@@ -231,7 +231,7 @@ void EntryEditDialog::setLayout(Data::CollPtr coll_) {
// update stretch factors for columns with a line edit
for(int col = 0; col < NCOLS; ++col) {
if(expands[col]) {
- tqlayout->setColStretch(col, 1);
+ layout->setColStretch(col, 1);
}
}
@@ -240,7 +240,7 @@ void EntryEditDialog::setLayout(Data::CollPtr coll_) {
// Now, go through and set all the field widgets to the same height
for(TQPtrListIterator<TQWidget> it(gridList); it.current(); ++it) {
- TQGridLayout* l = static_cast<TQGridLayout*>(it.current()->tqlayout());
+ TQGridLayout* l = static_cast<TQGridLayout*>(it.current()->layout());
if(noChoices) {
l->setSpacing(5);
}
@@ -248,19 +248,19 @@ void EntryEditDialog::setLayout(Data::CollPtr coll_) {
l->addRowSpacing(row, maxHeight);
}
// I don't want anything to be hidden, Keramik has a bug if I don't do this
- it.current()->setMinimumHeight(it.current()->tqsizeHint().height());
+ it.current()->setMinimumHeight(it.current()->sizeHint().height());
// the parent of the grid is the page that got added to the tabs
- it.current()->parentWidget()->tqlayout()->tqinvalidate();
- it.current()->parentWidget()->setMinimumHeight(it.current()->parentWidget()->tqsizeHint().height());
+ it.current()->parentWidget()->layout()->invalidate();
+ it.current()->parentWidget()->setMinimumHeight(it.current()->parentWidget()->sizeHint().height());
}
setUpdatesEnabled(true);
// this doesn't seem to work
-// tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum);
+// setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum);
// so do this instead
- tqlayout()->tqinvalidate(); // needed so the tqsizeHint() gets recalculated
- m_tabs->setMinimumHeight(m_tabs->tqminimumSizeHint().height());
- m_tabs->setMinimumWidth(m_tabs->tqsizeHint().width());
+ layout()->invalidate(); // needed so the sizeHint() gets recalculated
+ m_tabs->setMinimumHeight(m_tabs->minimumSizeHint().height());
+ m_tabs->setMinimumWidth(m_tabs->sizeHint().width());
// update keyboard accels
// only want to manage tabBar()
@@ -313,7 +313,7 @@ void EntryEditDialog::slotHandleSave() {
names += entry->title();
}
TQString str(i18n("Do you really want to modify these entries?"));
- TQString dontAsk = TQString::tqfromLatin1("SaveMultipleBooks"); // don't change 'books', invisible anyway
+ TQString dontAsk = TQString::fromLatin1("SaveMultipleBooks"); // don't change 'books', invisible anyway
int ret = KMessageBox::questionYesNoList(this, str, names, i18n("Modify Multiple Entries"),
KStdGuiItem::yes(), KStdGuiItem::no(), dontAsk);
if(ret != KMessageBox::Yes) {
@@ -345,7 +345,7 @@ void EntryEditDialog::slotHandleSave() {
}
entry->setField(fIt, temp);
if(temp.isEmpty()) {
- TQString prop = fIt->property(TQString::tqfromLatin1("required")).lower();
+ TQString prop = fIt->property(TQString::fromLatin1("required")).lower();
if(prop == Latin1Literal("1") || prop == Latin1Literal("true")) {
fieldsRequiringValues.append(fIt.data());
}
@@ -361,7 +361,7 @@ void EntryEditDialog::slotHandleSave() {
for(Data::FieldVecIt it = fieldsRequiringValues.begin(); it != fieldsRequiringValues.end(); ++it) {
titles << it->title();
}
- TQString dontAsk = TQString::tqfromLatin1("SaveWithoutRequired");
+ TQString dontAsk = TQString::fromLatin1("SaveWithoutRequired");
int ret = KMessageBox::questionYesNoList(this, str, titles, i18n("Modify Entries"),
KStdGuiItem::yes(), KStdGuiItem::no(), dontAsk);
if(ret != KMessageBox::Yes) {
@@ -379,7 +379,7 @@ void EntryEditDialog::slotHandleSave() {
Kernel::self()->modifyEntries(oldEntries, m_currEntries);
}
if(!m_currEntries.isEmpty() && !m_currEntries[0]->title().isEmpty()) {
- setCaption(i18n("Edit Entry") + TQString::tqfromLatin1(" - ") + m_currEntries[0]->title());
+ setCaption(i18n("Edit Entry") + TQString::fromLatin1(" - ") + m_currEntries[0]->title());
}
}
@@ -509,7 +509,7 @@ void EntryEditDialog::setContents(Data::EntryPtr entry_) {
m_currEntries.append(entry_);
if(!entry_->title().isEmpty()) {
- setCaption(i18n("Edit Entry") + TQString::tqfromLatin1(" - ") + entry_->title());
+ setCaption(i18n("Edit Entry") + TQString::fromLatin1(" - ") + entry_->title());
}
if(m_currColl != entry_->collection()) {
@@ -566,8 +566,8 @@ void EntryEditDialog::removeField(Data::CollPtr, Data::FieldPtr field_) {
delete w; // automatically deletes child widget
} else {
// much of this replicates code in setLayout()
- TQGridLayout* tqlayout = static_cast<TQGridLayout*>(widget->parentWidget()->tqlayout());
- delete widget; // automatically removes from tqlayout
+ TQGridLayout* layout = static_cast<TQGridLayout*>(widget->parentWidget()->layout());
+ delete widget; // automatically removes from layout
TQValueVector<bool> expands(NCOLS, false);
TQValueVector<int> maxWidth(NCOLS, 0);
@@ -577,8 +577,8 @@ void EntryEditDialog::removeField(Data::CollPtr, Data::FieldPtr field_) {
for(int count = 0; it != vec.end(); ++it) {
GUI::FieldWidget* widget = m_widgetDict.find(TQString::number(m_currColl->id()) + it->name());
if(widget) {
- tqlayout->remove(widget);
- tqlayout->addWidget(widget, count/NCOLS, count%NCOLS);
+ layout->remove(widget);
+ layout->addWidget(widget, count/NCOLS, count%NCOLS);
maxWidth[count%NCOLS] = TQMAX(maxWidth[count%NCOLS], widget->labelWidth());
if(widget->expands()) {
@@ -602,7 +602,7 @@ void EntryEditDialog::removeField(Data::CollPtr, Data::FieldPtr field_) {
// update stretch factors for columns with a line edit
for(int col = 0; col < NCOLS; ++col) {
if(expands[col]) {
- tqlayout->setColStretch(col, 1);
+ layout->setColStretch(col, 1);
}
}
}
@@ -687,7 +687,7 @@ void EntryEditDialog::modifyField(Data::CollPtr coll_, Data::FieldPtr oldField_,
m_currColl = coll_;
}
- // if the field type changed, go ahead and redo the whole tqlayout
+ // if the field type changed, go ahead and redo the whole layout
// also if the category changed for a non-single field, since a new tab must be created
if(oldField_->type() != newField_->type()
|| (oldField_->category() != newField_->category() && !newField_->isSingleCategory())) {