summaryrefslogtreecommitdiffstats
path: root/src/entryeditdialog.cpp
diff options
context:
space:
mode:
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 8956163..70b2288 100644
--- a/src/entryeditdialog.cpp
+++ b/src/entryeditdialog.cpp
@@ -30,7 +30,7 @@
#include <kpushbutton.h>
#include <kaccel.h>
-#include <layout.h>
+#include <tqlayout.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::fromLatin1(TQApplication::reverseLayout() ? "forward" : "back"));
+ prev.setIconName(TQString::tqfromLatin1(TQApplication::reverseLayout() ? "forward" : "back"));
prev.setToolTip(i18n("Go to the previous entry in the collection"));
prev.setWhatsThis(prev.toolTip());
KGuiItem next;
- next.setIconName(TQString::fromLatin1(TQApplication::reverseLayout() ? "back" : "forward"));
+ next.setIconName(TQString::tqfromLatin1(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::fromLatin1("Go Prev"), TQString(), prev.toolTip(), TQt::Key_PageUp,
+ accel->insert(TQString::tqfromLatin1("Go Prev"), TQString(), prev.toolTip(), TQt::Key_PageUp,
Controller::self(), TQT_SLOT(slotGoPrevEntry()));
- accel->insert(TQString::fromLatin1("Go Next"), TQString(), next.toolTip(), TQt::Key_PageDown,
+ accel->insert(TQString::tqfromLatin1("Go Next"), TQString(), next.toolTip(), TQt::Key_PageDown,
Controller::self(), TQT_SLOT(slotGoNextEntry()));
- setHelp(TQString::fromLatin1("entry-editor"));
+ setHelp(TQString::tqfromLatin1("entry-editor"));
- resize(configDialogSize(TQString::fromLatin1("Edit Dialog Options")));
+ resize(configDialogSize(TQString::tqfromLatin1("Edit Dialog Options")));
}
void EntryEditDialog::slotClose() {
@@ -153,7 +153,7 @@ void EntryEditDialog::setLayout(Data::CollPtr coll_) {
continue;
}
- // if this layout model is changed, be sure to check slotUpdateField()
+ // if this tqlayout 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* layout = new TQGridLayout(grid, 0, NCOLS, 8, 2);
+ TQGridLayout* tqlayout = 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) {
- layout->setSpacing(0);
+ tqlayout->setSpacing(0);
}
boxLayout->addWidget(grid, 0);
@@ -202,8 +202,8 @@ void EntryEditDialog::setLayout(Data::CollPtr coll_) {
int r = count/NCOLS;
int c = count%NCOLS;
- layout->addWidget(widget, r, c);
- layout->setRowStretch(r, 1);
+ tqlayout->addWidget(widget, r, c);
+ tqlayout->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->minimumSizeHint().height());
+ maxHeight = TQMAX(maxHeight, widget->tqminimumSizeHint().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]) {
- layout->setColStretch(col, 1);
+ tqlayout->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()->layout());
+ TQGridLayout* l = static_cast<TQGridLayout*>(it.current()->tqlayout());
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()->sizeHint().height());
+ it.current()->setMinimumHeight(it.current()->tqsizeHint().height());
// the parent of the grid is the page that got added to the tabs
- it.current()->parentWidget()->layout()->invalidate();
- it.current()->parentWidget()->setMinimumHeight(it.current()->parentWidget()->sizeHint().height());
+ it.current()->parentWidget()->tqlayout()->tqinvalidate();
+ it.current()->parentWidget()->setMinimumHeight(it.current()->parentWidget()->tqsizeHint().height());
}
setUpdatesEnabled(true);
// this doesn't seem to work
-// setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum);
+// tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum);
// so do this instead
- layout()->invalidate(); // needed so the sizeHint() gets recalculated
- m_tabs->setMinimumHeight(m_tabs->minimumSizeHint().height());
- m_tabs->setMinimumWidth(m_tabs->sizeHint().width());
+ tqlayout()->tqinvalidate(); // needed so the tqsizeHint() gets recalculated
+ m_tabs->setMinimumHeight(m_tabs->tqminimumSizeHint().height());
+ m_tabs->setMinimumWidth(m_tabs->tqsizeHint().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::fromLatin1("SaveMultipleBooks"); // don't change 'books', invisible anyway
+ TQString dontAsk = TQString::tqfromLatin1("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::fromLatin1("required")).lower();
+ TQString prop = fIt->property(TQString::tqfromLatin1("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::fromLatin1("SaveWithoutRequired");
+ TQString dontAsk = TQString::tqfromLatin1("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::fromLatin1(" - ") + m_currEntries[0]->title());
+ setCaption(i18n("Edit Entry") + TQString::tqfromLatin1(" - ") + 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::fromLatin1(" - ") + entry_->title());
+ setCaption(i18n("Edit Entry") + TQString::tqfromLatin1(" - ") + 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* layout = static_cast<TQGridLayout*>(widget->parentWidget()->layout());
- delete widget; // automatically removes from layout
+ TQGridLayout* tqlayout = static_cast<TQGridLayout*>(widget->parentWidget()->tqlayout());
+ delete widget; // automatically removes from tqlayout
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) {
- layout->remove(widget);
- layout->addWidget(widget, count/NCOLS, count%NCOLS);
+ tqlayout->remove(widget);
+ tqlayout->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]) {
- layout->setColStretch(col, 1);
+ tqlayout->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 layout
+ // if the field type changed, go ahead and redo the whole tqlayout
// 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())) {