#include "Buffer.h"
#include "BufferParams.h"
+#include "Converter.h"
#include "Format.h"
#include "FuncRequest.h"
{
setupUi(this);
- connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
- connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
- connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
+ connect(buttonBox, SIGNAL(clicked(QAbstractButton *)),
+ this, SLOT(slotButtonBox(QAbstractButton *)));
connect(formatLW, SIGNAL(itemClicked(QListWidgetItem *)),
this, SLOT(slotFormatHighlighted(QListWidgetItem *)));
this, SLOT(changed_adaptor()));
bc().setPolicy(ButtonPolicy::OkApplyCancelPolicy);
- bc().setOK(okPB);
- bc().setApply(applyPB);
- bc().setCancel(closePB);
+ bc().setOK(buttonBox->button(QDialogButtonBox::Ok));
+ bc().setApply(buttonBox->button(QDialogButtonBox::Apply));
+ bc().setCancel(buttonBox->button(QDialogButtonBox::Cancel));
}
void GuiSendTo::updateContents()
{
- vector<Format const *> const & all_formats =
+ FormatList const & all_formats =
buffer().params().exportableFormats(false);
// Save the current selection if any
Format const * current_format = nullptr;
if (line < 0 || line > formatLW->count())
return;
- vector<Format const *> const & all_formats =
+ FormatList const & all_formats =
buffer().params().exportableFormats(false);
format_ = all_formats[line];
command_ = command;
{
int const line = formatLW->currentRow();
- if (line < 0 || line > int(formatLW->count()))
+ if (line < 0 || (line > int(formatLW->count())))
return false;
return (formatLW->selectedItems().size() > 0
if (!format_ || format_->name().empty())
return;
- string data = format_->name();
+ string sdata = format_->name();
if (!command_.isEmpty())
- data += " " + fromqstr(command_);
+ sdata += " " + fromqstr(command_);
FuncCode const lfun = command_.isEmpty() ?
LFUN_BUFFER_EXPORT : getLfun();
- dispatch(FuncRequest(lfun, data));
+ dispatch(FuncRequest(lfun, sdata));
}
Dialog * createGuiSendTo(GuiView & lv) { return new GuiSendTo(lv); }