/** La construction consiste juste à mettre en place les connexions qvb */ RzxNotifier::RzxNotifier() :RzxModule(RZX_MODULE_NAME, QT_TRANSLATE_NOOP("RzxBaseModule", "Notify that a favorite state has changed"), RZX_MODULE_VERSION) { beginLoading(); favoriteWarn = false; ui = NULL; propWidget = NULL; setType(MOD_GUI); setIcon(RZX_MODULE_ICON); new RzxNotifierConfig(this); connect(RzxConnectionLister::global(), SIGNAL(login(RzxComputer* )), this, SLOT(login(RzxComputer* ))); connect(RzxConnectionLister::global(), SIGNAL(initialLoging(bool)), this, SLOT(ignoreLoging(bool))); RzxTranslator::connect(this, SLOT(translate())); RzxIconCollection::connect(this, SLOT(changeTheme())); if(RzxConnectionLister::global()->computerNumber()) ignoreLoging(false); #ifdef Q_OS_MAC installGrowlSupport(); #endif endLoading(); }
TwqHomeTL::TwqHomeTL(QWidget *p): TwqTL(qApp->translate("TwqHomeTL", "home"), p), _cbP([this](QJsonDocument& jdoc) { auto jar = jdoc.array(); for(auto itr=jar.begin() ; itr!=jar.end() ; itr++) { // User詳細を持っているならここで初期化しておく auto tobj = (*itr).toObject(); auto uobj = tobj.find(JSONKWD::TWEET::User).value().toObject(); UserID uid = JtoInt(uobj, JSONKWD::USER::IdStr); sgUser.setInfo(uid, uobj); // Tweetの登録 TweetID tid = JtoInt(tobj, JSONKWD::TWEET::IdStr); sgTweet.setInfo(tid, tobj); addCell(tid); } endLoading(QString(tr("query \"%1\" completed %2 tweet(s) received.")).arg(tlname()).arg(jar.size())); // 次ページは常に存在するものと仮定 showContinueButton(true); }) { setTLName(qApp->translate("TwqHomeTL", "home")); }