main.cpp 820 B

1234567891011121314151617181920212223
  1. #include "widget.h"
  2. #include "clipboardmanager.h"
  3. #include <QApplication>
  4. int main(int argc, char *argv[])
  5. {
  6. QApplication a(argc, argv);
  7. ClipboardManager cbm;
  8. Widget w(&cbm);
  9. QObject::connect (&cbm, SIGNAL(readyToSave(QString)), &w, SLOT(readyToSave(QString)));
  10. QObject::connect (&cbm, SIGNAL(rawBufferChanged(QString)), &w, SLOT(readyToPrepare(QString)));
  11. QObject::connect (&cbm, SIGNAL(preparedToTransfer(QString)), &w, SLOT(preparedToTransfer(QString)));
  12. QObject::connect (&cbm, SIGNAL(tooBigSize(QString)), &w, SLOT(tooBigSize(QString)));
  13. QObject::connect (&cbm, SIGNAL(clearFields()), &w, SLOT(clearFields()));
  14. QObject::connect (&w, SIGNAL(toPrepare()), &cbm, SLOT(prepareToTransfer()));
  15. w.show();
  16. return a.exec();
  17. }